This hypothesis posits that adversaries are utilizing NetWire to establish covert network connections directly within memory, bypassing traditional disk-based logging mechanisms. Proactive hunting for this behavior in Azure Sentinel is critical to identify stealthy lateral movement and data exfiltration attempts that might otherwise evade standard file-integrity monitoring.
rule netwire {
meta:
description = "detect netwire in memory"
author = "JPCERT/CC Incident Response Group"
rule_usage = "memory scan"
reference = "internal research"
strings:
$v1 = "HostId-%Rand%"
$v2 = "mozsqlite3"
$v3 = "[Scroll Lock]"
$v4 = "GetRawInputData"
$ping = "ping 192.0.2.2"
$log = "[Log Started] - [%.2d/%.2d/%d %.2d:%.2d:%.2d]"
condition: ($v1) or ($v2 and $v3 and $v4) or ($ping and $log)
}
This YARA rule can be deployed in the following contexts:
This rule contains 6 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the “detect netwire in memory” rule within an enterprise environment, including suggested filters and exclusions:
Endpoint Detection & Response (EDR) Self-Defense Scans
C:\Program Files\CrowdStrike\*, C:\Windows\System32\defender\*) and the process name contains keywords like “Sensor,” “Agent,” or “Monitor.”Scheduled Network Performance Monitoring Jobs
netwire components) into memory during specific maintenance windows (e.g., every Sunday at 02:00 AM).svchost.exe with service name “Schedule” or TaskScheduler) and restrict the alert to specific time windows where these maintenance jobs are known to run.Database Administrator Backup and Replication Tasks