Detection rules › Sigma

Firewall rule added using PowerShell or CMD

Status
experimental
Severity
medium
Log source
product windows, service firewall-as
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where a firewall rule is added using PowerShell or CMD.

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Firewall rule added using PowerShell or CMD
description: Detects scenarios where a firewall rule is added using PowerShell or CMD.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0005-Defense%20Evasion/T1562.004-Impair%20Defenses-Disable%20or%20Modify%20System%20Firewall
- https://kb.eventtracker.com/evtpass/evtPages/EventId_2004_Microsoft-Windows-WindowsFirewallwithAdvancedS_65673.asp
tags:
- attack.defense_evasion
- attack.t1562.004
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  service: firewall-as
detection:
  selection:
    EventID: 2004
    ModifyingApplication|endswith:
      - '\WmiPrvSE.exe' # PowerShell
      - '\netsh.exe' # CMD console
  condition: selection
falsepositives:
- Administrator activity
- New application installation
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
  EventID: 2004
  ModifyingApplication|endswith:
    - '\WmiPrvSE.exe'
    - '\netsh.exe'

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
ModifyingApplicationends_with
  • \WmiPrvSE.exe
  • \netsh.exe