FortiSIEM Rules

Windows: RDP over Reverse SSH Tunnel WFP

Rule ID

PH_Rule_SIGMA_286

Default Status

Enabled

Description

Detects svchost hosting RDP termsvcs communicating with the loopback address. This rule is adapted from https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/security/win_security_rdp_reverse_tunnel.yml

Severity

7

Category

Security

MITRE ATT&CK® Tactics

Command And Control

MITRE ATT&CK® Techniques


T1090.002

Proxy: External Proxy

Adversaries may use an external proxy to act as an intermediary for network communications to a command and control server to avoid direct connections to their infrastructure. Many tools exist that enable traffic redirection through proxies or port redirection, including HTRAN, ZXProxy, and ZXPortMap. Adversaries use these types of proxies to manage command and control communications, to provide resiliency in the face of connection loss, or to ride over existing trusted communications paths to avoid suspicion. External connection proxies are used to mask the destination of C2 traffic and are typically implemented with port redirectors. Compromised systems outside of the victim environment may be used for these purposes, as well as purchased infrastructure such as cloud-based resources or virtual private servers.

https://attack.mitre.org/techniques/T1090/002

Impacts

Server

Data Source

Windows Security Log via OMI or FortiSIEM Agent

Detection

Correlation

Remediation Guidance

No remediation guidance specified

Time Window

If the following pattern or patterns match an ingested event within the given time window in seconds, trigger an incident.

300 seconds

Trigger Conditions

If the following defined pattern/s occur within a 300 second time window.

Filter

SubPattern Definitions

SubPattern Name: Filter

This is the named definition of the event query, this is important if multiple subpatterns are defined to distinguish them.

SubPattern Query

This is the query logic that matches incoming events

(eventType="Win-Security-5156" AND ((srcIpPort=3389 AND ( destIpAddr=::1 OR destIpAddr BETWEEN (127.0.0.0,127.255.255.255) )) OR (destIpPort=3389 AND ( srcIpAddr=::1 OR srcIpAddr BETWEEN (127.0.0.0,127.255.255.255) )))) AND ((filter!="AppContainer Loopback") AND (appName NOT REGEXP "\\thor64\.exe$|\\thor\.exe$"))

Group by Attributes

This defines how matching events are aggregated, only events with the same matching attribute values are grouped into one unique incident ID

appName,destIpAddr,destIpPort,filter,hostName,srcIpAddr,srcIpPort

Aggregate Constraint

This is most typically a numerical constraint that defines when the rule should trigger an incident

COUNT(*) >= 1

Incident Attribute Mapping

This section defines which fields in matching raw events should be mapped to the incident attributes in the resulting incident.

The available raw event attributes to map are limited to the group by attributes and the aggregate event constraint fields for each subpattern

appName = Filter.appName,
destIpAddr = Filter.destIpAddr,
destIpPort = Filter.destIpPort,
filter = Filter.filter,
hostName = Filter.hostName,
srcIpAddr = Filter.srcIpAddr,
srcIpPort = Filter.srcIpPort