Token Manipulation and Impersonation
What You'll Learn
You'll learn how attackers steal and manipulate Windows access tokens to impersonate other users and escalate privileges during post-exploitation.
The Core Idea
In Windows, every running process has an access token — think of it as a badge that says "I'm User X, and I have these permissions." This token determines what resources the process can access and what actions it can perform.
After gaining initial access to a system, attackers often steal these tokens from privileged processes (like those running as SYSTEM or Domain Admin) and attach them to their own malicious processes. This is called token impersonation.
The Badge Analogy
Imagine you're in a building with your employee badge. If you could somehow copy a security guard's badge and wear it, doors that were locked to you would suddenly open. That's essentially what token manipulation does — you're borrowing someone else's identity badge to access areas you shouldn't.
How Attackers Use Tokens
- Token Stealing: After dumping credentials from LSASS (as you learned previously), attackers can also steal access tokens from running processes
- Impersonation: Using tools to duplicate privileged tokens and assign them to attacker-controlled processes
- Privilege Escalation: A low-privilege user process can "become" SYSTEM or Administrator by stealing the right token
This technique is particularly powerful because it doesn't require knowing passwords — you're using the active authentication session directly. It also generates less suspicious activity than credential dumping in some environments.
Common Scenarios
Attackers often target service accounts, scheduled tasks running as SYSTEM, or processes belonging to logged-in domain administrators. Once impersonated, they can access sensitive files, install persistence mechanisms, or move laterally to other systems with those elevated privileges.
Key Takeaway: Token manipulation allows attackers to impersonate privileged users without passwords by stealing and reusing Windows access tokens from running processes, enabling silent privilege escalation and lateral movement.