← Library
splApache-2.0from splunk/security_content

Windows Default RDP File Creation By Non MSTSC Process

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.

Quality
59
FP risk
Forks
0
Views
0
Rule sourcedetections/endpoint/windows_default_rdp_file_creation_by_non_mstsc_process.yml
| 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`
Windows Default RDP File Creation By Non MSTSC Process · SPL rule | DetectionLint