hackervegas001
  • Introduction
  • oscp notes include Active Directory 2023
    • Active Directory
      • Enumeration
        • Traditional Approach
        • Currently Logged on Users
        • Powerview
          • Bypass AMSI
          • Domain User Enum
          • Domain Group Enumeration
          • Domain Computer and Server Enum
          • GPO and OU Enum
          • Domain Shares Enum
          • ACL Enum
        • ADRecon
        • BloodHound
      • Authentication
        • Password Hash Dumping
        • Service Account Attack Kerberoasting Attack
          • using mimikatz
          • using Rubeus
          • Using Impacket
        • AS-REP Roasting
        • Password Guessing
        • SAM for windows password
        • password/hash bruteforcing
      • Lateral Movement
        • Pass the hash
        • OverPass the hash
        • Silver Ticket Attack
        • Pass the hash attack
      • Persistence
        • Golden ticket attack
        • Domain Controller synchronization-Dumping all hashes
      • Misc
        • Login method
        • nt authority\system
    • Windows Priv Esc
      • important links
      • Enumeration
      • checking tools
        • winpeas
        • Windows exploit suggester
        • Sysinternals tools
        • Powerup
      • Escalation Path
        • UAC Bypass
        • Binary hijacking / Insecure file permissions
        • Unquoted Service path
        • kernel exploit
        • Potato attack (SEimpersonation)
          • Juicypotato
          • Printspoofer
          • JuicyPotatoNG
        • DLL/EXE Hijacking
        • Service Binary hijacking
        • Exploit msi file
    • Linux Priv Esc
      • Enumeration
      • Escalation path
        • Cron case
        • Editable /etc/passwd
        • kernel exploit
        • CP SUID
        • aria2c SUID
        • systemctl SUID
    • Commands
      • cut
      • awk
      • sed
    • Tools
      • Netcat
      • Powershell
      • Powercat
      • Nmap
      • nmblookup
      • smbclient
      • enum4linux
      • Nikto
      • Certutil (wget for windows)
      • msfvenom payload for powershell
      • iwr like wget for windows
      • ldapsearch
    • Enumeration
      • DNS Enumeration
      • Port Scanning
      • SMB Enumeration
      • NFS Enumeration
      • SMTP Enumeration
      • SNMP Enumeration
    • Web Applicaton Attacks
      • File Inclusion Vuln
      • sqli
      • misc
      • directory bruteforcing
    • files transfers
      • From Windows
      • To Windows
    • Antivirus Evasion
      • Using script in powershell
      • Using Shellter Tool
      • Veil tool
    • client side attacks
      • Exploiting Microsoft Office
        • Object Linking and Embedding
        • Macro
          • Macro Manually
          • Macro using Minitrue tool
      • Code execution via Windows Library Files
    • Port and Services
      • FTP 21
      • Pop3 110
      • smb 139 445
        • smb enumeration
          • SMB Enum
        • symlink traversal
      • SMTP 25 Enumeration
      • ssh 22
      • ms-sql 1433
      • tftp, udp port 69
      • snmp 161 udp
      • VNC PORT 5801 5901
      • UnrealIRCd IRC service
      • mysql 3306
    • Password Attacks
      • Standard Wordlist
      • Bruteforce Wordlist (Crunch)
      • Network Service Attack
        • Medusa tool
        • RDP attack using Crowbar
        • Hydra
      • Password Cracking
    • Port forwarding and Tunneling
      • Chisel (http Tunneling)
      • Port Forwarding with Rinetd tool
      • ssh Tunneling
        • Local Port Forwarding
        • Remote Port Forwarding
        • Dynamic Port Forwarding
      • Plink for windows
      • Netsh for windows
      • SShuttle
    • Misc
      • Port Scanning through script
      • Tty full interactive shell
      • rdp error
      • powershell ps1 reverse shell
      • updating wordpress cred via mysql
      • wordpress
        • updating wordpress cred via mysql
      • reverse shell via ssh
    • Powershell Empire
      • Listner, Stager and agent
      • Poweshell modules
        • selection
        • Credentials and privesc
        • lateral movement
  • 🖥️Enumeration
    • 🙂:)
      • Enumeration :)
        • FTP
          • Anonymous login
            • Default FTP Client
            • Web Browser
            • Filezilla
          • Insecure ACL (RW)
          • Dictionary Attack
        • SMB
          • SMB Null/Guest Session
            • smbmap
            • smbclient
            • impacket-smbclient
            • nmap
          • Dictionary Based Attack
            • crackmapexec
            • hydra
        • SSH
        • WinRM
        • RDP
        • SMTP
        • MYsql
        • NFS
        • SNMP
    • Exploitation
      • Windows Exploitation
      • Linux Exploitation
    • Buffer Overflow
    • Active Directory
      • Active Directory All Tools And Scripts
      • Active Directory Post Enumeration
      • Active Directory Post Exploitation
    • 🏁Writeups
      • cyberSecLabs
      • Hackthebox
        • Tjnull list
          • lame
          • brainfuck
      • Pg Play | Vulnhub
      • Pg practice
      • TryHackMe
      • To Do
