Detectionmediumtest
New Firewall Rule Added Via Netsh.EXE
Detects the addition of a new rule to the Windows firewall via netsh
Markus Neis, Sander WiebingCreated 2019-01-29Updated 2023-02-10cd5cfd80-aa5f-44c0-9c20-108c4ae12e3cwindows
Log Source
WindowsProcess Creation
ProductWindows← raw: windows
CategoryProcess Creation← raw: process_creation
Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.
Detection Logic
Detection Logic3 selectors
detection:
selection_img:
- Image|endswith: '\netsh.exe'
- OriginalFileName: 'netsh.exe'
selection_cli:
CommandLine|contains|all:
- ' firewall '
- ' add '
filter_optional_dropbox:
CommandLine|contains:
- 'advfirewall firewall add rule name=Dropbox dir=in action=allow "program=?:\Program Files (x86)\Dropbox\Client\Dropbox.exe" enable=yes profile=Any'
- 'advfirewall firewall add rule name=Dropbox dir=in action=allow "program=?:\Program Files\Dropbox\Client\Dropbox.exe" enable=yes profile=Any'
condition: all of selection_* and not 1 of filter_optional_*False Positives
Legitimate administration activity
Software installations
References
MITRE ATT&CK
Tactics
Sub-techniques
Software
Rule Metadata
Rule ID
cd5cfd80-aa5f-44c0-9c20-108c4ae12e3c
Status
test
Level
medium
Type
Detection
Created
2019-01-29
Modified
2023-02-10
Author
Path
rules/windows/process_creation/proc_creation_win_netsh_fw_add_rule.yml
Raw Tags
attack.defense-impairmentattack.t1686.003attack.s0246