Token Manipulation
Token Manipulation
Tools: Meterpreter , CrackMapExec/Netexec , irs.exe , incognito.exe , masky
These techniques can give us further privileged ACLs to gain more cleartext credentials or creating persistent mechanisms
Extract credentials with certificate authentication (ADCS required)
With this technique, we can perform Lateral movement via NTLM, Kerberos or Certificate.
List all tokens
Start a new process with a specific token
Token impersonation with command execution and user addition
List available tokens, and find an interesting token ID
With only SeImpersonatePrivilege, if a privileged user's token is present on the machine, it is possible to run code on the domain as him and add a new user in the domain (and add him to the Domain Admins by default):
With SeImpersonatePrivilege and SeAssignPrimaryToken, if a privileged user's token is presents on the machine, it is possible to execute comands on the machine as him:
Token impersonation via session leaking
Server
Client part (only available as Cobalt Strike BOF for the moment)
Tokens and ADCS
Python
Tokens and ADCS
Last updated