Detection rules › Sigma

Potential Remote Desktop Tunneling

Status
test
Severity
medium
Log source
category process_creation, product windows
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 Movement

Telemetry coverage

Rule body

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

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -L corpus 3 (sigma 3)
  • -P corpus 11 (sigma 7, splunk 4)
  • -R corpus 10 (sigma 10)
  • -pw
  • -ssh
  • :3389 corpus 4 (sigma 3, elastic 1)
field:"CommandLine" kind:match