Skip to content
Threat Feed
medium advisory

Detection of Unauthorized Windows Firewall Exception Rule Creation

Monitoring for non-standard additions to the Windows Defender Firewall exception list to identify potential defense impairment activity by unauthorized processes.

This brief addresses the detection of unauthorized modifications to the Windows Defender Firewall exception list. Attackers often attempt to modify firewall rules to maintain persistence or establish inbound network communication for command-and-control (C2) infrastructure. By adding an exception rule for a malicious binary, an adversary can bypass security controls that would otherwise block their traffic.

Defenders should monitor Event IDs 2004, 2071, and 2097, which record the creation of new firewall rules. Because many legitimate applications and Windows services perform these actions, it is necessary to filter against known-good paths and trusted system binaries. This brief provides a detection logic to isolate modifications occurring outside of standard enterprise application paths or those performed by suspicious processes. Monitoring these events is a critical component of identifying defense impairment and lateral movement attempts.

Impact

Successful exploitation allows an attacker to open communication ports that bypass firewall restrictions, potentially enabling unhindered C2 communication or lateral movement between compromised hosts within an internal network. If not monitored, these rule modifications may remain undetected as a form of stealthy persistence.

Recommendation

  • Deploy the Sigma rule below to monitor for firewall rule additions originating from suspicious paths or untrusted modifying applications.
  • Baseline common administrative tools and deployment scripts in your environment to further reduce false positives before enabling alerting.
  • Review Event ID 2004, 2071, and 2097 logs periodically to identify unusual network exceptions or rule additions occurring outside of standard maintenance windows.

Immediate actions

Enable Windows Firewall audit logging

IT Operations 72h

Threat Hunt

Search for existing firewall rules pointing to non-standard paths

T1686.003 medium high confidence hunt now

Data: Get-NetFirewallRule

Mitigations

Restrict firewall configuration permissions to administrative groups

medium_term IT Operations

T1686.003

Detection coverage 1

Detect Uncommon New Firewall Rule Addition

medium

Detects when a rule has been added to the Windows Defender Firewall exception list from non-standard locations or by unauthorized processes.

sigma tactics: defense-impairment sources: process_creation, windows, firewall-as

Detection queries are available on the platform. Get full rules →