Living Off the Land
Host & Network Recon
# We can get basic info about the system using this command
Systeminfo
# Get user's information and privileges
whoami /all
# Get the specified user's PowerShell history
Get-Content $env:APPDATA\Microsoft\Windows\Powershell\PSReadline\ConsoleHost_history.txt
# Prints the PC's Name
hostname
# Prints out the OS version and revision level
[System.Environment]::OSVersion.Version
# Displays a list of environment variables for the current session (ran from CMD-prompt)
set
Get-ChildItem Env: | ft Key,Value
# Displays the domain name to which the host belongs (ran from CMD-prompt)
echo %USERDOMAIN%
# Prints out the name of the Domain controller the host checks in with (ran from CMD-prompt)
echo %logonserver%
# Prints out network adapter state and configurations
ipconfig /all
# List of all known hosts stored in arp table
arp -a
# Displays routing table (IPv4 & IPv6)
route printRecon using WMI
Net Commands for Domain Enumeration
Dsquery
Some Useful Commands
LDAP Filtering Explanation
Last updated