Detection rules › Sigma

Firewall deactivation (deprecated command)

Status
experimental
Severity
high
Log source
product windows, category process_creation
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker disabled the Windows Firewall to evade defense.

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Firewall deactivation (deprecated command)
description: Detects scenarios where an attacker disabled the Windows Firewall to evade defense.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0005-Defense%20Evasion/T1562.004-Impair%20Defenses-Disable%20or%20Modify%20System%20Firewall
- https://www.winhelponline.com/blog/enable-and-disable-windows-firewall-quickly-using-command-line/
- https://www.securonix.com/blog/securonix-threat-labs-security-advisory-threat-actors-target-mssql-servers-in-dbjammer-to-deliver-freeworld-ransomware/
tags:
- attack.defense_evasion
- attack.t1562.004
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  category: process_creation
detection:
  selection_event:
    EventID: 4688
    NewProcessName|endswith: '\netsh.exe' # Full path "C:\Windows\system32\netsh.exe"

  selection_command:
    Commandline|contains|all: # full command 'netsh firewall set opmode disable'
      - firewall
      - set
      - opmode
      - disable

  selection_obfuscated: # full command 'netsh f s o d'
    Commandline|contains|all:
      - netsh
      - ' f*' # firewall
      - ' s*' # set
      - ' o*' # opmode
      - ' d*'  # disable
  condition: selection_event and (selection_command or selection_obfuscated)
falsepositives:
- Administrator activity
level: high

Stages and Predicates

Stage 0: condition

selection_event and (selection_command or selection_obfuscated)

Stage 1: selection_event

selection_event:
  EventID: 4688
  NewProcessName|endswith: '\netsh.exe'

Stage 2: selection_command

selection_command:
  Commandline|contains|all:
    - firewall
    - set
    - opmode
    - disable

Stage 3: selection_obfuscated

selection_obfuscated:
  Commandline|contains|all:
    - netsh
    - ' f*'
    - ' s*'
    - ' o*'
    - ' d*'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Commandlinematch
  • d*
  • f*
  • o*
  • s* corpus 2 (sigma 2)
  • disable corpus 13 (sigma 10, splunk 3)
  • firewall corpus 13 (sigma 7, splunk 6)
  • netsh corpus 9 (sigma 9)
  • opmode corpus 2 (sigma 2)
  • set corpus 11 (sigma 10, splunk 1)
NewProcessNameends_with
  • \netsh.exe corpus 28 (sigma 28)