Detection rules › Sigma

Windows Firewall Disabled via PowerShell

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
Tim Rauch, Elastic (idea)
Source
github.com/SigmaHQ/sigma

Detects attempts to disable the Windows Firewall using PowerShell

MITRE ATT&CK coverage

TacticTechniques
Defense ImpairmentT1685 Disable or Modify Tools

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Windows Firewall Disabled via PowerShell
id: 12f6b752-042d-483e-bf9c-915a6d06ad75
related:
    - id: 488b44e7-3781-4a71-888d-c95abfacf44d
      type: similar
status: test
description: Detects attempts to disable the Windows Firewall using PowerShell
references:
    - https://www.elastic.co/guide/en/security/current/windows-firewall-disabled-via-powershell.html
author: Tim Rauch, Elastic (idea)
date: 2022-09-14
modified: 2023-02-13
tags:
    - attack.defense-impairment
    - attack.t1685
logsource:
    category: process_creation
    product: windows
detection:
    selection_name:
        - Image|endswith:
              - '\powershell.exe'
              - '\pwsh.exe'
              - '\powershell_ise.exe'
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'pwsh.dll'
    selection_args:
        CommandLine|contains|all:
            - 'Set-NetFirewallProfile '
            - ' -Enabled '
            - ' False'
    selection_opt:
        CommandLine|contains:
            - ' -All '
            - 'Public'
            - 'Domain'
            - 'Private'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_name

selection_name:
    - Image|endswith:
          - '\powershell.exe'
          - '\pwsh.exe'
          - '\powershell_ise.exe'
    - OriginalFileName:
          - 'PowerShell.EXE'
          - 'pwsh.dll'

Stage 2: selection_args

selection_args:
    CommandLine|contains|all:
        - 'Set-NetFirewallProfile '
        - ' -Enabled '
        - ' False'

Stage 3: selection_opt

selection_opt:
    CommandLine|contains:
        - ' -All '
        - 'Public'
        - 'Domain'
        - 'Private'

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
  • -All
  • -Enabled
  • False
  • Domain corpus 2 (sigma 2)
  • Private
  • Public
  • Set-NetFirewallProfile
Imageends_with
  • \powershell.exe corpus 182 (sigma 182)
  • \powershell_ise.exe corpus 41 (sigma 41)
  • \pwsh.exe corpus 168 (sigma 168)
OriginalFileNameeq
  • PowerShell.EXE corpus 120 (sigma 84, splunk 30, elastic 6)
  • pwsh.dll corpus 112 (sigma 79, splunk 30, elastic 3)