|
| 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 |
0 commit comments