Detection rules › Sigma

RDP Port Forwarding Rule Added Via Netsh.EXE

Status
test
Severity
high
Log source
category process_creation, product windows
Author
Florian Roth (Nextron Systems), oscd.community
Source
github.com/SigmaHQ/sigma

Detects the execution of netsh to configure a port forwarding of port 3389 (RDP) rule

Known false positives

  • Legitimate administration activity

MITRE ATT&CK coverage

TacticTechniques
Command & Control

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: RDP Port Forwarding Rule Added Via Netsh.EXE
id: 782d6f3e-4c5d-4b8c-92a3-1d05fed72e63
status: test
description: Detects the execution of netsh to configure a port forwarding of port 3389 (RDP) rule
references:
    - https://www.fireeye.com/blog/threat-research/2019/01/bypassing-network-restrictions-through-rdp-tunneling.html
author: Florian Roth (Nextron Systems), oscd.community
date: 2019-01-29
modified: 2023-02-13
tags:
    - attack.lateral-movement
    - attack.command-and-control
    - attack.t1090
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\netsh.exe'
        - OriginalFileName: 'netsh.exe'
    selection_cli:
        CommandLine|contains|all:
            - ' i'
            - ' p'
            - '=3389'
            - ' c'
    condition: all of selection_*
falsepositives:
    - Legitimate administration activity
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

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

Stage 2: selection_cli

selection_cli:
    CommandLine|contains|all:
        - ' i'
        - ' p'
        - '=3389'
        - ' c'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • c
  • i corpus 2 (sigma 2)
  • p corpus 2 (sigma 2)
  • =3389
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"