Windows Kernel Exploit Privilege Escalation
Windows kernel exploits target unpatched vulnerabilities in the OS core to escalate from any user to SYSTEM. Unlike Linux, Windows kernel exploits tend to be more stable (less risk of BSOD) on specific targeted builds. Use WES-ng to identify candidates, verify the build matches, and execute. Always try userland vectors first — kernel exploits are a last resort.
Prerequisites Check
Collect system information for patch level analysis:
Step 1 — Identify Missing Patches with WES-ng
On the target:
Transfer to your attack box and run WES-ng:
Update the database if needed:
Focus on local privilege escalation exploits (ignore remote ones). Cross-reference with your architecture and exact build number.
Download WES-ng: https://github.com/bitsadmin/wesng
CVE-2021-36934 — HiveNightmare / SeriousSam
Affected: Windows 10 (1809 and later), Windows 11 before patch KB5005010
The SAM, SYSTEM, and SECURITY registry hives in C:\Windows\System32\config\ have overly permissive ACLs — BUILTIN\Users can read them. Any local user can dump local account hashes without admin privileges.
Check if vulnerable:
Exploit:
If no shadow copy exists, create one:
Extract hashes on attack box:
Download: https://github.com/GossiTheDog/HiveNightmare
MS16-032 — Secondary Logon Service (Windows 7–10, Server 2008–2012)
Affected: Windows 7 SP1 through Windows 10 (before June 2016 patches), Server 2008 SP2 through 2012 R2
Race condition in the Secondary Logon service. Requires at least 2 CPU cores.
Check if vulnerable:
Or check manually — missing KB3143141.
Exploit using PowerShell:
Download: https://github.com/EmpireProject/Empire/blob/master/data/module_source/privesc/Invoke-MS16032.ps1
CVE-2020-0796 — SMBGhost (Windows 10 1903/1909)
Affected: Windows 10 version 1903 and 1909 (before KB4551762)
Heap buffer overflow in SMBv3 compression. Local privilege escalation variant available.
Check:
Exploit:
CVE-2022-21882 — Win32k Privilege Escalation (Windows 10/11)
Affected: Windows 10, Windows 11, Server 2019/2022 before January 2022 patches
Use-after-free in win32k.sys. Reliable local privilege escalation.
Check:
Exploit:
Compilation for Windows Targets
When compiling on Linux for Windows targets:
References
-
Windows patch level CVE comparison and exploit identification.
-
HiveNightmaregithub.com/GossiTheDog/HiveNightmare (opens in new tab)
GossiTheDog CVE-2021-36934 SAM hive read exploit and detection guidance.
-
Exploit Databasewww.exploit-db.com (opens in new tab)
Primary source for Windows kernel exploit source code.
Was this helpful?
Your feedback helps improve this page.