Detection rules › Sigma
Firewall rule added using PowerShell or CMD
Detects scenarios where a firewall rule is added using PowerShell or CMD.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | T1562.004 Impair Defenses: Disable or Modify System Firewall |
Event coverage
| Provider | Event |
|---|---|
| Windows-Firewall-With-Advanced-Security | Event ID 2004 |
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
selectionStage 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.
| Field | Kind | Values |
|---|---|---|
ModifyingApplication | ends_with |
|