Table Of Contents
- Windows System Enumeration
- Operating System Information
- Process & Service Enumeration
- Windows Account Enumeration
- Network Info & Configuration
- Registry Commands & Important Keys
- Remote System Enumeration
WINDOWS SYSTEM ENUMERATION
- Note: This section details important and useful system enumeration commands that can be used to query important operating system, user, and even remote system information.
OPERATING SYSTEM INFORMATION
Enumerate Windows version information
ver
Display hotfixes and service packs
wmic qfe list
Display whether 32 or 64 bit system
wmic cpu get datawidth /format:list
Enumerate OS architecture - The existence of Program Files (x86) means machine is 64bit
dir /a c:\
Display OS configuration, including service pack levels
systeminfo
Display drives
fsutil fsinfo drives
Display logical drives
wmic logicaldisk get description,name
Display environment variables
set
Date of last reboot - Created date of pagefile.sys is last startup
dir /a c:\pagefile.sys
Display shares
net share
Display local sessions
net session
List user mounted shares – MUST BE RUN IN THE CONTEXT OF THE USER
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\
PROCESS & SERVICE ENUMERATION
Display services hosted in each process
tasklist /svc
Display detailed information for running processes that are not running as SYSTEM
tasklist /FI "USERNAME ne NT AUTHORITY\SYSTEM" /FI "STATUS eq running" /V
Force all instances of a process and child processes to terminate (terminate specific PID with /PID <PID>)
taskkill /F /IM <PROCESS_NAME> /T
Terminate all instances of a process
wmic process where name="<PROCESS_NAME>" call terminate
Display the executable path and PID of all running processes
wmic process get name,executablepath,processid
Display Anti-Virus products commonly registered as AntiVirusProduct (PowerShell command)
Get-WmiObject -Namespace "root\SecurityCenter2" -Class AntiVirusProduct -ErrorAction Stop
Run a file as a specific user (prompts for password)
runas /user:<DOMAIN>\<USERNAME> "<FILE_PATH> [ARGS]"
Display processes that match a certain string
tasklist /v | findstr "<STRING_TO_SEARCH>"
Display processes (including command line arguments used to launch them)
wmic process get processid,commandline
Display services (space after state=)
sc query state= all