Detection rules › Sigma

Firewall Rule Deleted Via Netsh.EXE

Status
test
Severity
medium
Log source
category process_creation, product windows
Author
frack113
Source
github.com/SigmaHQ/sigma

Detects the removal of a port or application rule in the Windows Firewall configuration using netsh

Known false positives

  • Legitimate administration activity
  • Software installations and removal

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Firewall Rule Deleted Via Netsh.EXE
id: 1a5fefe6-734f-452e-a07d-fc1c35bce4b2
status: test
description: Detects the removal of a port or application rule in the Windows Firewall configuration using netsh
references:
    - https://app.any.run/tasks/8bbd5b4c-b82d-4e6d-a3ea-d454594a37cc/
author: frack113
date: 2022-08-14
modified: 2025-10-07
tags:
    - attack.defense-impairment
    - attack.t1686.003
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\netsh.exe'
        - OriginalFileName: 'netsh.exe'
    selection_cli:
        CommandLine|contains|all:
            - 'firewall'
            - 'delete '
    filter_optional_dropbox:
        ParentImage|endswith: '\Dropbox.exe'
        CommandLine|contains: 'name=Dropbox'
    filter_optional_avast:
        ParentImage|endswith: '\instup.exe'
        CommandLine|contains: 'advfirewall firewall delete rule name="Avast Antivirus Admin Client"'
    condition: all of selection_* and not 1 of filter_optional_*
falsepositives:
    - Legitimate administration activity
    - Software installations and removal
level: medium

Stages and Predicates

Stage 0: condition

all of selection_* and not 1 of filter_optional_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\netsh.exe'
    - OriginalFileName: 'netsh.exe'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains|all:
        - 'firewall'
        - 'delete '

Stage 3: not filter_optional_*

filter_optional_dropbox:
    ParentImage|endswith: '\Dropbox.exe'
    CommandLine|contains: 'name=Dropbox'
filter_optional_avast:
    ParentImage|endswith: '\instup.exe'
    CommandLine|contains: 'advfirewall firewall delete rule name="Avast Antivirus Admin Client"'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CommandLinematchadvfirewall firewall delete rule name="Avast Antivirus Admin Client"excludes:CommandLine
ParentImageends_with\instup.exeexcludes:ParentImage field:"ParentImage" value:"\instup.exe"
CommandLinematchname=Dropboxexcludes:CommandLine field:"CommandLine" value:"name=Dropbox"
ParentImageends_with\Dropbox.exeexcludes:ParentImage field:"ParentImage" value:"\Dropbox.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • delete corpus 4 (sigma 4)
  • firewall corpus 13 (sigma 7, splunk 6)
field:"CommandLine" kind:match
Imageends_with
  • \netsh.exe corpus 28 (sigma 28)
field:"Image" kind:ends_with value:"\netsh.exe"
OriginalFileNameeq
  • netsh.exe corpus 23 (sigma 14, splunk 7, elastic 2)
field:"OriginalFileName" kind:eq value:"netsh.exe"