Detection rules › Sigma
OpenSSH server firewall configuration on Windows (command)
Detects scenarios where an attacker configure the Windows firewall to allow incoming connections to perform stealthy lateral movement.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | T1562.004 Impair Defenses: Disable or Modify System Firewall |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4688 | A new process has been created. |
Rule body yaml
title: OpenSSH server firewall configuration on Windows (command)
description: Detects scenarios where an attacker configure the Windows firewall to allow incoming connections to perform stealthy lateral movement.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0008-Lateral%20Movement/T1021.004-Remote%20Service%20SSH
- https://winaero.com/enable-openssh-server-windows-10/
- https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
- https://virtualizationreview.com/articles/2020/05/21/ssh-server-on-windows-10.aspx
tags:
- attack.defense_evasion
- attack.t1562.004
author: mdecrevoisier
status: experimental
logsource:
product: windows
category: process_creation
detection:
selection_event:
EventID: 4688
selection_netsh_adv: # Command for firewall rule creation (available starting Server 2012 R2)
CommandLine|contains|all:
- netsh
- advfirewall
- localport=
- '22'
selection_netsh: # Command for firewall rule creation (deprecated)
CommandLine|contains|all:
- netsh
- firewall
- portopening
- '22'
condition: selection_event and (selection_netsh_adv or selection_netsh)
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selection_event and (selection_netsh_adv or selection_netsh)Stage 1: selection_event
selection_event:
EventID: 4688
Stage 2: selection_netsh_adv
selection_netsh_adv:
CommandLine|contains|all:
- netsh
- advfirewall
- localport=
- '22'
Stage 3: selection_netsh
selection_netsh:
CommandLine|contains|all:
- netsh
- firewall
- portopening
- '22'
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 |
|