Detection rules › Sigma
RDP over Reverse SSH Tunnel WFP
Detects svchost hosting RDP termsvcs communicating with the loopback address
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement | T1021.001 Remote Services: Remote Desktop Protocol |
| Command & Control | T1090.001 Proxy: Internal Proxy, T1090.002 Proxy: External Proxy |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 5156 | The Windows Filtering Platform has permitted a connection. |
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.
| Field | Kind | Excluded values |
|---|---|---|
Application | ends_with | \thor.exe |
Application | ends_with | \thor64.exe |
FilterOrigin | eq | AppContainer 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.
| Field | Kind | Values |
|---|---|---|
DestAddress | wildcard |
|
DestPort | eq |
|
SourceAddress | wildcard |
|
SourcePort | eq |
|