Discovery tactics involve gathering information about the network, system, and security settings. Adversaries often use built-in tools to map out the environment and plan further attacks, such as lateral movement.
25 Example Queries for Actor Discovery Detection:
Detect Network Enumeration via NetstatNetstat reveals active connections, open ports, and listening services.
DeviceProcessEvents | where FileName == "netstat.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Monitor the Use of Ipconfig for Network DiscoveryIpconfig provides detailed information about network interfaces.
DeviceProcessEvents | where FileName == "ipconfig.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Track Nslookup for DNS ReconnaissanceNslookup is used to query DNS records, revealing internal services.
DeviceProcessEvents | where FileName == "nslookup.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Detect ARP Scans for Network MappingArp scans are used to discover devices on the same network segment.
DeviceProcessEvents | where FileName == "arp.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Monitor the Use of Nbtstat for Network Resource EnumerationNbtstat queries NetBIOS over TCP/IP to reveal network resources.
DeviceProcessEvents | where FileName == "nbtstat.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Track Use of Whoami for Privilege DiscoveryWhoami is often used to check the current user’s privileges.
DeviceProcessEvents | where FileName == "whoami.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Detect PowerShell Use for Active Directory EnumerationAttackers may use PowerShell to enumerate AD objects and user groups.
DeviceProcessEvents | where FileName == "powershell.exe" and ProcessCommandLine has_any ("Get-ADUser", "Get-ADGroup") | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Monitor the Use of Net View for Listing Network SharesNet view lists available shares on the network, often used by attackers.
DeviceProcessEvents | where FileName == "net.exe" and ProcessCommandLine has "view" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Track Execution of Tasklist for Process EnumerationTasklist is used to list all running processes on a system.
DeviceProcessEvents | where FileName == "tasklist.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Detect Execution of Systeminfo for System Information DiscoverySysteminfo provides information about the operating system and hardware.
DeviceProcessEvents | where FileName == "systeminfo.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Monitor Execution of Net Use for Drive MappingNet use can be used to connect to network drives and shares.
DeviceProcessEvents | where FileName == "net.exe" and ProcessCommandLine has "use" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Track WMIC Commands for System DiscoveryWMIC can retrieve information about operating systems, processes, and services.
DeviceProcessEvents | where FileName == "wmic.exe" and ProcessCommandLine has_any ("os get", "process call create") | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Detect Use of Ping for Host DiscoveryPing is often used to test connectivity and discover active hosts.
DeviceProcessEvents | where FileName == "ping.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Monitor Execution of Route for Network Route DiscoveryRoute.exe can display or modify the IP routing table.
DeviceProcessEvents | where FileName == "route.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Detect Use of Getmac for MAC Address DiscoveryGetmac retrieves the MAC addresses of network adapters.
DeviceProcessEvents | where FileName == "getmac.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Monitor Unusual SMB Traffic for Network EnumerationSMB traffic may be indicative of network reconnaissance activities.
DeviceNetworkEvents | where RemotePort == 445 and ActionType == "ConnectionSuccess" | summarize count() by DeviceName, RemoteIP, AccountName
Track Execution of Reg.exe for Registry EnumerationReg.exe is used to query or modify Windows registry entries.
DeviceProcessEvents | where FileName == "reg.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Detect Use of NetSh for Network Configuration ChangesNetSh can be used to query or modify network configurations.
DeviceProcessEvents | where FileName == "netsh.exe" and ProcessCommandLine has_any ("firewall", "interface") | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Monitor Execution of PowerShell Network Discovery ScriptsPowerShell scripts can perform various network discovery tasks.
DeviceProcessEvents | where FileName == "powershell.exe" and ProcessCommandLine has_any ("Test-Connection", "Get-NetIPAddress") | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Detect Use of Network Sniffing Tools (Tcpdump, Wireshark)Network sniffing tools can be used for passive network reconnaissance.
DeviceProcessEvents | where FileName in ("tcpdump.exe", "wireshark.exe") | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Monitor the Use of PsExec for Remote ExecutionPsExec is often used to execute commands remotely across the network.
DeviceProcessEvents | where FileName == "psexec.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Track Use of PowerShell Remoting CommandsPowerShell remoting commands such as New-PSSession may indicate lateral movement attempts.
DeviceProcessEvents | where FileName == "powershell.exe" and ProcessCommandLine has "New-PSSession" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Monitor Netstat for Port and Connection EnumerationNetstat is used to view active network connections and ports.
DeviceProcessEvents | where FileName == "netstat.exe" and ProcessCommandLine has "an" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Detect DNS Query Tools for Domain Discovery (Nslookup, Dig)DNS query tools like nslookup and dig are used for DNS reconnaissance.
DeviceProcessEvents | where FileName in ("nslookup.exe", "dig.exe") | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine
Track Use of GPResult for Group Policy EnumerationGPResult provides details about applied Group Policy settings.
DeviceProcessEvents | where FileName == "gpresult.exe" | summarize count() by DeviceName, InitiatingProcessAccountName, ProcessCommandLine