Uncommon New Firewall Rule Added In Windows Firewall Exception List

Detects when a rule has been added to the Windows Firewall exception list

Sigma rule (View on GitHub)

 1title: Uncommon New Firewall Rule Added In Windows Firewall Exception List
 2id: cde0a575-7d3d-4a49-9817-b8004a7bf105
 3status: test
 4description: Detects when a rule has been added to the Windows Firewall exception list
 5references:
 6    - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-r2-and-2008/dd364427(v=ws.10)
 7author: frack113
 8date: 2022-02-19
 9modified: 2025-10-08
10tags:
11    - attack.defense-evasion
12    - attack.t1562.004
13logsource:
14    product: windows
15    service: firewall-as
16detection:
17    selection:
18        EventID:
19            - 2004 # A rule has been added to the Windows Defender Firewall exception list
20            - 2071 # A rule has been added to the Windows Defender Firewall exception list. (Windows 11)
21            - 2097
22    filter_main_block:
23        Action: 2 # Block
24    filter_main_generic:
25        ApplicationPath|startswith:
26            - 'C:\Program Files (x86)\'
27            - 'C:\Program Files\'
28            - 'C:\Windows\System32\'
29            - 'C:\Windows\SysWOW64\'
30            - 'C:\Windows\WinSxS\'
31    filter_main_covered_paths:
32        # This filter is added to avoid duplicate alerting from 9e2575e7-2cb9-4da1-adc8-ed94221dca5e
33        ApplicationPath|contains:
34            - 'C:\PerfLogs\'
35            - 'C:\Temp\'
36            - 'C:\Tmp\'
37            - 'C:\Users\Public\'
38            - 'C:\Windows\Tasks\'
39            - 'C:\Windows\Temp\'
40            - '\AppData\Local\Temp\'
41    filter_main_system_dllhost:
42        ApplicationPath: 'System'
43        ModifyingApplication: 'C:\Windows\System32\dllhost.exe'
44    filter_main_tiworker:
45        ModifyingApplication|startswith: 'C:\Windows\WinSxS\'
46        ModifyingApplication|endswith: '\TiWorker.exe'
47    filter_main_null:
48        ApplicationPath: null
49    filter_optional_no_path:
50        # This filter filters a lot of FPs related to Windows Services
51        ModifyingApplication:
52            - 'C:\Windows\System32\svchost.exe'
53            - 'C:\Windows\System32\dllhost.exe'
54        ApplicationPath: ''
55    filter_optional_msmpeng:
56        - ModifyingApplication|startswith:
57              - 'C:\ProgramData\Microsoft\Windows Defender\Platform\'
58              - 'C:\Program Files\Windows Defender\'
59          ModifyingApplication|endswith: '\MsMpEng.exe'
60        - ApplicationPath|startswith:
61              - 'C:\ProgramData\Microsoft\Windows Defender\Platform\'
62              - 'C:\Program Files\Windows Defender\'
63          ApplicationPath|endswith: '\MsMpEng.exe'
64    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
65level: medium

References

Related rules

to-top