Detection rules › Sigma

RDP over Reverse SSH Tunnel WFP

Status
test
Severity
high
Log source
product windows, service security
Author
Samir Bousseaden
Source
github.com/SigmaHQ/sigma

Detects svchost hosting RDP termsvcs communicating with the loopback address

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: RDP over Reverse SSH Tunnel WFP
id: 5bed80b6-b3e8-428e-a3ae-d3c757589e41
status: test
description: Detects svchost hosting RDP termsvcs communicating with the loopback address
references:
    - https://twitter.com/SBousseaden/status/1096148422984384514
    - https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/44fbe85f72ee91582876b49678f9a26292a155fb/Command%20and%20Control/DE_RDP_Tunnel_5156.evtx
author: Samir Bousseaden
date: 2019-02-16
modified: 2022-09-02
tags:
    - attack.command-and-control
    - attack.lateral-movement
    - attack.t1090.001
    - attack.t1090.002
    - attack.t1021.001
    - car.2013-07-002
logsource:
    product: windows
    service: security
detection:
    selection:
        EventID: 5156
    sourceRDP:
        SourcePort: 3389
        DestAddress:
            - '127.*'
            - '::1'
    destinationRDP:
        DestPort: 3389
        SourceAddress:
            - '127.*'
            - '::1'
    filter_app_container:
        FilterOrigin: 'AppContainer Loopback'
    filter_thor:  # checking BlueKeep vulnerability
        Application|endswith:
            - '\thor.exe'
            - '\thor64.exe'
    condition: selection and ( sourceRDP or destinationRDP ) and not 1 of filter*
falsepositives:
    - Programs that connect locally to the RDP port
level: high

Stages and Predicates

Stage 0: condition

selection and ( sourceRDP or destinationRDP ) and not 1 of filter*

Stage 1: selection

selection:
    EventID: 5156

Stage 2: sourceRDP

sourceRDP:
    SourcePort: 3389
    DestAddress:
        - '127.*'
        - '::1'

Stage 3: destinationRDP

destinationRDP:
    DestPort: 3389
    SourceAddress:
        - '127.*'
        - '::1'

Stage 4: not filter*

filter_app_container:
    FilterOrigin: 'AppContainer Loopback'
filter_thor:
    Application|endswith:
        - '\thor.exe'
        - '\thor64.exe'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
Applicationends_with\thor.exe
Applicationends_with\thor64.exe
FilterOrigineqAppContainer Loopback

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
DestAddresswildcard
  • 127.*
  • ::1
DestPorteq
  • 3389 corpus 11 (kusto 4, elastic 3, sigma 2, splunk 2)
SourceAddresswildcard
  • 127.*
  • ::1 corpus 6 (sigma 5, elastic 1)
SourcePorteq
  • 3389 corpus 3 (sigma 3)