Detection rules › Sigma

Potential Remote Desktop Tunneling

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
Tim Rauch, Elastic (idea)
Source
github.com/SigmaHQ/sigma

Detects potential use of an SSH utility to establish RDP over a reverse SSH Tunnel. This can be used by attackers to enable routing of network packets that would otherwise not reach their intended destination.

MITRE ATT&CK coverage

TacticTechniques
Lateral MovementT1021 Remote Services

Event coverage

Rule body yaml

title: Potential Remote Desktop Tunneling
id: 8a3038e8-9c9d-46f8-b184-66234a160f6f
status: test
description: Detects potential use of an SSH utility to establish RDP over a reverse SSH Tunnel. This can be used by attackers to enable routing of network packets that would otherwise not reach their intended destination.
references:
    - https://www.elastic.co/guide/en/security/current/potential-remote-desktop-tunneling-detected.html
author: Tim Rauch, Elastic (idea)
date: 2022-09-27
tags:
    - attack.lateral-movement
    - attack.t1021
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        CommandLine|contains: ':3389' # RDP port and usual SSH tunneling related switches in command line
    selection_opt:
        CommandLine|contains:
            - ' -L '
            - ' -P '
            - ' -R '
            - ' -pw '
            - ' -ssh '
    condition: all of selection*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection*

Stage 1: selection

selection:
    CommandLine|contains: ':3389'

Stage 2: selection_opt

selection_opt:
    CommandLine|contains:
        - ' -L '
        - ' -P '
        - ' -R '
        - ' -pw '
        - ' -ssh '

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.

FieldKindValues
CommandLinematch
  • -L corpus 3 (sigma 3)
  • -P corpus 10 (sigma 7, splunk 3)
  • -R corpus 10 (sigma 10)
  • -pw
  • -ssh
  • :3389 corpus 3 (sigma 3)