Detect Remote System Discovery in Google Chronicle
Adversaries may attempt to get a listing of other systems by IP address, hostname, or other logical identifier on a network that may be used for Lateral Movement from the current system. Common methods include net view, ping sweeps, ARP cache enumeration, NBT/NetBIOS scanning, and third-party tools such as Nmap, MASSCAN, NBTscan, and Angry IP Scanner. Adversaries may also read local host files (C:\Windows\System32\Drivers\etc\hosts or /etc/hosts) or query Active Directory for computer objects. On ESXi hosts, esxcli commands may be used to enumerate network peers.
MITRE ATT&CK
- Tactic
- Discovery
- Technique
- T1018 Remote System Discovery
- Canonical reference
- https://attack.mitre.org/techniques/T1018/
YARA-L Detection Query
rule t1018_remote_system_discovery {
meta:
author = "Argus Detection Engineering"
description = "Detects Remote System Discovery (T1018) via known enumeration tools, suspicious command patterns, PowerShell-based host discovery, and AD computer enumeration."
severity = "MEDIUM"
priority = "MEDIUM"
mitre_attack_tactic = "Discovery"
mitre_attack_technique = "T1018"
mitre_attack_url = "https://attack.mitre.org/techniques/T1018/"
false_positives = "IT admin tools, monitoring agents, AD management scripts"
version = "1.0"
events:
$e.metadata.event_type = "PROCESS_LAUNCH"
$e.principal.hostname != ""
(
// Known enumeration tool names
re.regex($e.target.process.file.full_path, `(?i)(\\|/)(net\.exe|net1\.exe|ping\.exe|arp\.exe|nbtstat\.exe|nltest\.exe|nmap(\.exe)?|masscan(\.exe)?|nbtscan(\.exe)?|ipscan(\.exe)?)$`)
or
// Net view and domain enumeration patterns
re.regex($e.target.process.command_line, `(?i)net[\s\t]+(view|group)|net1[\s\t]+view|nltest.*(dclist|dsgetdc|domain_trusts|server)`)
or
// ARP cache and NetBIOS enumeration
re.regex($e.target.process.command_line, `(?i)arp[\s\t]+(-a|/a)|nbtstat[\s\t]+(-a|-A|-n|-S)`)
or
// Ping sweep indicators
re.regex($e.target.process.command_line, `(?i)(ping.*-n[\s\t]+1|for[\s\t]+/l.*ping|masscan|nbtscan)`)
or
// PowerShell-based discovery
(
re.regex($e.target.process.file.full_path, `(?i)(\\|/)(powershell\.exe|pwsh\.exe)$`)
and
re.regex($e.target.process.command_line, `(?i)(Get-ADComputer|Get-NetComputer|Invoke-Portscan|Test-Connection|Test-NetConnection|NetworkInformation\.Ping|\[Net\.Dns\]|Resolve-DnsName|ping -n 1)`)
)
or
// External scanner tool execution
re.regex($e.target.process.file.full_path, `(?i)(nmap|masscan|nbtscan|ipscan|angryip)(\.exe)?$`)
)
// Exclude known-benign parents
not re.regex($e.principal.process.file.full_path, `(?i)(\\|/)(services\.exe|msiexec\.exe|sccm\.exe|ccmexec\.exe)$`)
match:
$e.principal.hostname over 5m
outcome:
$risk_score = max(
if(re.regex($e.target.process.command_line, `(?i)net[\s\t]+(view|group)|net1[\s\t]+view`), 20) +
if(re.regex($e.target.process.command_line, `(?i)nltest.*(dclist|dsgetdc|domain_trusts)`), 30) +
if(re.regex($e.target.process.command_line, `(?i)arp[\s\t]+(-a|/a)`), 15) +
if(re.regex($e.target.process.command_line, `(?i)nbtstat[\s\t]+(-a|-A|-n|-S)`), 15) +
if(re.regex($e.target.process.command_line, `(?i)ping.*-n[\s\t]+1|masscan|nbtscan`), 25) +
if(re.regex($e.target.process.command_line, `(?i)(Get-ADComputer|Get-NetComputer|Invoke-Portscan|NetworkInformation\.Ping)`), 30) +
if(re.regex($e.target.process.file.full_path, `(?i)(nmap|masscan|nbtscan|ipscan)(\.exe)?$`), 35)
)
$hostname = $e.principal.hostname
$username = $e.principal.user.userid
$process_name = $e.target.process.file.full_path
$command_line = $e.target.process.command_line
condition:
$e
} Detects Remote System Discovery (T1018) using Google Chronicle YARA-L 2.0. Monitors PROCESS_LAUNCH events for known network enumeration binaries, command-line patterns indicating net view, nltest, ARP/NetBIOS enumeration, ping sweeps, PowerShell-based host/AD discovery, and external scanner tools. Computes a risk score per host over a 5-minute window.
Data Sources
Required Tables
False Positives & Tuning
- Authorized network scanning during penetration testing engagements with written approval
- Systems management software (SCCM, Intune) using nltest or net commands during client health evaluation
- Security operations teams running scheduled vulnerability scans using Nmap or similar tools from designated scanner hosts
Other platforms for T1018
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 1Net View Domain Enumeration
Expected signal: Sysmon Event ID 1: Process Create for net.exe with CommandLine='net view /domain' and then 'net view'. Security Event ID 4688 (if command-line auditing enabled). Sysmon Event ID 3 may show NetBIOS/SMB connections to contacted hosts on port 137/445.
- Test 2Ping Sweep of Local Subnet
Expected signal: Up to 254 Sysmon Event ID 1 events for ping.exe, each with a different target IP in CommandLine. Sysmon Event ID 11 for file creation of df00tech-sweep.txt. Network ICMP traffic visible in NetFlow/packet capture. File creation in TEMP directory.
- Test 3PowerShell Get-ADComputer Enumeration
Expected signal: Sysmon Event ID 1: powershell.exe with CommandLine containing 'Get-ADComputer'. PowerShell ScriptBlock Log Event ID 4104 with full script. LDAP traffic from the host to domain controller on port 389/636. Sysmon Event ID 11 for CSV file creation in TEMP directory.
- Test 4ARP Cache Enumeration
Expected signal: Sysmon Event ID 1: arp.exe with CommandLine='arp -a'. Security Event ID 4688 (if command-line auditing enabled). No network events generated — this is a purely local operation. Sysmon Event ID 11 for file creation of df00tech-arp.txt.
- Test 5NLTest Domain Trust and DC Discovery
Expected signal: Sysmon Event ID 1: nltest.exe with CommandLine containing '/dclist:' and '/domain_trusts'. Security Event ID 4688 (if command-line auditing enabled). DNS queries for _ldap._tcp.dc._msdcs.<domain> visible in DNS logs.
References (9)
- https://attack.mitre.org/techniques/T1018/
- https://us-cert.cisa.gov/ncas/alerts/TA18-106A
- https://us-cert.cisa.gov/ncas/analysis-reports/ar21-126a
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceprocessevents-table
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1018/T1018.md
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/process_creation
- https://www.crowdstrike.com/blog/indrik-spider-supersized-evil-corp-adsb-espionage/
- https://www.elastic.co/security-labs/embracing-offensive-tooling-building-detections-against-koadic-using-eql
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/nltest
Unlock Pro Content
Get the full detection package for T1018 including response playbook, investigation guide, and atomic red team tests.