T1590.004 Splunk · SPL

Detect Network Topology in Splunk

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/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
| eval Image_lower=lower(Image)
| eval CommandLine_lower=lower(CommandLine)
| eval IsDiscoveryTool=if(
    match(Image_lower, "(nmap|masscan|zmap|netdiscover|nbtscan|arp-scan|unicornscan|lansweeper)") OR
    match(CommandLine_lower, "(nmap|masscan|zmap|netdiscover|snmpwalk|snmpget|snmpenum|nbtscan)"),
    1, 0
  )
| eval IsRouteEnum=if(
    match(CommandLine_lower, "(tracert|traceroute|pathping|tracepath|route\s+print|netstat\s+-r|ip\s+route|get-netroute|get-netneighbor|arp\s+-a|arp\s+-n)"),
    1, 0
  )
| eval IsSNMPRecon=if(
    match(CommandLine_lower, "(snmpwalk|snmpget|snmpenum|snmpbulk|161|snmp)"),
    1, 0
  )
| eval IsOSFingerprint=if(
    match(CommandLine_lower, "(nmap\s+-o|os-detection|os-scan|os-fingerprint)"),
    1, 0
  )
| eval IsTopologyMap=if(
    match(CommandLine_lower, "(--traceroute|nmap.*-p.*-t|cdp|lldp|ospf|eigrp|bgp.*route)"),
    1, 0
  )
| eval ReconScore=IsDiscoveryTool + IsRouteEnum + IsSNMPRecon + IsOSFingerprint + IsTopologyMap
| where ReconScore > 0
| eval RiskCategory=case(
    IsSNMPRecon=1, "SNMP_Topology_Recon",
    IsOSFingerprint=1, "OS_Fingerprinting",
    IsDiscoveryTool=1 AND IsRouteEnum=1, "Combined_Network_Mapping",
    IsDiscoveryTool=1, "Network_Discovery_Tool",
    IsRouteEnum=1, "Routing_Enumeration",
    "General_Topology_Recon"
  )
| table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine,
        IsDiscoveryTool, IsRouteEnum, IsSNMPRecon, IsOSFingerprint, IsTopologyMap,
        ReconScore, RiskCategory
| sort - _time

| append
    [search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=3
     (DestinationPort=161 OR DestinationPort=162 OR DestinationPort=179 OR DestinationPort=520 OR DestinationPort=521)
     | stats count as ConnectionCount, dc(DestinationIp) as UniqueHosts,
             values(DestinationPort) as Ports, earliest(_time) as FirstSeen, latest(_time) as LastSeen
             by host, User, Image, CommandLine
     | where UniqueHosts > 5
     | eval ReconScore=2, RiskCategory="Broadcast_Protocol_Scanning"
     | eval IsDiscoveryTool=0, IsRouteEnum=0, IsSNMPRecon=if(mvfind(Ports,"161")>=0,1,0),
            IsOSFingerprint=0, IsTopologyMap=0
     | rename FirstSeen as _time
     | table _time, host, User, Image, CommandLine, IsDiscoveryTool, IsRouteEnum,
             IsSNMPRecon, IsOSFingerprint, IsTopologyMap, ReconScore, RiskCategory, UniqueHosts, ConnectionCount]

| sort - _time
medium severity medium confidence

Detects network topology reconnaissance using Sysmon Event ID 1 (Process Creation) and Event ID 3 (Network Connection). The primary search evaluates process command lines against five detection categories: network discovery tools, routing/ARP table enumeration, SNMP protocol interaction, OS fingerprinting flags, and topology mapping arguments. A cumulative ReconScore enables prioritization. An appended subsearch detects broadcast protocol scanning (SNMP UDP/161, BGP TCP/179, RIP UDP/520) by counting unique destination hosts per process.

Data Sources

Process: Process CreationNetwork Traffic: Network Connection CreationSysmon Event ID 1Sysmon Event ID 3

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Network engineers running nmap or traceroute for legitimate troubleshooting or change management activities
  • IT asset management systems (Lansweeper, SolarWinds, Nessus) performing scheduled network discovery scans
  • SNMP-based monitoring tools (PRTG, Zabbix, Nagios) polling network devices on UDP/161
  • BGP route monitoring scripts querying routing tables for network health dashboards
  • Penetration testing engagements with authorized scanners operating from managed endpoints
Download portable Sigma rule (.yml)

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.

  1. 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.

  2. 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.

  3. 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%.

  4. 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%.

  5. 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.

Unlock Pro Content

Get the full detection package for T1590.004 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections