Metasploit: multi/recon/local_exploit_suggester
Windows Exploit Suggester:
Check Installed OS and architecture
CMD PS
Copy systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"
Copy Get-ComputerInfo -property 'WindowsProductName', 'OsVersion', 'OsArchitecture'
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId
Get Installed updates
CMD PS
Copy systeminfo | find ": KB"
wmic qfe get Caption,Description,HotFixID,InstalledOn
Copy get-wmiobject -class win32_quickfixengineering
List environment variables
CMD PS
Copy Get-ChildItem Env: | ft Key,Value
List local and network drives
CMD PS
Copy wmic logicaldisk get deviceid, volumename, description
Copy get-psdrive -psprovider filesystem
View Domain Controllers
CMD
Copy systeminfo | findstr /B /C:"Domain"
Network
Get interface and network configuration
CMD PS
Copy Get-NetIPConfiguration | Select-Object -Property InterfaceAlias, IPv4Address
Print routing table
List active connections
Show Firewall state and configuration
CMD
Copy netsh firewall show state
netsh firewall show config
List network drives
View DNS cache
Users and Groups
Get current user
CMD
Copy whoami
net user %username%
List all users
CMD PS
Copy Get-LocalUser | ft Name,Enabled,LastLogon,Description
Get details about a specific user
View password policy
Get local groups
Services
Get running services
CMD CMD
Copy wmic service get Caption,StartName,State,pathname
List unquoted service binaries
Copy wmic service get name,pathname,displayname,startmode | findstr /i auto | findstr /i /v "C:\Windows\\" | findstr /i /v """
World Writeable Folders
Copy C:\Windows\System32\Microsoft\Crypto\RSA\MachineKeys
C:\Windows\System32\spool\drivers\color
C:\Windows\Tasks
C:\Windows\tracing
C:\Windows\Temp
C:\Users\Public
Privilege Escalation Specific
Unquoted service paths
If value returned is AlwaysInstallElevated REG_DWORD 0x1
A malicious MSI can be used to install with elevated permissions from a standard privileged account.
Copy reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer\AlwaysInstallElevated
reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer\AlwaysInstallElevated
Check Sticky Notes for passwords
Copy C:\Users\<user>\AppData\Local\Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqlite
Search File System for passwords and files of interest
Search for passwords
Copy findstr /si password *.txt
findstr /si password *.xml
findstr /si password *.ini
findstr /si pass *.txt
findstr /si pass *.xml
findstr /si pass *.ini
#Find all those strings in config files.
dir /s *pass* == *cred* == *vnc* == *.config*
If current user can read Event Logs then get the latest PowerShell commands run on the system
Copy Get-EventLog -LogName 'Windows PowerShell' -Newest 100 | Select-Object -Property *
Recycle Bin
Copy cd 'c:\$recycle.bin\<User SID>'
dir /A