Detection rules › Sigma
Firewall Disabled via Netsh.EXE
Detects netsh commands that turns off the Windows firewall
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment | T1686.003 Disable or Modify System Firewall: Windows Host Firewall |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
Rule body yaml
title: Firewall Disabled via Netsh.EXE
id: 57c4bf16-227f-4394-8ec7-1b745ee061c3
status: test
description: Detects netsh commands that turns off the Windows firewall
references:
- https://www.winhelponline.com/blog/enable-and-disable-windows-firewall-quickly-using-command-line/
- https://app.any.run/tasks/210244b9-0b6b-4a2c-83a3-04bd3175d017/
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1562.004/T1562.004.md#atomic-test-1---disable-microsoft-defender-firewall
author: Fatih Sirin
date: 2019-11-01
modified: 2023-02-13
tags:
- attack.defense-impairment
- attack.t1686.003
- attack.s0108
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\netsh.exe'
- OriginalFileName: 'netsh.exe'
selection_cli_1:
# Example: netsh firewall set opmode disable
CommandLine|contains|all:
- 'firewall'
- 'set'
- 'opmode'
- 'disable'
selection_cli_2:
# Example: netsh advfirewall set currentprofile state off
CommandLine|contains|all:
- 'advfirewall'
- 'set'
- 'state'
- 'off'
condition: selection_img and 1 of selection_cli_*
falsepositives:
- Legitimate administration activity
level: medium
Stages and Predicates
Stage 0: condition
selection_img and 1 of selection_cli_*Stage 1: selection_img
selection_img:
- Image|endswith: '\netsh.exe'
- OriginalFileName: 'netsh.exe'
Stage 2: selection_cli_1
selection_cli_1:
CommandLine|contains|all:
- 'firewall'
- 'set'
- 'opmode'
- 'disable'
Stage 3: selection_cli_2
selection_cli_2:
CommandLine|contains|all:
- 'advfirewall'
- 'set'
- 'state'
- 'off'
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 |
|---|---|---|
CommandLine | match |
|
Image | ends_with |
|
OriginalFileName | eq |
|