You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/windows-hardening/windows-local-privilege-escalation/roguepotato-and-printspoofer.md
+93-3Lines changed: 93 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,42 @@
4
4
5
5
> [!WARNING] > **JuicyPotato doesn't work** on Windows Server 2019 and Windows 10 build 1809 onwards. However, [**PrintSpoofer**](https://github.com/itm4n/PrintSpoofer)**,**[**RoguePotato**](https://github.com/antonioCoco/RoguePotato)**,**[**SharpEfsPotato**](https://github.com/bugch3ck/SharpEfsPotato)**,**[**GodPotato**](https://github.com/BeichenDream/GodPotato)**,**[**EfsPotato**](https://github.com/zcgonvh/EfsPotato)**,**[**DCOMPotato**](https://github.com/zcgonvh/DCOMPotato)** can be used to **leverage the same privileges and gain `NT AUTHORITY\SYSTEM`** level access. This [blog post](https://itm4n.github.io/printspoofer-abusing-impersonate-privileges/) goes in-depth on the `PrintSpoofer` tool, which can be used to abuse impersonation privileges on Windows 10 and Server 2019 hosts where JuicyPotato no longer works.
6
6
7
+
> Note: A modern alternative frequently maintained in 2024–2025 is SigmaPotato (a fork of GodPotato) which adds in-memory/.NET reflection usage and extended OS support. See quick usage below and the repo in References.
8
+
9
+
Related pages for background and manual techniques:
10
+
11
+
{{#ref}}
12
+
seimpersonate-from-high-to-system.md
13
+
{{#endref}}
14
+
15
+
{{#ref}}
16
+
from-high-integrity-to-system-with-name-pipes.md
17
+
{{#endref}}
18
+
19
+
{{#ref}}
20
+
privilege-escalation-abusing-tokens.md
21
+
{{#endref}}
22
+
23
+
## Requirements and common gotchas
24
+
25
+
All the following techniques rely on abusing an impersonation-capable privileged service from a context holding either of these privileges:
26
+
27
+
- SeImpersonatePrivilege (most common) or SeAssignPrimaryTokenPrivilege
28
+
- High integrity is not required if the token already has SeImpersonatePrivilege (typical for many service accounts such as IIS AppPool, MSSQL, etc.)
29
+
30
+
Check privileges quickly:
31
+
32
+
```cmd
33
+
whoami /priv | findstr /i impersonate
34
+
```
35
+
36
+
Operational notes:
37
+
38
+
- PrintSpoofer needs the Print Spooler service running and reachable over the local RPC endpoint (spoolss). In hardened environments where Spooler is disabled post-PrintNightmare, prefer RoguePotato/GodPotato/DCOMPotato/EfsPotato.
39
+
- RoguePotato requires an OXID resolver reachable on TCP/135. If egress is blocked, use a redirector/port-forwarder (see example below). Older builds needed the -f flag.
40
+
- EfsPotato/SharpEfsPotato abuse MS-EFSR; if one pipe is blocked, try alternative pipes (lsarpc, efsrpc, samr, lsass, netlogon).
41
+
- Error 0x6d3 during RpcBindingSetAuthInfo typically indicates an unknown/unsupported RPC authentication service; try a different pipe/transport or ensure the target service is running.
42
+
7
43
## Quick Demo
8
44
9
45
### PrintSpoofer
@@ -23,6 +59,10 @@ NULL
23
59
24
60
```
25
61
62
+
Notes:
63
+
- You can use -i to spawn an interactive process in the current console, or -c to run a one-liner.
64
+
- Requires Spooler service. If disabled, this will fail.
DCOMPotato provides two variants targeting service DCOM objects that default to RPC_C_IMP_LEVEL_IMPERSONATE. Build or use the provided binaries and run your command:
147
+
148
+
```cmd
149
+
# PrinterNotify variant
150
+
PrinterNotifyPotato.exe "cmd /c whoami"
151
+
152
+
# McpManagementService variant (Server 2022 also)
153
+
McpManagementPotato.exe "cmd /c whoami"
154
+
```
155
+
156
+
### SigmaPotato (updated GodPotato fork)
157
+
158
+
SigmaPotato adds modern niceties like in-memory execution via .NET reflection and a PowerShell reverse shell helper.
- Monitor for processes creating named pipes and immediately calling token-duplication APIs followed by CreateProcessAsUser/CreateProcessWithTokenW. Sysmon can surface useful telemetry: Event ID 1 (process creation), 17/18 (named pipe created/connected), and command lines spawning child processes as SYSTEM.
172
+
- Spooler hardening: Disabling the Print Spooler service on servers where it isn’t needed prevents PrintSpoofer-style local coercions via spoolss.
173
+
- Service account hardening: Minimize assignment of SeImpersonatePrivilege/SeAssignPrimaryTokenPrivilege to custom services. Consider running services under virtual accounts with least privileges required and isolating them with service SID and write-restricted tokens when possible.
174
+
- Network controls: Blocking outbound TCP/135 or restricting RPC endpoint mapper traffic can break RoguePotato unless an internal redirector is available.
175
+
- EDR/AV: All of these tools are widely signatured. Recompiling from source, renaming symbols/strings, or using in-memory execution can reduce detection but won’t defeat solid behavioral detections.
0 commit comments