Detection rules › Splunk
Event Logs Queried for RDP Sessions (Sysmon)
Threat actors may query Windows Terminal Services logs for RDP session information. - Example 1: During post-compromise reconnaissance activities, Lazarus was observed using wevtutil to query Windows Terminal Services logs for RDP sessions (Event Code 25) in order to gather session reconnection information. - Example 2: Threat actor tracked as Cluster Charlie (STAC1305) searched Windows Event Logs for Windows Remote Connection Manager event ID 1149 -- This use case detects commands querying Terminal Services logs for event 25 for user disconnection or event 1149 for records of successful Remote Desktop Services (RDP) logon attempt. While threat actors will most likely be using wevtutil to perform the queries, it has been omitted from the logic to account for instances where it has been renamed
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Discovery | T1082 System Information Discovery |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
Rule body yaml
id: '25100.46547'
title: Event Logs Queried for RDP Sessions
description: 'Threat actors may query Windows Terminal Services logs for RDP session
information. - Example 1: During post-compromise reconnaissance activities, Lazarus
was observed using wevtutil to query Windows Terminal Services logs for RDP sessions
(Event Code 25) in order to gather session reconnection information. - Example 2:
Threat actor tracked as Cluster Charlie (STAC1305) searched Windows Event Logs for
Windows Remote Connection Manager event ID 1149 -- This use case detects commands
querying Terminal Services logs for event 25 for user disconnection or event 1149
for records of successful Remote Desktop Services (RDP) logon attempt. While threat
actors will most likely be using wevtutil to perform the queries, it has been omitted
from the logic to account for instances where it has been renamed. -- Threat Actor
Association: Cluster Charlie (STAC1305), Lazarus'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
("qe" OR "Query-Event") "Microsoft-Windows-TerminalServices-LocalSessionManager/Operational"
("EventID=25" OR "EventID=1149") | table _time, host, user, process, process_*,
user, parent_process_name, parent_process_path | bin span=1s | stats values(*) as
* by _time, host '
techniques:
- discovery:system information discovery
technique_id:
- T1082
data_category:
- Windows Sysmon
references:
- https://blog.talosintelligence.com/lazarus_new_rats_dlang_and_telegram/
- https://news.sophos.com/en-us/2024/09/10/crimson-palace-new-tools-tactics-targets/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") ("qe" OR "Query-Event") "Microsoft-Windows-TerminalServices-LocalSessionManager/Operational" ("EventID=25" OR "EventID=1149")
Stage 2: table
| table _time, host, user, process, process_*, user, parent_process_name, parent_process_path
Stage 3: bucket
| bin span=1s
Stage 4: stats
| stats values(*) as * by _time, host
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 |
|---|---|---|
EventCode | eq |
|
Search terms
Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.
| Stage | Term |
|---|---|
| 1 | TERM |
| 1 | "<EventID>1<" |
| 1 | "qe" |
| 1 | "Query-Event" |
| 1 | "Microsoft-Windows-TerminalServices-LocalSessionManager/Operational" |
| 1 | "EventID=25" |
| 1 | "EventID=1149" |