Pentest Notes
  • About
  • Notes
    • Methodologies & Tools
      • Scanning & Enumeration
        • Scanning
        • Port 21 - FTP
        • Port 22 - SSH
        • Port 23 - telnet
        • Port 25 - SMTP
          • Enumerate Users via SMTP
        • Port 53 - DNS
        • Port 110 - POP3
        • Port 111 - RPCBind
        • Port 123 - NTP
        • Port 139, 445 - SMB
        • Port 143 - IMAP
        • Port 161 - SNMP
        • Port 389 - LDAP
        • Port 1521 - Oracle DB Listener
        • Port 1433 - MSSQL
        • Port 2049 - NFS
        • Port 3306 - MySQL/MariaDB
        • Port 3389 - RDP
        • Port 5432 - Postgres
        • Port 6379 - Redis
        • Port 27017 - MongoDB
      • Active Directory
        • Housekeeping
        • DNS Recon
        • Finding Users
        • Client Side Attacks
        • PowerShell Domain Enumeration
        • Roasting
        • Mimikatz
        • Credential Attacks
        • Bloodhound
        • Persistence
        • Group Policy Attack Tools
        • Service Account Exploits
        • Delegation
        • Cheatsheets
        • Tool Repos
      • Privilege Escalation
        • Windows
          • Basic Methodology
          • UAC Bypass
          • Privilege Exploits
          • Service Exploits
          • Password Hunting
          • Scheduled Tasks
          • Insecure File Permissions
          • Driver Kernel Exploits
          • LAPS Password
          • AlwaysInstallElevated
          • SMBGhost
          • PowerShell
          • PowerUp
          • Enable Remote Desktop
          • Cheatsheets
        • Linux
          • Shell Upgrade
          • Basic Methodology
          • Adding User to /etc/passwd
          • Add User to /etc/sudoers
          • Docker Breakout
          • LD_Library
          • Checking Weird Binaries
          • Outdated Bash
          • NFS Root Squash
          • Resources
      • Web
        • IDOR
        • LFI - Local File Inclusion
          • Windows LFI List
        • RFI - Remote File Inclusion
        • Command Injection
        • Server Side Template Injection - SSTI
        • SQL Injection
          • Blind Injection Sample Script
        • XSS
        • Authentication
        • Administrative Portals
        • NodeJS
        • 403 Forbidden Bypass
      • Network Pivoting
      • Tools
        • Compiling
        • Cracking
        • Port Knocking
        • Shells
        • SQL
      • File Transfer
      • External
Powered by GitBook
On this page
  1. Notes
  2. Methodologies & Tools
  3. Privilege Escalation
  4. Windows

Basic Methodology

System Information

systeminfo
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"
  • tasklist /svc

    • List running services

User Information

whoami
net user <username>
whoami /priv
whoami /groups
net user

Quick Win Tools

  • winpeas (fade the haters, learn about the output and run this to save time!)

  • PowerUp

  • SharpUp

  • Seatbelt

  • accesschk.exe

  • windows exploit suggester ng (less likely on OSCP but use as last-ish resort)

Firewall Info

netsh advfirewall show currentprofile
netsh advfirewall firewall show rule name=all

Scheduled Tasks

schtasks /query /fo LIST /v

Check Read/Write Permissions on Folders/Files

accesschk.exe -uws "Everyone" "C:\Program Files"
Get-ChildItem "C:\Program Files" -Recurse | Get-ACL | ?{$_.AccessToString -match "Everyone\sAllow\s\sModify"}

Unmounted Drives

mountvol

AlwaysInstallElevated Check

reg query HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Installer
reg query HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
  • If the settings are enabled (REG_DWORD 0x1) then we can craft a MSI and elevate

Password Hunting (Desperate Times)

  • Look for raw passwords in registry

reg query HKLM /f pass /t REG_SZ /s
PreviousWindowsNextUAC Bypass

Last updated 2 years ago

https://www.praetorian.com/blog/how-to-detect-and-dump-credentials-from-the-windows-registry/