Windows Privilege Escalation

Windows Privilege Escalation

If you’ve landed a low-priv shell on a Windows machine during an OSCP-style challenge, follow along now...


Automated Enumeration

# WinPEAS
winPEASx64.exe / winPEAS.bat

# PowerUp (PowerShell)
Invoke-AllChecks

# Seatbelt
Seatbelt.exe all

Run with caution; log-heavy tools may trigger alerts. Validate everything manually.


Initial Recon

whoami
whoami /groups
whoami /priv
hostname
systeminfo
ver
env
net users
net localgroup
net user <username>
query user
tasklist
ipconfig /all

Credential Hunting

Analyze saved hives with secretsdump or mimikatz offline. Don’t skip AppData, Recycle Bin, ProgramData, or temp folders.


Token Abuse and Sudo-like Privileges

If you have SeImpersonatePrivilege, use PrintSpoofer:

Other privileges:

  • SeAssignPrimaryTokenPrivilege

  • SeTcbPrivilege

Useful for Juicy Potato / Rogue Potato / PotatoNG if PrintSpoofer fails.


Services, Scheduled Tasks, and Misconfigs

Look for services with weak permissions, unquoted paths, and scheduled tasks running as SYSTEM but pointing to writable scripts.


AlwaysInstallElevated

If both keys are set to 1:


DLL Hijacking and Search Order Abuse

Use Procmon to monitor DLL load order. Drop malicious DLLs where apps expect them.

Restart the service or wait for the binary to trigger load.


UAC Bypass Techniques

Requires Auto-elevated binaries. Useful when UAC is in default or misconfigured state.


Registry and Image File Execution Options (IFEO)

Works if you have permission to edit the registry and IFEO keys are respected.


Sticky Keys Backdoor

At login screen, press Shift five times to pop a SYSTEM shell.


Kernel Exploits

Use only as a last resort. Validate versions and potential BSOD risks.


WMI and Logon Script Abuse

  • Permanent WMI Event Consumers

  • Custom logon scripts in user folder or registry (HKCU\Environment\UserInitMprLogonScript)

Use PowerShell to register events or inspect scripts run at logon.


Startup Folders and Run Keys

If writable, place a payload there.


PowerShell History and Console Logs

Useful for finding commands, credentials, or recon trails left by the user.


File and Folder Permissions

Check writable paths, uploads, service binaries, log folders.

Last updated