Windows API reference
SetThreadToken
Assigns an impersonation token to a thread.
- Library
- Advapi32.dll
- Category
- Privilege Escalation
- Suspicion
- high
Detection summary
SetThreadToken has no reviewed Sysmon/ETW event; impersonation is inferred from EDR token telemetry and the operations performed under the token.
- Sysmon: No Sysmon event mapped
- ETW: No ETW provider mapped
- Notes: Correlate with DuplicateTokenEx, ImpersonateLoggedOnUser, OpenProcessToken and privileged file, registry or network access. Sysmon 1 can show a process created under the token; the thread-token assignment itself is not logged.
Sources and documentation
- Microsoft Learn documentation (direct documentation)
- MITRE ATT&CK T1134.001: Access Token Manipulation: Token Impersonation/Theft
- Microsoft Sysmon events
Last reviewed: . Page metadata generated .
Legitimate use
Installer services, UAC-elevated helpers and management agents.
Related APIs
- ImpersonateLoggedOnUser — Advapi32.dll