From 41c823ef557f8ed9fa1bf82812a767077da61a26 Mon Sep 17 00:00:00 2001 From: tccontre Date: Thu, 15 Jun 2023 17:19:38 +0200 Subject: [PATCH 1/3] win_modify_reg_correlation --- detections/endpoint/disable_registry_tool.yml | 1 + .../endpoint/disable_show_hidden_files.yml | 3 +- .../endpoint/disable_windows_app_hotkeys.yml | 1 + .../endpoint/disabling_cmd_application.yml | 1 + .../endpoint/disabling_controlpanel.yml | 1 + .../endpoint/disabling_norun_windows_app.yml | 1 + .../windows_modify_registry_risk_behavior.yml | 71 +++++++++++++++++++ 7 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 detections/endpoint/windows_modify_registry_risk_behavior.yml diff --git a/detections/endpoint/disable_registry_tool.yml b/detections/endpoint/disable_registry_tool.yml index a2999d35ef..98934e509c 100644 --- a/detections/endpoint/disable_registry_tool.yml +++ b/detections/endpoint/disable_registry_tool.yml @@ -36,6 +36,7 @@ tags: mitre_attack_id: - T1562.001 - T1562 + - T1112 observable: - name: dest type: Endpoint diff --git a/detections/endpoint/disable_show_hidden_files.yml b/detections/endpoint/disable_show_hidden_files.yml index c8b289b0eb..d9e1532ef8 100644 --- a/detections/endpoint/disable_show_hidden_files.yml +++ b/detections/endpoint/disable_show_hidden_files.yml @@ -4,7 +4,7 @@ version: 4 date: '2023-04-27' author: Steven Dick, Teoderick Contreras, Splunk status: production -type: TTP +type: Anomaly description: The following analytic is to identify a modification in the Windows registry to prevent users from seeing all the files with hidden attributes. This event or techniques are known on some worm and trojan spy malware that will drop hidden files @@ -40,6 +40,7 @@ tags: - T1562.001 - T1564 - T1562 + - T1112 observable: - name: dest type: Endpoint diff --git a/detections/endpoint/disable_windows_app_hotkeys.yml b/detections/endpoint/disable_windows_app_hotkeys.yml index b1df2a632d..87b8a20115 100644 --- a/detections/endpoint/disable_windows_app_hotkeys.yml +++ b/detections/endpoint/disable_windows_app_hotkeys.yml @@ -37,6 +37,7 @@ tags: mitre_attack_id: - T1562.001 - T1562 + - T1112 observable: - name: dest type: Endpoint diff --git a/detections/endpoint/disabling_cmd_application.yml b/detections/endpoint/disabling_cmd_application.yml index ec95a0ef58..c062655432 100644 --- a/detections/endpoint/disabling_cmd_application.yml +++ b/detections/endpoint/disabling_cmd_application.yml @@ -35,6 +35,7 @@ tags: mitre_attack_id: - T1562.001 - T1562 + - T1112 observable: - name: user type: User diff --git a/detections/endpoint/disabling_controlpanel.yml b/detections/endpoint/disabling_controlpanel.yml index f4cc6bd865..86499c478f 100644 --- a/detections/endpoint/disabling_controlpanel.yml +++ b/detections/endpoint/disabling_controlpanel.yml @@ -34,6 +34,7 @@ tags: mitre_attack_id: - T1562.001 - T1562 + - T1112 observable: - name: user type: User diff --git a/detections/endpoint/disabling_norun_windows_app.yml b/detections/endpoint/disabling_norun_windows_app.yml index 4d3e5e7bf6..8309f26d9a 100644 --- a/detections/endpoint/disabling_norun_windows_app.yml +++ b/detections/endpoint/disabling_norun_windows_app.yml @@ -38,6 +38,7 @@ tags: mitre_attack_id: - T1562.001 - T1562 + - T1112 observable: - name: user type: User diff --git a/detections/endpoint/windows_modify_registry_risk_behavior.yml b/detections/endpoint/windows_modify_registry_risk_behavior.yml new file mode 100644 index 0000000000..ed6e0d1d82 --- /dev/null +++ b/detections/endpoint/windows_modify_registry_risk_behavior.yml @@ -0,0 +1,71 @@ +name: Windows Modify Registry Risk Behavior +id: 5eb479b1-a5ea-4e01-8365-780078613776 +version: 1 +date: '2023-06-15' +author: Teoderick Contreras, Splunk +status: production +type: Correlation +data_source: [] +description: The following correlation identifies a distinct amount of analytics associated + with the Windows Modify Registry analytic technique ID that identify potentially suspicious + behavior. +search: '| tstats `security_content_summariesonly` min(_time) as firstTime max(_time) as lastTime + sum(All_Risk.calculated_risk_score) as risk_score, + count(All_Risk.calculated_risk_score) as risk_event_count, + values(All_Risk.annotations.mitre_attack.mitre_tactic_id) as annotations.mitre_attack.mitre_tactic_id, + dc(All_Risk.annotations.mitre_attack.mitre_tactic_id) as mitre_tactic_id_count, + values(All_Risk.annotations.mitre_attack.mitre_technique_id) as annotations.mitre_attack.mitre_technique_id, + dc(All_Risk.annotations.mitre_attack.mitre_technique_id) as mitre_technique_id_count, + values(All_Risk.tag) as tag, values(source) as source, + dc(source) as source_count from datamodel=Risk.All_Risk + where source IN ("*registry*") All_Risk.annotations.mitre_attack.mitre_technique_id IN ("*T1112*") + by All_Risk.risk_object All_Risk.risk_object_type All_Risk.annotations.mitre_attack.mitre_tactic + | `drop_dm_object_name(All_Risk)` + | `security_content_ctime(firstTime)` + | `security_content_ctime(lastTime)` + | where source_count >= 3 + | `windows_modify_registry_risk_behavior_filter`' +how_to_implement: Splunk Enterprise Security is required to utilize this correlation. In addition, + modify the source_count value to your environment. In our testing, a count of 4 or 5 was decent in a lab, + but the number may need to be increased base on internal testing. In addition, + based on false positives, modify any analytics to be anomaly and lower or increase risk based on organization importance. +known_false_positives: False positives will be present based on many factors. Tune + the correlation as needed to reduce too many triggers. +references: +- https://www.splunk.com/en_us/blog/security/do-not-cross-the-redline-stealer-detections-and-analysis.html +- https://www.splunk.com/en_us/blog/security/asyncrat-crusade-detections-and-defense.html +- https://www.splunk.com/en_us/blog/security/from-registry-with-love-malware-registry-abuses.html +- https://www.splunk.com/en_us/blog/security/-applocker-rules-as-defense-evasion-complete-analysis.html +tags: + analytic_story: + - Windows Registry Abuse + asset_type: Endpoint + confidence: 70 + impact: 70 + message: An increase of Windows Modify Registry behavior has been detected on $affected_systems$ + mitre_attack_id: + - T1112 + observable: + - name: affected_systems + type: Hostname + role: + - Victim + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + risk_score: 49 + required_fields: + - _time + - All_Risk.analyticstories + - All_Risk.risk_object_type + - All_Risk.risk_object + - All_Risk.annotations.mitre_attack.mitre_tactic + - source + security_domain: endpoint +tests: +- name: True Positive Test + attack_data: + - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1112/windows_mod_reg_risk_behavior/modify_reg_risk.log + source: mod_reg + sourcetype: stash From 689caaf2acaac6f37e2d4001c7d777ea45e524de Mon Sep 17 00:00:00 2001 From: Bhavin Patel Date: Tue, 11 Jul 2023 16:46:13 -0500 Subject: [PATCH 2/3] Updated description --- .../endpoint/windows_modify_registry_risk_behavior.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/detections/endpoint/windows_modify_registry_risk_behavior.yml b/detections/endpoint/windows_modify_registry_risk_behavior.yml index ed6e0d1d82..5b195dcaac 100644 --- a/detections/endpoint/windows_modify_registry_risk_behavior.yml +++ b/detections/endpoint/windows_modify_registry_risk_behavior.yml @@ -6,9 +6,8 @@ author: Teoderick Contreras, Splunk status: production type: Correlation data_source: [] -description: The following correlation identifies a distinct amount of analytics associated - with the Windows Modify Registry analytic technique ID that identify potentially suspicious - behavior. +description: The following analytic detects the triggering of a 3 or higher number of distinct analytics associated + with a Mitre ID T1112 which is modification of registry information, which could be a sign of multiple malicious registry modifications made on a host. Malicious actors often manipulate the Windows Registry to conceal vital configuration details within specific Registry keys. They exploit this technique to obfuscate their activities, eliminate traces of their presence during cleanup operations, and facilitate persistent access and execution of malicious code. search: '| tstats `security_content_summariesonly` min(_time) as firstTime max(_time) as lastTime sum(All_Risk.calculated_risk_score) as risk_score, count(All_Risk.calculated_risk_score) as risk_event_count, From adfc1e8f10ff15c666c10ae3ec93a64d8ba64fb1 Mon Sep 17 00:00:00 2001 From: Bhavin Patel Date: Tue, 11 Jul 2023 16:47:37 -0500 Subject: [PATCH 3/3] Update windows_modify_registry_risk_behavior.yml --- detections/endpoint/windows_modify_registry_risk_behavior.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/detections/endpoint/windows_modify_registry_risk_behavior.yml b/detections/endpoint/windows_modify_registry_risk_behavior.yml index 5b195dcaac..a481d3919b 100644 --- a/detections/endpoint/windows_modify_registry_risk_behavior.yml +++ b/detections/endpoint/windows_modify_registry_risk_behavior.yml @@ -6,8 +6,7 @@ author: Teoderick Contreras, Splunk status: production type: Correlation data_source: [] -description: The following analytic detects the triggering of a 3 or higher number of distinct analytics associated - with a Mitre ID T1112 which is modification of registry information, which could be a sign of multiple malicious registry modifications made on a host. Malicious actors often manipulate the Windows Registry to conceal vital configuration details within specific Registry keys. They exploit this technique to obfuscate their activities, eliminate traces of their presence during cleanup operations, and facilitate persistent access and execution of malicious code. +description: This analytic is designed to identify instances where three or more distinct analytics associated with Mitre ID T1112 - Modification of registry information are triggered. Such occurrences could indicate the presence of multiple malicious registry modifications on a host. Malicious actors frequently manipulate the Windows Registry to hide important configuration details within specific Registry keys. This technique allows them to obscure their activities, erase any evidence during cleanup operations, and establish continuous access and execution of malicious code. search: '| tstats `security_content_summariesonly` min(_time) as firstTime max(_time) as lastTime sum(All_Risk.calculated_risk_score) as risk_score, count(All_Risk.calculated_risk_score) as risk_event_count,