Skip to main content

Enumeration

Automated

We can use tools like WinPEAS to automate enumeration for privilege escalation, but below are manual methods for enumerating the system.


System Information

systeminfo                    # Get system information
Get-ComputerInfo # Detailed system info (Win10+)
wmic os get Caption, Version # OS version
Get-WmiObject Win32_OperatingSystem | Select-Object *

User & Group Enumeration

whoami                        # Current user
whoami /all # User privileges & groups
Get-LocalUser # List local users
Get-LocalGroupMember Administrators # List admin users
net user # List all users
net localgroup # List all groups
net localgroup Administrators # List admin group members

Sudo & Privilege Checks

whoami /priv                  # List privileges
whoami /groups # List Current User Groups
Get-Process -Name explorer | Select-Object -ExpandProperty Path # Check process owner

Running Processes

Get-Process                   # List running processes
Get-WmiObject Win32_Process # More detailed process info

Scheduled Tasks

Get-ScheduledTask             # List scheduled tasks
schtasks /query /fo LIST # Detailed task listing

Network Information

ipconfig /all                 # Network interfaces
arp -a # ARP Table
route print # Routing Table
Get-NetIPAddress # IP addresses
netstat -ano # Open ports and associated processes

Firewall Rules

Get-MpComputerStatus          # Check Windows Defender Status

Get-AppLockerPolicy -Effective | select -ExpandProperty RuleCollections # List AppLocker Rules
Get-AppLockerPolicy -Local | Test-AppLockerPolicy -path C:\Windows\System32\cmd.exe -User Everyone ## Test AppLocker Rules

Get-NetFirewallRule -All # List all firewall rules

Installed Programs

$INSTALLED = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |  Select-Object DisplayName, DisplayVersion, InstallLocation
$INSTALLED += Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, InstallLocation
$INSTALLED | ?{ $_.DisplayName -ne $null } | sort-object -Property DisplayName -Unique | Format-Table -AutoSize

File System & Permissions

Get-ACL C:\Windows\System32  # Check permissions on a folder

Environment Variable & Path

set                # Display Environment Variables

Registry Enumeration

Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Run"

Credentials & Stored Passwords

Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" | Select-Object AutoAdminLogon, DefaultUsername, DefaultPassword, DefaultDomainName

# Stored credentials
cmdkey /list

Exploit & Patch Checks

Get-HotFix | ft -AutoSize # Check installed updates

Named Pipes

## https://learn.microsoft.com/en-us/sysinternals/downloads/accesschk
accesschk.exe /accepteula \pipe\lsass -v # Check permission of named pipes
accesschk.exe -w \pipe\* -v # Check permission of all named pipes