Detect Network Topology in Elastic Security
Adversaries may gather information about the victim's network topology that can be used during targeting. This includes physical and logical arrangement of external-facing and internal network environments, network devices such as gateways and routers, and routing infrastructure. Threat actors like Volt Typhoon and Salt Typhoon have conducted extensive network topology reconnaissance to identify critical infrastructure paths, upstream/downstream network segments, and inter-network connectivity before executing intrusion campaigns. Detection focuses on two surfaces: (1) network discovery tool execution on managed endpoints indicating an insider or post-compromise enumeration phase, and (2) external scanning patterns visible in perimeter logs indicating pre-compromise reconnaissance by external actors.
MITRE ATT&CK
- Tactic
- Reconnaissance
- Technique
- T1590 Gather Victim Network Information
- Sub-technique
- T1590.004 Network Topology
- Canonical reference
- https://attack.mitre.org/techniques/T1590/004/
Elastic Detection Query
sequence by host.name with maxspan=5m
[process where event.type == "start" and (
process.name : ("nmap", "nmap.exe", "masscan", "masscan.exe", "zmap", "zmap.exe", "netdiscover", "nbtscan", "nbtscan.exe", "arp-scan", "unicornscan", "lansweeper") or
process.args : ("tracert", "traceroute", "pathping", "tracepath", "snmpwalk", "snmpget", "snmpenum", "Get-NetRoute", "Get-NetNeighbor", "show cdp neighbors", "show lldp") or
(process.name : ("cmd.exe", "powershell.exe", "pwsh.exe") and process.args : ("route", "netstat", "arp") and process.args : ("print", "-r", "-a", "-n"))
)]
until [process where event.type == "end"]
| where true
pipe sequence by host.name with maxspan=10m
[network where event.type == "connection" and
destination.port in (161, 162, 179, 520, 521, 646, 2049, 8291) and
not destination.ip : ("127.0.0.1", "::1", "169.254.*")]
[network where event.type == "connection" and
destination.port in (161, 162, 179, 520, 521, 646, 2049, 8291) and
not destination.ip : ("127.0.0.1", "::1", "169.254.*")] Detects network topology reconnaissance via two branches: (1) execution of known network discovery tools or topology enumeration commands (nmap, masscan, traceroute, SNMP tools, route enumeration) on endpoints; (2) sequential connections to network management protocol ports (SNMP 161/162, BGP 179, RIP 520/521) suggesting broadcast protocol scanning. Covers both insider/post-compromise enumeration and lateral movement preparation phases.
Data Sources
Required Tables
False Positives & Tuning
- Network management teams running legitimate topology discovery with tools like SolarWinds, PRTG, or Nagios that invoke nmap or SNMP walks on schedule
- IT admins using 'route print', 'arp -a', or 'tracert' for standard connectivity troubleshooting
- Vulnerability scanners (Nessus, Qualys, Rapid7) legitimately scanning internal subnets from authorized scanner hosts
- Automated configuration management tools (Ansible, Puppet) that enumerate network interfaces or routing tables during inventory collection
Other platforms for T1590.004
Testing Methodology
Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Network Topology Discovery via Traceroute and Route Table Enumeration
Expected signal: Sysmon Event ID 1: Process Create events for route.exe, tracert.exe, arp.exe, netstat.exe with their respective command lines. Sysmon Event ID 11: File Create event for route_output.txt in %TEMP%. Sysmon Event ID 3: Network connections from tracert.exe to 8.8.8.8 and intermediate hops. Security Event ID 4688 (if process auditing enabled) for each spawned process.
- Test 2SNMP Network Device Topology Enumeration
Expected signal: Auditd/Sysmon-for-Linux process execution event for snmpwalk with command line containing OIDs .1.3.6.1.2.1.4.22 (ARP table) and .1.3.6.1.2.1.4.24 (routing table). Network connection event (UDP/161) to target host. File creation event for /tmp/snmp_arp_output.txt. Syslog entries from snmpd if local daemon receives the query.
- Test 3PowerShell Network Neighbor and Route Enumeration
Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Get-NetRoute', 'Get-NetNeighbor', 'Get-NetIPAddress', 'ConvertTo-Json'. PowerShell ScriptBlock Log Event ID 4104 with full script content. Sysmon Event ID 11: File Create event for network_topology.json in %TEMP%.
- Test 4Nmap Host Discovery and OS Detection Scan
Expected signal: Sysmon Event ID 1: Process Create for nmap.exe with CommandLine containing '-sn', '-O', '--osscan-guess', '-oX'. Multiple Sysmon Event ID 3 network connection events for ICMP and TCP probes across the /24 range. Sysmon Event ID 11: File Create events for nmap_discovery.xml and nmap_osdetect.xml in %TEMP%.
- Test 5BGP and Routing Protocol Reconnaissance via Netstat
Expected signal: Auditd/Sysmon-for-Linux process execution events for netstat, ss, ip with command lines containing routing protocol ports (179 BGP, 520 RIP, 646 LDP). File creation events for /tmp/routing_protocols.txt, /tmp/routing_table_full.txt, /tmp/arp_cache.txt. If Sysmon for Linux installed: Event ID 1 (Process Create) for each command.
References (9)
- https://attack.mitre.org/techniques/T1590/004/
- https://dnsdumpster.com/
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-038a
- https://blog.talosintelligence.com/salt-typhoon-analysis/
- https://www.mandiant.com/resources/blog/fin13-a-cybercriminal-threat-actor-focused-on-mexico
- https://nmap.org/book/man-output.html
- https://learn.microsoft.com/en-us/powershell/module/nettcpip/get-netroute
- https://learn.microsoft.com/en-us/azure/sentinel/connect-sysmon
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1590.004/T1590.004.md
Unlock Pro Content
Get the full detection package for T1590.004 including response playbook, investigation guide, and atomic red team tests.