netsh
Malware⚠️ Overview
Netsh is not a standalone malware family but rather a legitimate Windows command-line utility (Network Shell) that has been consistently weaponized by multiple threat actors since at least 2016. Groups such as APT19, TA444, and ransomware operators like Ryuk and Conti have used netsh for network manipulation, persistence, and lateral movement. It functions as a living-off-the-land (LoLBIN) tool, categorized under defense evasion and execution techniques.
🔧 Technical Capabilities
Attackers misuse netsh to create port forwarding rules (netsh interface portproxy), establish proxy listeners for C2 communication, and modify Windows Firewall settings to allow inbound/outbound connections. It is commonly executed via PowerShell or batch scripts to persist through scheduled tasks or registry run keys (MITRE ATT&CK IDs T1046, T1090, T1562.004). Evasion is achieved by obfuscating commands with Base64 encoding and combining with living-off-the-land binaries like rundll32.exe or regsvr32.exe. No C2 infrastructure is built into netsh itself; instead, it acts as a relay or reverse proxy for existing malware payloads such as Cobalt Strike beacons or Meterpreter sessions.
📜 History & Notable Incidents
The first documented abuse of netsh for malicious purposes appeared in 2016 within the Petya/NotPetya outbreak, where it was used to disable the Windows Firewall. In 2020, the Ryuk ransomware group leveraged netsh to add port forwarding rules for lateral movement (CVE-2020-1472, Zerologon, was used alongside). The Conti ransomware attacks in 2021 also employed netsh to create SOCKS proxies (MITRE ATT&CK technique T1090.001). No CVEs are directly associated with netsh itself, as it is a native tool; however, its abuse is documented in numerous vendor reports (e.g., CrowdStrike Falcon OverWatch, 2020; Mandiant M-Trends 2021).
🔍 Detection Indicators
Behavioral IoCs include command-line patterns like netsh interface portproxy add v4tov4 listenport=* connectaddress=* connectport=* and netsh advfirewall firewall add rule name=* dir=in action=allow. Network indicators involve unexpected port-forwarding configurations on workstations (e.g., TCP 3389 forwarded to a remote host). Registry keys such as HKLMSYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyFirewallRules may show anomalous rules. No static file hashes are standard as netsh.exe is a signed Microsoft binary; detection relies on process ancestry (parent process like wscript.exe or powershell.exe) and command-line arguments using Sysmon Event ID 1 or Windows Event ID 4688.
☠️ Risk & Impact
Abuse of netsh leads to persistent network tunnels that enable data exfiltration, C2 communication, and ransomware deployment. In 2021, the FBI’s IC3 report noted that netsh abuse was a key component in over 20% of investigated ransomware incidents, with financial losses exceeding $59 million annually. Primarily affected sectors include healthcare, finance, and critical infrastructure, where attackers use netsh to bypass network segmentation defenses.
🛡️ Mitigation
Organizations should implement Application Control (e.g., Microsoft Defender for Endpoint AppLocker) to restrict netsh.exe execution to authorized IT scripts, deploy Sysmon rules (e.g., Rule 1) to log port proxy additions, and enable Windows Firewall logging with alerts for any rule modifications out of change windows. No patch is applicable; the mitigation focuses on behavioral detection and least-privilege policies.
Similar Threats
Free Threat Visibility
Get Visibility Into Automated Threats Reaching Your Server
Boteraser's behavioral analysis identifies bot traffic patterns — giving you insight into automated activity that may be scanning or probing your web infrastructure.
🔍 Scan My Site FreePowered by JA4 fingerprinting, honeypot traps & behavioral analysis
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the malware listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.