For the complete documentation index, see llms.txt. This page is also available as Markdown.

Windows Privilege Escalation

Useful Tools

Tool
Description

C# local priv esc checks

Automated priv esc enumeration

PowerShell priv esc finder

C# version of PowerUp

.NET missing KB / exploit suggester

Retrieve stored passwords

Extract saved session info (PuTTY, WinSCP, RDP, etc.)

Windows Exploit Suggester based on systeminfo

PowerShell 2.0 priv esc enumeration

PowerShell priv esc enumeration

PowerShell offensive framework

OS privileges to SYSTEM reference

  • Upload tools to C:\Windows\Temp (writable by BUILTIN\Users)

  • Precompiled Seatbelt/SharpUp: https://github.com/r3motecontrol/Ghostpack-CompiledBinaries

Run PowerUp

. .\PowerUp.ps1
Invoke-AllChecks

Initial Enumeration

System Information

Windows Kernel Versions

Running Processes & Services

User & Group Info

Network Info

Environment Variables

Enumerating Protections

Installed Programs

Named Pipes

Important Files

PowerShell Setup

Token Privileges (Low Hanging Fruit)

  • Check current tokens and see if you can escalate: whoami /priv

  • Reference: https://github.com/gtworek/Priv2Admin

  • If machine is >= Windows 10 1809 / Windows Server 2019 -> Try Rogue Potato

  • If machine is < Windows 10 1809 / Windows Server 2019 -> Try Juicy Potato

SeBackupPrivilege

  • If you have SeBackupPrivilege, you can backup the registry hives and dump hashes

  • Reference: https://github.com/gtworek/Priv2Admin/blob/master/SeBackupPrivilege.md

  • Download files and use impacket secretsdump

Weak Permissions

Permissive File System ACLs

  • If BUILTIN\Users or Everyone has (F) or (M) on a service binary, replace it with a malicious one

  • cmd /c copy /Y malicious.exe "C:\path\to\service.exe" then sc start ServiceName

XAMPP Control Panel Editor Hijack

XAMPP versions including 7.3.10 can be affected by the control-panel editor hijack tracked as CVE-2020-11107 / Exploit-DB 50337.

Check the XAMPP version:

Useful indicator:

Create and transfer a reverse shell payload:

Replace the XAMPP control panel editor value with the payload path:

Confirm the value:

Start a listener and wait for the control panel to trigger the configured editor:

Successful shell:

Weak Service Permissions

  • Check for SERVICE_ALL_ACCESS or SERVICE_CHANGE_CONFIG for NT AUTHORITY\Authenticated Users or similar

Service Escalation via binpath Change

Unquoted Service Path

  • Windows tries: C:\Program.exe, C:\Program Files.exe, C:\Program Files (x86)\System.exe, etc.

  • Place executable at one of these paths if writable

Permissive Registry ACLs

Modifiable Registry Autorun Binary

AlwaysInstallElevated

  • Both must be set to 1 for exploitation:

  • Confirm the same condition with SharpUp or PowerUp:

Successful output identifies Always Install Elevated in SharpUp or an AlwaysInstallElevated Registry Key check in PowerUp.

  • Generate malicious MSI and install:

Startup Applications

  • Check if BUILTIN\Users has full access (F) to the Startup directory:

  • Drop a payload there; it executes when an admin logs in

DLL Hijacking

  • Use Process Monitor (procmon) to find DLLs with NAME NOT FOUND result loaded by a vulnerable service

  • Compile a malicious DLL and place it in the writable search path

Kernel Exploits

Enumerating Missing Patches

  • Kernel exploit repos: https://github.com/SecWiki/windows-kernel-exploits

Notable Vulnerabilities

  • MS08-067: RCE in Server service (Windows 2000/2003/2008, XP/Vista)

  • MS17-010 (EternalBlue): SMBv1 RCE - can also be used for local priv esc via port forwarding

  • CVE-2020-0668: Windows Kernel Elevation of Privilege via Service Tracing arbitrary file move

  • CVE-2021-1675/CVE-2021-34527 (PrintNightmare): Print Spooler RCE/LPE

  • Windows 10 exploits collection: https://github.com/nu11secur1ty/Windows10Exploits

HiveNightmare (CVE-2021-36934)

  • If BUILTIN\Users has (RX), the system is vulnerable

PrintNightmare Local Priv Esc

Vulnerable Services

  • Always enumerate installed software: wmic product get name

  • Search for known vulnerable versions (e.g., Druva inSync 6.6.3, Splunk Universal Forwarder)

  • Check for localhost-only services: netstat -ano | findstr LISTENING

  • Map PID to process: get-process -Id <PID>

User Account Control (UAC) Bypass

Check UAC Status

