From d254729f9b8e04ff2560633303bde2ac275f90d8 Mon Sep 17 00:00:00 2001 From: Steven Dick <38897662+nterl0k@users.noreply.github.com> Date: Thu, 13 Feb 2025 19:37:50 -0500 Subject: [PATCH 1/4] Add files via upload --- ...ity_telemetry_suspicious_child_process.yml | 65 +++++++++++++++++ ...y_telemetry_tampering_through_registry.yml | 69 +++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 detections/endpoint/windows_compatibility_telemetry_suspicious_child_process.yml create mode 100644 detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml diff --git a/detections/endpoint/windows_compatibility_telemetry_suspicious_child_process.yml b/detections/endpoint/windows_compatibility_telemetry_suspicious_child_process.yml new file mode 100644 index 0000000000..14435b76f1 --- /dev/null +++ b/detections/endpoint/windows_compatibility_telemetry_suspicious_child_process.yml @@ -0,0 +1,65 @@ +name: Windows Compatibility Telemetry Suspicious Child Process +id: 56fe46ca-ffef-46fe-8f0e-5cd4b7b4cc0c +version: 1 +date: '2025-02-13' +author: Steven Dick +status: production +type: TTP +description: The following analytic detects the execution of CompatTelRunner.exe with parameters indicative of a process not part of the normal "Microsoft Compatibility Appraiser" telemetry collection. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process names, parent processes, and command-line arguments. This activity is significant because CompatTelRunner.exe and the "Microsoft Compatibility Appraiser" task always run as System and can be used to elevate privileges or establish a highly privileged persistence mechanism. If confirmed malicious, this could enable unauthorized code execution, privilege escalation, or persistent access to the compromised system. +data_source: +- Windows Security Event ID 4688 +- Sysmon Event ID 1 +- CrowdStrike ProcessRollup2 +search: |- + | tstats `security_content_summariesonly` values(Processes.parent_process) as Processes.parent_process, values(Processes.process) as Processes.process values(Processes.process_current_directory) AS process_current_directory, values(Processes.process_id) as Processes.process_id, values(Processes.process_guid) as Processes.process_guid, count min(_time) AS firstTime, max(_time) AS lastTime FROM datamodel=Endpoint.Processes where Processes.parent_process_name = "CompatTelRunner.exe" AND Processes.process="* -cv:*" NOT Processes.process IN ("* -m:*") BY _time span=1h Processes.user Processes.dest Processes.parent_process_name Processes.process_name + |`drop_dm_object_name(Processes)` + | `security_content_ctime(firstTime)` + | `security_content_ctime(lastTime)` + | `windows_compatibility_telemetry_suspicious_child_process_filter` +how_to_implement: The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the `Processes` node of the `Endpoint` data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process. +known_false_positives: None identified +references: +- https://attack.mitre.org/techniques/T1546/ +- https://scythe.io/threat-thursday/windows-telemetry-persistence +- https://www.trustedsec.com/blog/abusing-windows-telemetry-for-persistence +drilldown_searches: +- name: View the detection results for - "$dest$" + search: '%original_detection_search% | search dest = "$dest$"' + earliest_offset: $info_min_time$ + latest_offset: $info_max_time$ +- name: View risk events for the last 7 days for - "$dest$" + search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") starthoursago=168 | 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: $info_min_time$ + latest_offset: $info_max_time$ +- name: Investigate processes on $dest$ + search: '| from datamodel Endpoint.Processes +| search dest = "$dest$" AND process_name = "$process_name$"' + earliest_offset: $info_min_time$ + latest_offset: $info_max_time$ +rba: + message: The process $process_name$ was launched in a suspicious manner by $parent_process_name$ on host $dest$ + risk_objects: + - field: dest + type: system + score: 70 + threat_objects: + - field: process_name + type: process +tags: + analytic_story: + - Windows Persistence Techniques + asset_type: Endpoint + mitre_attack_id: + - T1546 + - T1053.005 + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + security_domain: endpoint +tests: +- name: True Positive Test + attack_data: + - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546/compattelrunner_abuse/compattelrunner_abuse.log + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational + sourcetype: XmlWinEventLog \ No newline at end of file diff --git a/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml b/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml new file mode 100644 index 0000000000..b7f978477d --- /dev/null +++ b/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml @@ -0,0 +1,69 @@ +name: Windows Compatibility Telemetry Tampering Through Registry +id: 43834687-cc48-4878-a2fa-f76e4271791f +version: 1 +date: '2025-02-13' +author: Steven Dick +status: production +type: TTP +description: The process $process_name$ was launched in a suspicious manner by $parent_process_name$ on host $dest$ ----- The following analytic detects the execution of CompatTelRunner.exe with parameters indicative of a process not part of the normal "Microsoft Compatibility Appraiser" telemetry collection. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process names, parent processes, and command-line arguments. This activity is significant because CompatTelRunner.exe and the "Microsoft Compatibility Appraiser" task always run as System and can be used to elevate privileges or establish a highly privileged persistence mechanism. If confirmed malicious, this could enable unauthorized code execution, privilege escalation, or persistent access to the compromised system. +data_source: +- Sysmon Event ID 12 +- Sysmon Event ID 13 +- Sysmon Event ID 14 +search: |- + | tstats `security_content_summariesonly` min(_time) as firstTime, max(_time) as lastTime, count FROM datamodel=Endpoint.Registry WHERE (Registry.registry_path = "*\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\TelemetryController*" AND Registry.registry_value_name="Command" NOT Registry.registry_value_data IN ("(empty)")) BY Registry.dest Registry.user Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.registry_value_data Registry.process_guid + | `drop_dm_object_name(Registry)` + | eval process = registry_value_data + | `security_content_ctime(firstTime)` + | `security_content_ctime(lastTime)` + | `windows_compatibility_telemetry_tampering_through_registry_filter` +how_to_implement: The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the `Processes` node of the `Endpoint` data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process. +known_false_positives: None identified +references: +- https://attack.mitre.org/techniques/T1546/ +- https://scythe.io/threat-thursday/windows-telemetry-persistence +- https://www.trustedsec.com/blog/abusing-windows-telemetry-for-persistence +drilldown_searches: +- name: View the detection results for - "$dest$" and "$user$" + search: '%original_detection_search% | search dest = "$dest$" user = "$user$"' + earliest_offset: $info_min_time$ + latest_offset: $info_max_time$ +- name: View risk events for the last 7 days for - "$dest$" and "$user$" + search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$","$dest$") starthoursago=168 | 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: $info_min_time$ + latest_offset: $info_max_time$ +- name: Investigate registry changes on $dest$ + search: '| from datamodel Endpoint.Registry +| search registry_path = "*\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\TelemetryController*" AND dest = "$dest$"' + earliest_offset: $info_min_time$ + latest_offset: $info_max_time$ +rba: + message: The process $process$ was added to registry settings for the Compatibility Appraiser by $user$ on host $dest$ + risk_objects: + - field: dest + type: system + score: 70 + - field: user + type: user + score: 70 + threat_objects: + - field: process + type: process +tags: + analytic_story: + - Windows Persistence Techniques + asset_type: Endpoint + mitre_attack_id: + - T1546 + - T1053.005 + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + security_domain: endpoint +tests: +- name: True Positive Test + attack_data: + - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546/compattelrunner_abuse/compattelrunner_abuse.log + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational + sourcetype: XmlWinEventLog \ No newline at end of file From 4d04bccb695e08195e99f65cfd131c6efa4c4037 Mon Sep 17 00:00:00 2001 From: Steven Dick <38897662+nterl0k@users.noreply.github.com> Date: Wed, 19 Feb 2025 14:24:38 -0500 Subject: [PATCH 2/4] Update detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml As you say Co-authored-by: Nasreddine Bencherchali --- ...ndows_compatibility_telemetry_tampering_through_registry.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml b/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml index b7f978477d..3f665c4c4a 100644 --- a/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml +++ b/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml @@ -7,9 +7,7 @@ status: production type: TTP description: The process $process_name$ was launched in a suspicious manner by $parent_process_name$ on host $dest$ ----- The following analytic detects the execution of CompatTelRunner.exe with parameters indicative of a process not part of the normal "Microsoft Compatibility Appraiser" telemetry collection. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process names, parent processes, and command-line arguments. This activity is significant because CompatTelRunner.exe and the "Microsoft Compatibility Appraiser" task always run as System and can be used to elevate privileges or establish a highly privileged persistence mechanism. If confirmed malicious, this could enable unauthorized code execution, privilege escalation, or persistent access to the compromised system. data_source: -- Sysmon Event ID 12 - Sysmon Event ID 13 -- Sysmon Event ID 14 search: |- | tstats `security_content_summariesonly` min(_time) as firstTime, max(_time) as lastTime, count FROM datamodel=Endpoint.Registry WHERE (Registry.registry_path = "*\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\TelemetryController*" AND Registry.registry_value_name="Command" NOT Registry.registry_value_data IN ("(empty)")) BY Registry.dest Registry.user Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.registry_value_data Registry.process_guid | `drop_dm_object_name(Registry)` From e66e5e364c941b2cd94d8f1f96beea7e319c578a Mon Sep 17 00:00:00 2001 From: Steven Dick <38897662+nterl0k@users.noreply.github.com> Date: Wed, 19 Feb 2025 14:26:38 -0500 Subject: [PATCH 3/4] Update windows_compatibility_telemetry_tampering_through_registry.yml description updated --- ...ows_compatibility_telemetry_tampering_through_registry.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml b/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml index 3f665c4c4a..e2c81f0363 100644 --- a/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml +++ b/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml @@ -5,7 +5,7 @@ date: '2025-02-13' author: Steven Dick status: production type: TTP -description: The process $process_name$ was launched in a suspicious manner by $parent_process_name$ on host $dest$ ----- The following analytic detects the execution of CompatTelRunner.exe with parameters indicative of a process not part of the normal "Microsoft Compatibility Appraiser" telemetry collection. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process names, parent processes, and command-line arguments. This activity is significant because CompatTelRunner.exe and the "Microsoft Compatibility Appraiser" task always run as System and can be used to elevate privileges or establish a highly privileged persistence mechanism. If confirmed malicious, this could enable unauthorized code execution, privilege escalation, or persistent access to the compromised system. +description: The following analytic detects the execution of CompatTelRunner.exe with parameters indicative of a process not part of the normal "Microsoft Compatibility Appraiser" telemetry collection. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process names, parent processes, and command-line arguments. This activity is significant because CompatTelRunner.exe and the "Microsoft Compatibility Appraiser" task always run as System and can be used to elevate privileges or establish a highly privileged persistence mechanism. If confirmed malicious, this could enable unauthorized code execution, privilege escalation, or persistent access to the compromised system. data_source: - Sysmon Event ID 13 search: |- @@ -64,4 +64,4 @@ tests: attack_data: - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546/compattelrunner_abuse/compattelrunner_abuse.log source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational - sourcetype: XmlWinEventLog \ No newline at end of file + sourcetype: XmlWinEventLog From dac07f62d0c4e00bd23203a59588f71e4d379a25 Mon Sep 17 00:00:00 2001 From: Nasreddine Bencherchali Date: Wed, 19 Feb 2025 20:59:45 +0100 Subject: [PATCH 4/4] Update windows_compatibility_telemetry_tampering_through_registry.yml --- ...ndows_compatibility_telemetry_tampering_through_registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml b/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml index e2c81f0363..499d13543b 100644 --- a/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml +++ b/detections/endpoint/windows_compatibility_telemetry_tampering_through_registry.yml @@ -5,7 +5,7 @@ date: '2025-02-13' author: Steven Dick status: production type: TTP -description: The following analytic detects the execution of CompatTelRunner.exe with parameters indicative of a process not part of the normal "Microsoft Compatibility Appraiser" telemetry collection. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process names, parent processes, and command-line arguments. This activity is significant because CompatTelRunner.exe and the "Microsoft Compatibility Appraiser" task always run as System and can be used to elevate privileges or establish a highly privileged persistence mechanism. If confirmed malicious, this could enable unauthorized code execution, privilege escalation, or persistent access to the compromised system. +description: This detection identifies suspicious modifications to the Windows Compatibility Telemetry registry settings, specifically within the "TelemetryController" registry key and "Command" registry value. It leverages data from the Endpoint.Registry data model, focusing on registry paths and values indicative of such changes. This activity is significant because CompatTelRunner.exe and the "Microsoft Compatibility Appraiser" task always run as System and can be used to elevate privileges or establish a highly privileged persistence mechanism. If confirmed malicious, this could enable unauthorized code execution, privilege escalation, or persistent access to the compromised system. data_source: - Sysmon Event ID 13 search: |-