Windows Reconnaissance Commands

Built-in Windows commands for post-exploitation situational awareness. These require no external tools — they work on any Windows system, are less likely to trigger application whitelisting, and map directly to MITRE ATT&CK Discovery techniques.

Network and system identity

CommandPurposeMITRE ATT&CK
arp -aDisplay the ARP cache — reveals other machines on the local network segmentT1018 (Remote System Discovery)
hostnameReturn the system hostnameT1082 (System Information Discovery)
[[systeminfosysteminfo]]OS version, patch level, hardware, domain membership, boot time
netstat -anoOpen/listening ports and owning process IDsT1049 (System Network Connections Discovery)

Users, groups, and privileges

CommandPurposeMITRE ATT&CK
whoami /groupsCurrent user’s group membershipsT1033 (System Owner/User Discovery)
whoami /privCurrent user’s privileges (SeImpersonate, SeDebug, etc.)T1033
query sessionOther users currently logged inT1033
net userAll local user accountsT1087.001 (Local Account)
net user $USERNAMEDetails for a specific userT1087.001
net localgroupAll local groupsT1069.001 (Local Groups)
net localgroup administratorsMembers of the local Administrators groupT1069.001
net group /domainDomain groups (requires domain membership)T1069.002 (Domain Groups)
net group "Domain Admins" /domainDomain admin accountsT1069.002

Shares, services, and tasks

CommandPurposeMITRE ATT&CK
net shareAll shares exported by this machineT1135 (Network Share Discovery)
net startAll running servicesT1007 (System Service Discovery)
sc queryQuery/manipulate services (conflicts with a PowerShell alias!)T1007
schtasksScheduled tasks (abuse patterns: exploit-windows-scheduled-tasks)T1053.005 (Scheduled Task)

Credentials and registry

CommandPurposeMITRE ATT&CK
cmdkey /listSaved credentials (Credential Manager)T1555 (Credentials from Password Stores)
reg queryQuery registry keys and valuesT1012 (Query Registry)

Policy and drivers

CommandPurposeMITRE ATT&CK
net accountsLocal machine password/lockout policiesT1201 (Password Policy Discovery)
net accounts /domainDomain password/lockout policiesT1201
driverqueryInstalled drivers (attack surface inventory)T1082

Notes

  • sc conflicts with the PowerShell Set-Content alias. Use sc.exe in PowerShell, or run from cmd.exe.
  • Commands prefixed with /domain require the machine to be domain-joined and the current user to have domain read access (any authenticated user by default).
  • These are the minimum viable recon — supplement with PowerShell equivalents (Get-LocalUser, Get-LocalGroup, Get-Service, etc.) and dedicated tools like PowerView for deeper AD enumeration.

Defense perspective

These commands are ubiquitous and low-noise, making detection difficult. However:

  • Sysmon event 1 (process creation) logs command lines — forward to SIEM and alert on recon patterns (whoami /priv, net group "Domain Admins")
  • Baseline normal admin activity; alert on recon commands from unexpected accounts or machines
  • See windows-event-logs and get-winevent for how to query these events

Sources

Related: windows-event-logs, get-winevent, windows-ntfs-permissions, powershell-reverse-shell, amsi-bypass, whoami, ipconfig, findstr, windows-saved-credentials, unattended-installation-credentials, powershell-service-management, putty-saved-sessions, rdp-restricted-admin-mode, net-windows-command, windows-privesc-recon-scripts, windows-unix-command-equivalents, dir, reg, nbtscan, secedit-bulk-privilege-edit