UAC Bypass via DLL Hijacking (SystemPropertiesAdvanced.exe)

  • Target: srrstr.dll loaded by 32-bit SystemPropertiesAdvanced.exe

  • Place malicious DLL in C:\Users\<user>\AppData\Local\Microsoft\WindowsApps\srrstr.dll

UACME

  • https://github.com/hfiref0x/UACME - comprehensive list of UAC bypasses by Windows build

Credential Hunting

Search for Files with Passwords

Unattended Setup Files

  • May contain base64-encoded credentials

Search Registry for Passwords

PowerShell History

Credentials in Process Command Lines

LSASS Credential Dumping

LaZagne

  • Modules: browsers, chats, mails, memory, sysadmin, windows, wifi

Additional Credential Locations

  • Passwords in Group Policy (SYSVOL share)

  • web.config files on dev machines

  • unattend.xml

  • AD user/computer description fields

  • KeePass databases (*.kdbx)

  • Files named pass.txt, passwords.docx, etc.

  • VNC config files: dir C:\*.vnc.ini /s /b and dir C:\*ultravnc.ini /s /b

Credential Search Terms

Key terms to grep for: password, passphrase, keys, username, creds, users, passkeys, configuration, dbcredential, dbpassword, pwd, login, credentials

Interacting with Users

SCF File Attack (Steal NTLMv2 Hashes)

  • Name it @Inventory.scf and place on heavily used file share

  • Start Responder: sudo responder -wrf -v -I tun0

  • Crack captured NTLMv2: hashcat -m 5600 hash.txt rockyou.txt

Force SMB Authentication From a Shell

If you already have command execution as a Windows user, force that user to authenticate to your SMB listener:

Responder should capture NetNTLMv2:

Crack it with Hashcat mode 5600:

Process Command Line Monitoring

Traffic Capture

  • If Wireshark is installed, unprivileged users may be able to capture traffic

  • Use net-creds to sniff passwords from pcap or live interface

Post-Exploitation Quickwins

Add Admin & Enable RDP

Disable/Enable Group Policy

Run Executable in Background

SMB File Transfer

  • On Kali:

  • On Windows:

xfreerdp

Scheduled Tasks

Enumerate Scheduled Tasks

Exploit Writable Task Scripts

  • If a scheduled task runs a script you can write to:

  • Check the script's ACL:

  • If writable, replace contents with a reverse shell or adduser command

Exploit Writable Scheduled Binaries

Look for backup directories and task hints that reference binaries run on a schedule:

Useful hint:

Check whether low-privileged users can modify the binary:

Writable ACL pattern:

Replace the scheduled binary with a reverse shell payload:

Wait for the scheduled run:

Successful Administrator shell:

User/Computer Description Field

  • Sysadmins sometimes store passwords in user or computer description fields

LOLBAS (Living Off The Land Binaries and Scripts)

  • https://lolbas-project.github.io/

certutil - File Transfer / Encode

rundll32 - Execute DLL

CVE-2019-1388 - Windows Certificate Dialog LPE

  • Affects older Windows versions (pre-patch)

  • Run a signed executable as admin, click "Show information about the publisher's certificate"

  • In the Issuer Statement link, a browser opens as SYSTEM

  • Use browser's "Save As" dialog to launch cmd.exe

Legacy Operating Systems

Windows Server 2008 / Windows 7

  • End-of-Life, no more security patches

  • Missing modern protections (AMSI, Credential Guard, etc.)

  • Use Sherlock or Windows-Exploit-Suggester for kernel exploit identification:

Notable Legacy Exploits

  • MS10-092 (Server 2008 R2) - Task Scheduler XML Privilege Escalation

  • MS16-032 (Windows 7/8.1, Server 2008/2012) - Secondary Logon Race Condition

Windows Hardening Checklist

  • Install OS from trusted media, keep patched (WSUS)

  • Apply Group Policy baselines (DISA STIGs, Microsoft Security Compliance Toolkit)

  • Enforce least privilege: remove users from local Administrators, use tiered admin accounts

  • Restrict PowerShell with Constrained Language Mode

  • Enable Credential Guard, LSA Protection, and Device Guard where possible

  • Disable LLMNR/NBT-NS

  • Implement LAPS for local admin password management

  • Enable and centralize logging (Sysmon, Windows Event Forwarding)

  • Disable unnecessary services and protocols (SMBv1, remote registry)

  • Enforce strong password policy and account lockout

  • Enable multi-factor authentication for privileged access

Resources

  • https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Windows%20-%20Privilege%20Escalation.md

  • https://book.hacktricks.wiki/en/windows-hardening/checklist-windows-privilege-escalation.html

  • https://github.com/hfiref0x/UACME

  • https://lolbas-project.github.io/

  • https://wadcoms.github.io/

  • https://ppn.snovvcrash.rocks/pentest/infrastructure/post-exploitation

Last updated