Defense Impairment via Windows Firewall Registry Modification
Adversaries disable the Windows Firewall by modifying specific registry keys to bypass network security controls and facilitate lateral movement or data exfiltration.
Adversaries frequently target the Windows Firewall configuration to impair security defenses, allowing for unrestricted inbound and outbound network communication. By modifying the EnableFirewall registry DWORD value to 0 within the StandardProfile or DomainProfile keys, attackers effectively disable the firewall service without interacting with the graphical interface or standard management utilities. This technique is often used post-exploitation to maintain persistence, communicate with C2 servers, or move laterally within a compromised network environment. Defenders must monitor registry set operations targeting these specific policy paths, as legitimate administrative changes to these keys are rare in production environments and should be strictly managed through Group Policy Objects (GPO).
Attack Chain
- Attacker gains elevated (administrator) access to the target host.
- Attacker identifies security controls, including the state of the Windows Firewall.
- Attacker targets the registry key HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile.
- Attacker modifies the 'EnableFirewall' registry value to 0x00000000.
- Attacker repeats the modification for the DomainProfile to ensure coverage across network environments.
- Attacker confirms firewall impairment via command-line tools like netsh.
- Attacker initiates unauthorized outbound connections or exposes local services.
Impact
Successful exploitation allows attackers to bypass host-based network segmentation, significantly increasing the probability of successful data exfiltration and the deployment of additional malicious payloads. This technique is a common component of ransomware campaigns, where it is used to disable protective measures before encryption activities commence.
Recommendation
- Deploy the provided Sigma rule to detect unauthorized registry modifications targeting firewall policy keys.
- Implement GPO-based hardening to restrict write access to the HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\ path.
- Enable system-wide auditing for registry modifications via Sysmon (Event ID 13) or standard Windows Security event logs (Event ID 4657).
Immediate actions
Deploy registry monitoring for Windows Firewall policy keys.
Mitigations
Enforce Windows Firewall settings via locked GPO to prevent registry modification.
T1562.004
Detection coverage 1
Detect Windows Firewall Disabled via Registry
mediumDetects the modification of the EnableFirewall registry value to 0, which disables the Windows Firewall.
Detection queries are available on the platform. Get full rules →