Detection rules › Splunk

Windows Default RDP File Creation By Non MSTSC Process

Status
production
Severity
low
Group by
IntegrityLevel, _time, command_line, computer_name, event_action, original_file_name, parent_command_line, parent_process_guid, parent_process_id, parent_process_name, proc_guid, process_guid, process_hash, process_id, process_name, user, user_id, vendor_product
Author
Teoderick Contreras, Splunk
Source
github.com/splunk/security_content

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.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation
SysmonEvent ID 11FileCreate

Rule body splunk

name: Windows Default RDP File Creation By Non MSTSC Process
id: 692226f1-84e3-4f63-a747-d53e65699608
version: 5
creation_date: '2025-10-27'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
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.
data_source:
    - Sysmon EventID 1 AND Sysmon EventID 11
search: |-
    | tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes
      WHERE Processes.process_name != mstsc.exe
      BY _time span=1h Processes.action
         Processes.dest Processes.original_file_name Processes.parent_process
         Processes.parent_process_exec Processes.parent_process_guid Processes.parent_process_id
         Processes.parent_process_name Processes.parent_process_path Processes.process
         Processes.process_exec Processes.process_guid Processes.process_hash
         Processes.process_id Processes.process_integrity_level Processes.process_name
         Processes.process_path Processes.user Processes.user_id
         Processes.vendor_product
    | `drop_dm_object_name(Processes)`
    | rename process_guid as proc_guid
    | join proc_guid, _time [
    | tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem
      WHERE Filesystem.file_name=default.rdp
      BY _time span=1h Filesystem.dest
         Filesystem.file_create_time Filesystem.file_name Filesystem.file_path
         Filesystem.process_guid
    | `drop_dm_object_name(Filesystem)`
    | rename process_guid as proc_guid
    | fields _time dest file_create_time file_name file_path process_name process_path process proc_guid]
    | dedup file_create_time
    | table dest, process_name, process, file_create_time, file_name, file_path, proc_guid
    | `windows_default_rdp_file_creation_by_non_mstsc_process_filter`
how_to_implement: To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Filesystem` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.
known_false_positives: False positives will be present, filter as needed or restrict to critical assets on the perimeter.
references:
    - https://medium.com/@bonguides25/how-to-clear-rdp-connections-history-in-windows-cf0ffb67f344
    - https://thelocalh0st.github.io/posts/rdp/
    - https://iam0xc4t.medium.com/rogue-rdp-via-spear-phishing-initial-access-tactic-d7be328a0b13
drilldown_searches:
    - name: View the detection results for - "$user$" and "$dest$"
      search: '%original_detection_search% | search  user = "$user$" dest = "$dest$"'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
    - name: View risk events for the last 7 days for - "$user$" and "$dest$"
      search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$", "$dest$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
      earliest_offset: 7d
      latest_offset: "0"
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 20
          message: a file related to rdp connection named as default.rdp has been identified on $dest$.
analytic_story:
    - Windows RDP Artifacts and Defense Evasion
asset_type: Endpoint
mitre_attack_id:
    - T1021.001
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1021.001/susp_default_rdp_creation/default_rdp_dropped.log
          source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
          sourcetype: XmlWinEventLog
      test_type: unit

Stages and Predicates

Stage 1: tstats

| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes
  WHERE Processes.process_name != mstsc.exe
  BY _time span=1h Processes.action
     Processes.dest Processes.original_file_name Processes.parent_process
     Processes.parent_process_exec Processes.parent_process_guid Processes.parent_process_id
     Processes.parent_process_name Processes.parent_process_path Processes.process
     Processes.process_exec Processes.process_guid Processes.process_hash
     Processes.process_id Processes.process_integrity_level Processes.process_name
     Processes.process_path Processes.user Processes.user_id
     Processes.vendor_product

Stage 2: search

| `drop_dm_object_name(Processes)`

Stage 3: rename

| rename process_guid as proc_guid

Stage 4: join

| join proc_guid, _time [
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem
  WHERE Filesystem.file_name=default.rdp
  BY _time span=1h Filesystem.dest
     Filesystem.file_create_time Filesystem.file_name Filesystem.file_path
     Filesystem.process_guid
| `drop_dm_object_name(Filesystem)`
| rename process_guid as proc_guid
| fields _time dest file_create_time file_name file_path process_name process_path process proc_guid]

Stage 5: dedup

| dedup file_create_time

Stage 6: table

| table dest, process_name, process, file_create_time, file_name, file_path, proc_guid

Stage 7: search

| `windows_default_rdp_file_creation_by_non_mstsc_process_filter`

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.

FieldKindValues
Filesystem.file_nameeq
  • "default.rdp"
Processes.process_namene
  • mstsc.exe