Powered by GitBook
On this page
  1. oscp notes include Active Directory 2023
  2. Windows Priv Esc

Enumeration

Previousimportant linksNextchecking tools

Last updated 2 years ago

Enumeration

  • User Enum

    whoami

    netuser

    net user <user>

    whoami /priv

    whoami /group

  • Hostname

    hostname

  • OS & Architecture

    systeminfo

    systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type”

  • Processes & services

    tasklist /SVC

  • Firewall

    netsh advfirewall show currentprofile

    netsh advfirewall firewall show rule name=all

  • History

    • Get-History

    • (Get-PSReadlineOption).HistorySavePath give location oh history file

      • type <file-path>

  • Network Enum

    ipconfig

    ipconfig /all

    arp -a

    route print

    netstat -ano

  • Scheduled tasks

    • schtasks /query /fo LIST /v

    • Get-CimInstance -ClassName win32_service | Select Name,State,PathName | Where-Object {$_.State -like 'Running'}

  • Finding any specific file in whole system

    • Get-ChildItem -Path C:\ -Include <file> -File -Recurse -ErrorAction SilentlyContinue

    • Get-ChildItem -Path C:\ -Include *.kdbx -File -Recurse -ErrorAction SilentlyContinue

    • Get-ChildItem -Path C:\ -Include id_*, authorized_keys, *.kdbx, known_hosts, *.txt, **.git, **.key, **.keyx -Recurse -Force -ErrorAction silentlycontinue

    • Get-ChildItem -Path C:\users\* -Recurse -ErrorAction silentlycontinue

  • Installed packages & patch level

    wmic product get name, version, vendor

    wmic qfe to check update packages details

    wmic logicaldisk to check all disks

  • Readable/Writable files & dir

    • Using tool accesschk.exe accesschk.exe -uws "Everyone" "C:\Program Files" u to suppress error, w for write permission , s for search recursively

    • Using Get-ACL in powershell Get-ChildItem "C:\Program Files" -Recurse | Get-ACL | ?{$_.AccessToString -match "Everyone\sAllow\s\sModify"}

  • Unmounted disk

    mountvol

  • Device Drivers and Kernel Modules

    In powershell,

    driverquery.exe /v /fo csv | ConvertFrom-CSV | Select-Object ‘Display Name’, ‘Start Mode’, Path

    For specific driver details,

    Get-WmiObject Win32_PnPSignedDriver | Select-Object DeviceName, DriverVersion, Manufacturer | Where-Object {$_.DeviceName -like "VMware"}

  • Binaries That AutoElevate

    • Meaning

      Later in this module, we will explore various methods of privilege escalation. However, there are a few specific enumerations we should cover in this section that could reveal interesting OSspecific “shortcuts” to privilege escalation. First, on Windows systems, we should check the status of the AlwaysInstallElevated488 registry setting. If this key is enabled (set to 1) in either HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE, any user can run Windows Installer packages with elevated privileges.

    reg query HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Installer

    reg query HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer

  • Putty cred if putty is running

    • reg query "HKCU\Software\SimonTatham\PuTTY\Sessions" /s

    • reg query HKCU\Software\SimonTatham\PuTTY\SshHostKeys\

  • Password Enum

    findstr /si password *.txt *.ini *.config to check phrase “passsword” in current dir and its sub dir

  • AV Enum

    sc queryex type= service tell all runninng services state

    netsh advfirewall firewall dump OR netsh firewall show state firewall state

    Netsh firewall show config firewall configuration

  • Automation Tool

    In powershell, windows-privesc-check2.exe --dump -G or -h for help

For more commands check

https://github.com/pentestmonkey/windows-privesc-check
Important links