Detection Engineering · Threat Hunting · 3 min read

Detect Advanced IP Scanner and NetScan (KQL, ES|QL)

Detects: SoftPerfect NetScan, Advanced IP Scanner and Advanced Port Scanner by vendor, product or description in their PE version info, or by their portable and headless flag pairs.

ATT&CK: T1018 Remote System Discovery, T1046 Network Service Discovery

Works on: Microsoft Defender for Endpoint, KQL (DeviceProcessEvents); Elastic with Sysmon Event ID 1, ES|QL

Tested on: my lab, against Sliver C2, on both stacks

Full write-up: Hunt Ransomware Before It Encrypts: The Three Tools 45+ Gangs Reach For

The chokepoint before encryption

Every ransomware group has to map your network before it exfiltrates or encrypts, and 45+ groups do it with the same three tools. They are signed by recognized vendors, portable and usually GUI-driven, so at a glance they look like sysadmin work.

Most existing rules match on filename: rename advanced_ip_scanner.exe to chrome_update.exe and the rule breaks.

Two signals survive that:

The queries

Published verbatim from the newsletter issue.

KQL (Microsoft Defender for Endpoint):

let CompanyKeywords = dynamic(["Famatech", "SoftPerfect"]);
let ProductKeywords = dynamic(["Advanced IP Scanner", "Advanced Port Scanner", "Network Scanner"]);
let DescKeywords    = dynamic(["Advanced IP Scanner", "Advanced Port Scanner", "Application for scanning networks"]);
DeviceProcessEvents
| where Timestamp > ago(30d)
| where ProcessVersionInfoCompanyName has_any (CompanyKeywords)
    or ProcessVersionInfoProductName has_any (ProductKeywords)
    or ProcessVersionInfoFileDescription has_any (DescKeywords)
    or ProcessCommandLine has_all ("/portable", "/lng")
    or ProcessCommandLine has_all ("/hide", "/auto")
| project
    Timestamp, DeviceName, AccountName, FileName,
    ProcessCommandLine, ProcessVersionInfoCompanyName,
    ProcessVersionInfoProductName, ProcessVersionInfoFileDescription,
    SHA256, InitiatingProcessFileName,
    InitiatingProcessCommandLine, InitiatingProcessParentFileName

Defender results: Advanced IP Scanner, Advanced Port Scanner and NetScan processes; renamed copies such as HealthCheck.exe, ChromeUpdate.exe and update.exe still match on Famatech and SoftPerfect version info

ES|QL (Elastic, Sysmon Event ID 1):

FROM logs-windows.sysmon_operational-default
| WHERE @timestamp > NOW() - 30 days
  AND event.code == "1"
| EVAL cmd_l = TO_LOWER(process.command_line)
| WHERE process.pe.company     RLIKE ".*(Famatech|SoftPerfect).*"
     OR process.pe.product     RLIKE ".*(Advanced IP Scanner|Advanced Port Scanner|Network Scanner).*"
     OR process.pe.description RLIKE ".*(Advanced IP Scanner|Advanced Port Scanner|Application for scanning networks).*"
     OR (cmd_l LIKE "*/portable*" AND cmd_l LIKE "*/lng*")
     OR (cmd_l LIKE "*/hide*"     AND cmd_l LIKE "*/auto*")
| KEEP @timestamp, host.name, user.name, process.name, process.command_line,
       process.pe.company, process.pe.product, process.pe.description,
       process.hash.sha256, process.parent.name, process.parent.command_line
| SORT @timestamp ASC
| LIMIT 1000

Elastic results: 29 Sysmon process events matched on Famatech and SoftPerfect PE metadata, user folder masked

What it catches

Any of the three tools by vendor, product, description or flag pair, renamed or not, with the parent process and account next to each hit.

Get the next detection in your inbox

One lab-proven detection per issue: the attacker command, the telemetry it leaves, and the KQL / ES|QL that catches it.

You confirm on Substack in one tap.

No spam. Unsubscribe anytime.

Tuning note

The only knob is the time window, 30 days by default. A hit on Advanced IP Scanner or Advanced Port Scanner says more than “scanner ran”. Check which binary it was. The GUI binary (advanced_ip_scanner.exe, advanced_port_scanner.exe) needs someone at a desktop to drive it, so that hit implies a desktop session, and the follow-up is the same-host pivot to RDP and RMM tools. Both tools also ship a console binary (advanced_ip_scanner_console.exe, advanced_port_scanner_console.exe) that runs from a script, so a console hit does not prove a session.

Questions

Does renaming the scanner beat this?

No. In the lab advanced_ip_scanner.exe renamed to HealthCheck.exe still read CompanyName Famatech and ProductName Advanced IP Scanner. Renaming does not touch the version info.

IT uses these tools too. How do I tune it?

Filter out IT admin accounts and known scanning hosts, such as your vuln scanner or asset management agent. Allowlist by hostname or account, not by tool name.

What should make me escalate straight away?

Any hit left after you filter out IT accounts and known scanning hosts needs a look at its parent process and account. Two signs mean escalate at once: a parent of cmd.exe, powershell.exe or bitsadmin.exe, or a launch from C:\Users\Public\ or a Temp folder. A third: RDP or RMM activity on the same host within 2 hours of a GUI scanner hit, which means scope the incident and start containment. These are the strongest signs, not the only ones.

More network scanner hunts

#ransomware#t1018#t1046#kql#esql#mde#elasticsearch#sysmon

New detections go out by email first: subscribe to the newsletter.