Suspicious Firewall Modification to Allow Network Discovery
Detection of 'netsh' command execution to enable network discovery in the firewall, a technique commonly used by ransomware such as REvil and RedDot to discover and compromise additional machines on the network.
This alert detects suspicious use of the netsh command to enable network discovery through the Windows Firewall. Ransomware actors like REvil and RedDot use this technique to discover and compromise additional machines on the network, leading to widespread file encryption. The detection leverages Endpoint Detection and Response (EDR) data, focusing on command-line executions involving the netsh command. Attackers modify the firewall to allow network discovery, which aids in lateral movement and identifying valuable targets within the compromised network. This activity is a strong indicator of reconnaissance and preparation for ransomware deployment. The detection specifically looks for netsh commands that enable the “Network Discovery” group with a “Yes” value, highlighting a deliberate attempt to bypass default firewall restrictions for network scanning.
Attack Chain
- Initial access is gained through an existing vulnerability or compromised credentials.
- The attacker executes a command shell (e.g., cmd.exe, powershell.exe).
- The attacker uses the
netshcommand to modify firewall settings. - Specifically, the attacker enables network discovery by setting the “Network Discovery” group to “Yes” in the firewall configuration.
- The modified firewall settings allow the attacker to perform network scans.
- The attacker uses network scanning tools (e.g., ping, nbtscan, or custom scripts) to identify vulnerable machines on the network.
- The attacker moves laterally to these identified machines using exploits or stolen credentials.
- Finally, the attacker deploys ransomware across multiple hosts, encrypting files and demanding ransom.
Impact
Successful execution of this attack can lead to widespread file encryption across multiple hosts, significantly amplifying the impact of the ransomware attack. This can result in data loss, business disruption, and significant financial costs associated with recovery and ransom payments. Victims may experience downtime, reputational damage, and potential legal repercussions due to data breaches. The impact can extend beyond the initially compromised machine, affecting critical infrastructure and sensitive data stored on other network systems.
Recommendation
- Enable Sysmon process creation logging to capture the command-line details required for detection (Sysmon EventID 1).
- Deploy the Sigma rule
Detect Firewall Modification for Network Discoveryto your SIEM and tune for your environment. - Investigate any alerts generated by the rule, focusing on the parent processes and user accounts involved.
- Monitor Windows Event Log Security events with event ID 4688 for process creation events, which can provide additional context for this activity.
- Review and harden firewall configurations to prevent unauthorized modifications.
Detection coverage 2
Detect Firewall Modification for Network Discovery
highDetects command-line execution using netsh to enable network discovery in Windows Firewall, a common tactic used by ransomware.
Detect PowerShell Firewall Modification for Network Discovery
highDetects PowerShell command to enable network discovery in Windows Firewall, a common tactic used by ransomware.
Detection queries are kept inside the platform. Get full rules →