Detection rules › Elastic

Windows Firewall Exception List Modified via Untrusted Process

Time window
1m
Sequence by
process.entity_id, process.parent.entity_id
Source
github.com/elastic/protections-artifacts

Identifies the execution of the built-in Windows program, Netsh, to add a program to the Windows Firewall exception list via an untrusted parent process.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies the execution of the built-in Windows program, Netsh, to add a program to the Windows Firewall exception list
via an untrusted parent process.
"""
id = "5c01669c-e1cc-4acc-95b6-8b5e4a92c970"
license = "Elastic License v2"
name = "Windows Firewall Exception List Modified via Untrusted Process"
os_list = ["windows"]
reference = [
    "https://docs.microsoft.com/en-us/troubleshoot/windows-server/networking/netsh-advfirewall-firewall-control-firewall-behavior",
]
version = "1.0.33"

query = '''
sequence with maxspan=1m
  [process where event.action == "start" and
   process.executable : ("?:\\ProgramData\\*", "?:\\Users\\*", "?:\\Python*") and not process.code_signature.trusted == true] by process.entity_id
  [process where event.action == "start" and process.name : "netsh.exe" and
   process.command_line : "*add*allowedprogram*ENABLE*" and
   not process.args : ("program=*:\\Program Files\\*", "program=*:\\Program Files (x86)\\*") and
   not (process.args : "name=Free Download Manager" and process.parent.name : "fdm_x64_setup.tmp")
   ] by process.parent.entity_id
'''

min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 1

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[[threat.technique.subtechnique]]
id = "T1562.004"
name = "Disable or Modify System Firewall"
reference = "https://attack.mitre.org/techniques/T1562/004/"



[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 1m, correlated by process.entity_id, process.parent.entity_id.

Stage 1: process

[process where event.action == "start" and
   process.executable : ("?:\\ProgramData\\*", "?:\\Users\\*", "?:\\Python*") and not process.code_signature.trusted == true] by process.entity_id

Stage 2: process

[process where event.action == "start" and process.name : "netsh.exe" and
   process.command_line : "*add*allowedprogram*ENABLE*" and
   not process.args : ("program=*:\\Program Files\\*", "program=*:\\Program Files (x86)\\*") and
   not (process.args : "name=Free Download Manager" and process.parent.name : "fdm_x64_setup.tmp")
   ] by process.parent.entity_id

Exclusions

The rule actively suppresses these predicates.

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.command_linewildcard
  • *add*allowedprogram*ENABLE*
field:"CommandLine" kind:wildcard value:"*add*allowedprogram*ENABLE*"
process.executablewildcard
  • ?:\ProgramData\* corpus 17 (elastic 17)
  • ?:\Python* corpus 2 (elastic 2)
  • ?:\Users\* corpus 18 (elastic 18)
field:"Image" kind:wildcard
process.namewildcard
  • netsh.exe corpus 21 (elastic 14, splunk 7)
field:"process_name" kind:wildcard value:"netsh.exe"