Skip to content

Commit d2ca19a

Browse files
tccontret-contreraspatel-bhavin
authored
detection_fixed (#3746)
* detection_fixed * detection_fixed * detection_fixed * Update deprecation_mapping.YML --------- Co-authored-by: Teoderick Contreras <[email protected]> Co-authored-by: Bhavin Patel <[email protected]>
1 parent 58bf9a1 commit d2ca19a

File tree

3 files changed

+86
-4
lines changed

3 files changed

+86
-4
lines changed

detections/endpoint/windows_default_rdp_file_creation.yml renamed to detections/deprecated/windows_default_rdp_file_creation.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Windows Default RDP File Creation
22
id: 00ab0805-4b0f-489f-8eda-ee3de5ed5b1c
3-
version: 1
4-
date: '2025-07-30'
3+
version: 2
4+
date: '2025-10-27'
55
author: Teoderick Contreras, Splunk
6-
status: production
6+
status: deprecated
77
type: Anomaly
88
description: This detection monitors the creation or modification of the Default.rdp file, typically found in the user's Documents folder. This file is automatically generated or updated by the Remote Desktop Connection client (mstsc.exe) when a user initiates an RDP session. It stores connection settings such as the last-used hostname, screen size, and other preferences. The presence or update of this file strongly suggests that an RDP session has been launched from the system. Since this file is commonly overlooked, it can serve as a valuable artifact in identifying remote access activity, including potential lateral movement or attacker-controlled sessions.
99
data_source:
@@ -64,4 +64,4 @@ tests:
6464
attack_data:
6565
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1021.001/rdp_creation/deafault_rdp_created.log
6666
source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
67-
sourcetype: XmlWinEventLog
67+
sourcetype: XmlWinEventLog
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Windows Default RDP File Creation By Non MSTSC Process
2+
id: 692226f1-84e3-4f63-a747-d53e65699608
3+
version: 1
4+
date: '2025-10-27'
5+
author: Teoderick Contreras, Splunk
6+
status: production
7+
type: Anomaly
8+
description: This detection monitors the creation or modification of the Default.rdp file by non mstsc.exe process, typically found in the user's Documents folder. This file is automatically generated or updated by the Remote Desktop Connection client (mstsc.exe) when a user initiates an RDP session. It stores connection settings such as the last-used hostname, screen size, and other preferences. The presence or update of this file strongly suggests that an RDP session has been launched from the system. Since this file is commonly overlooked, it can serve as a valuable artifact in identifying remote access activity, including potential lateral movement or attacker-controlled sessions.
9+
data_source:
10+
- Sysmon EventID 1 AND Sysmon EventID 11
11+
search: '| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes
12+
where Processes.process_name != mstsc.exe
13+
by _time span=1h Processes.action Processes.dest Processes.original_file_name
14+
Processes.parent_process Processes.parent_process_exec Processes.parent_process_guid
15+
Processes.parent_process_id Processes.parent_process_name Processes.parent_process_path
16+
Processes.process Processes.process_exec Processes.process_guid Processes.process_hash
17+
Processes.process_id Processes.process_integrity_level Processes.process_name Processes.process_path
18+
Processes.user Processes.user_id Processes.vendor_product
19+
| `drop_dm_object_name(Processes)`
20+
|rename process_guid as proc_guid
21+
| join proc_guid, _time [ | tstats `security_content_summariesonly`
22+
count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem
23+
where Filesystem.file_name=default.rdp
24+
by _time span=1h Filesystem.dest Filesystem.file_create_time Filesystem.file_name Filesystem.file_path Filesystem.process_guid
25+
| `drop_dm_object_name(Filesystem)`
26+
|rename process_guid as proc_guid | fields _time dest file_create_time file_name file_path process_name process_path process proc_guid]
27+
| dedup file_create_time | table dest, process_name, process, file_create_time, file_name, file_path, proc_guid
28+
| `windows_default_rdp_file_creation_by_non_mstsc_process_filter`'
29+
how_to_implement: To successfully implement this search you need to be ingesting information
30+
on process that include the name of the process responsible for the changes from
31+
your endpoints into the `Endpoint` datamodel in the `Filesystem` node. In addition,
32+
confirm the latest CIM App 4.20 or higher is installed and the latest TA for the
33+
endpoint product.
34+
known_false_positives: False positives will be present, filter as needed or restrict
35+
to critical assets on the perimeter.
36+
references:
37+
- https://medium.com/@bonguides25/how-to-clear-rdp-connections-history-in-windows-cf0ffb67f344
38+
- https://thelocalh0st.github.io/posts/rdp/
39+
- https://iam0xc4t.medium.com/rogue-rdp-via-spear-phishing-initial-access-tactic-d7be328a0b13
40+
drilldown_searches:
41+
- name: View the detection results for - "$user$" and "$dest$"
42+
search: '%original_detection_search% | search user = "$user$" dest = "$dest$"'
43+
earliest_offset: $info_min_time$
44+
latest_offset: $info_max_time$
45+
- name: View risk events for the last 7 days for - "$user$" and "$dest$"
46+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$",
47+
"$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time)
48+
as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk
49+
Message" values(analyticstories) as "Analytic Stories" values(annotations._all)
50+
as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics"
51+
by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
52+
earliest_offset: $info_min_time$
53+
latest_offset: $info_max_time$
54+
rba:
55+
message: a file related to rdp connection named as default.rdp has been identified on $dest$.
56+
risk_objects:
57+
- field: dest
58+
type: system
59+
score: 20
60+
threat_objects: []
61+
tags:
62+
analytic_story:
63+
- Windows RDP Artifacts and Defense Evasion
64+
asset_type: Endpoint
65+
mitre_attack_id:
66+
- T1021.001
67+
product:
68+
- Splunk Enterprise
69+
- Splunk Enterprise Security
70+
- Splunk Cloud
71+
security_domain: endpoint
72+
tests:
73+
- name: True Positive Test
74+
attack_data:
75+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1021.001/susp_default_rdp_creation/default_rdp_dropped.log
76+
source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
77+
sourcetype: XmlWinEventLog

removed/deprecation_mapping.YML

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
detections:
2+
- content: Windows Default RDP File Creation
3+
removed_in_version: 5.20.0
4+
reason: Detections updated to use the new search logic and field names.
5+
replacement_content:
6+
- Windows Default RDP File Creation By Non MSTSC Process
27
- content: Windows Java Spawning Shells
38
removed_in_version: 5.20.0
49
reason: Detection has been deprecated in favor of a more broad and generic logic that aims to reduce overhead and increase coverage.

0 commit comments

Comments
 (0)