diff --git a/detections/endpoint/cmd_carry_out_string_command_parameter.yml b/detections/endpoint/cmd_carry_out_string_command_parameter.yml index 37830f5cf9..3740b61486 100644 --- a/detections/endpoint/cmd_carry_out_string_command_parameter.yml +++ b/detections/endpoint/cmd_carry_out_string_command_parameter.yml @@ -37,6 +37,7 @@ tags: - Hermetic Wiper - Living Off The Land - Azorult + - DarkCrystal RAT automated_detection_testing: passed confidence: 50 context: diff --git a/detections/endpoint/windows_command_shell_dcrat_forkbomb_payload.yml b/detections/endpoint/windows_command_shell_dcrat_forkbomb_payload.yml new file mode 100644 index 0000000000..0616c2a06c --- /dev/null +++ b/detections/endpoint/windows_command_shell_dcrat_forkbomb_payload.yml @@ -0,0 +1,77 @@ +name: Windows Command Shell DCRat ForkBomb Payload +id: 2bb1a362-7aa8-444a-92ed-1987e8da83e1 +version: 1 +date: '2022-07-28' +author: Teoderick Contreras, Splunk +type: TTP +datamodel: +- Endpoint +description: The following analytic identifies DCRat "forkbomb" payload feature. + This technique was seen in dark crystal RAT backdoor capabilities where it will execute several cmd child process + executing "notepad.exe & pause". This analytic detects the multiple cmd.exe and child process notepad.exe execution using batch script + in the targeted host within 30s timeframe. this TTP can be a good pivot to check DCRat infection. +search: '| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.parent_process) as parent_process values(Processes.parent_process_id) as parent_process_id values(Processes.process_id) as process_id dc(Processes.parent_process_id) as parent_process_id_count dc(Processes.process_id) as process_id_count + min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes + where Processes.parent_process_name= "cmd.exe" (Processes.process_name = "notepad.exe" OR Processes.original_file_name= "notepad.exe") Processes.parent_process = "*.bat*" + by Processes.parent_process_name Processes.process_name Processes.original_file_name Processes.parent_process Processes.dest Processes.user _time + span=30s | where parent_process_id_count>= 10 AND process_id_count >=10 + | `drop_dm_object_name(Processes)` + | `security_content_ctime(firstTime)` + | `security_content_ctime(lastTime)` + | `windows_command_shell_dcrat_forkbomb_payload_filter`' +how_to_implement: To successfully implement this search, you need to be ingesting + logs with the process name, parent process, and command-line executions from your + endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the + Sysmon TA. Tune and filter known instances of wermgr.exe may be used. +known_false_positives: unknown +references: +- https://cert.gov.ua/article/405538 +- https://malpedia.caad.fkie.fraunhofer.de/details/win.dcrat +- https://www.mandiant.com/resources/analyzing-dark-crystal-rat-backdoor +tags: + analytic_story: + - DarkCrystal RAT + asset_type: Endpoint + cis20: + - CIS 3 + - CIS 5 + - CIS 16 + confidence: 90 + context: + - Source:Endpoint + - Stage:Execution + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/dcrat/dcrat_forkbomb/sysmon.log + impact: 90 + kill_chain_phases: + - Exploitation + message: Multiple cmd.exe processes with child process of notepad.exe executed on $dest$ + mitre_attack_id: + - T1059.003 + - T1059 + nist: + - DE.CM + observable: + - name: dest + type: Hostname + role: + - Victim + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - Processes.dest + - Processes.user + - Processes.parent_process_name + - Processes.parent_process + - Processes.original_file_name + - Processes.process_name + - Processes.process + - Processes.process_id + - Processes.parent_process_path + - Processes.process_path + - Processes.parent_process_id + risk_score: 81 + security_domain: endpoint diff --git a/detections/endpoint/windows_gather_victim_network_info_through_ip_check_web_services.yml b/detections/endpoint/windows_gather_victim_network_info_through_ip_check_web_services.yml index 5d6b527d06..37ac487977 100644 --- a/detections/endpoint/windows_gather_victim_network_info_through_ip_check_web_services.yml +++ b/detections/endpoint/windows_gather_victim_network_info_through_ip_check_web_services.yml @@ -26,6 +26,7 @@ references: tags: analytic_story: - Azorult + - DarkCrystal RAT asset_type: Endpoint cis20: - CIS 3 diff --git a/detections/endpoint/windows_high_file_deletion_frequency.yml b/detections/endpoint/windows_high_file_deletion_frequency.yml index 9aaf0c761e..10743148c8 100644 --- a/detections/endpoint/windows_high_file_deletion_frequency.yml +++ b/detections/endpoint/windows_high_file_deletion_frequency.yml @@ -2,7 +2,7 @@ name: Windows High File Deletion Frequency id: 45b125c4-866f-11eb-a95a-acde48001122 version: 1 date: '2021-03-16' -author: Teoderick Contreras +author: Teoderick Contreras, Splunk type: Anomaly datamodel: - Endpoint @@ -13,7 +13,7 @@ description: This search looks for high frequency of file deletion relative to p search: '`sysmon` EventCode=23 TargetFilename IN ("*.cmd", "*.ini","*.gif", "*.jpg", "*.jpeg", "*.db", "*.ps1", "*.doc*", "*.xls*", "*.ppt*", "*.bmp","*.zip", "*.rar", "*.7z", "*.chm", "*.png", "*.log", "*.vbs", "*.js", "*.vhd", "*.bak", "*.wbcat", - "*.bkf" , "*.backup*", "*.dsk", , "*.win") | stats values(TargetFilename) as deleted_files + "*.bkf" , "*.backup*", "*.dsk", "*.win") | stats values(TargetFilename) as deleted_files min(_time) as firstTime max(_time) as lastTime count by Computer user EventCode Image ProcessID |where count >=100 | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_high_file_deletion_frequency_filter`' @@ -29,6 +29,7 @@ tags: analytic_story: - Clop Ransomware - WhisperGate + - DarkCrystal RAT confidence: 80 context: - Source:Endpoint diff --git a/detections/endpoint/windows_system_logoff_commandline.yml b/detections/endpoint/windows_system_logoff_commandline.yml new file mode 100644 index 0000000000..f1bd6ed549 --- /dev/null +++ b/detections/endpoint/windows_system_logoff_commandline.yml @@ -0,0 +1,73 @@ +name: Windows System LogOff Commandline +id: 74a8133f-93e7-4b71-9bd3-13a66124fd57 +version: 1 +date: '2022-07-27' +author: Teoderick Contreras, Splunk +type: Anomaly +datamodel: +- Endpoint +description: The following analytic identifies Windows commandlined to logoff a windows host machine. + This technique was seen in several APT, RAT like dcrat and other commodity malware to shutdown the machine to add more impact, + interrupt access, aid destruction of the system like wiping disk or inhibit system recovery. + This TTP is a good pivot to check why application trigger this commandline which is not so common way to logoff a machine. +search: '| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes + where (Processes.process_name = shutdown.exe OR Processes.original_file_name = shutdown.exe) Processes.process="*shutdown*" Processes.process="* /l*" Processes.process="* /t*" + by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id + | `drop_dm_object_name(Processes)` + | `security_content_ctime(firstTime)` + | `security_content_ctime(lastTime)` + | `windows_system_logoff_commandline_filter`' +how_to_implement: To successfully implement this search, you need to be ingesting + logs with the process name, parent process, and command-line executions from your + endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the + Sysmon TA. +known_false_positives: Administrator may execute this commandline to trigger shutdown, logoff or restart the host machine. +references: +- https://attack.mitre.org/techniques/T1529/ +- https://www.mandiant.com/resources/analyzing-dark-crystal-rat-backdoor +tags: + analytic_story: + - DarkCrystal RAT + asset_type: Endpoint + cis20: + - CIS 3 + - CIS 5 + - CIS 16 + confidence: 80 + context: + - Source:Endpoint + - Stage:Execution + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/reboot_logoff_commandline/sysmon.log + impact: 70 + kill_chain_phases: + - Exploitation + message: Process name $process_name$ is seen to execute logoff commandline on $dest$ + mitre_attack_id: + - T1529 + nist: + - DE.CM + observable: + - name: dest + type: Hostname + role: + - Victim + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - Processes.dest + - Processes.user + - Processes.parent_process_name + - Processes.parent_process + - Processes.original_file_name + - Processes.process_name + - Processes.process + - Processes.process_id + - Processes.parent_process_path + - Processes.process_path + - Processes.parent_process_id + risk_score: 56 + security_domain: endpoint diff --git a/detections/endpoint/windows_system_reboot_commandline.yml b/detections/endpoint/windows_system_reboot_commandline.yml new file mode 100644 index 0000000000..55ed3995c9 --- /dev/null +++ b/detections/endpoint/windows_system_reboot_commandline.yml @@ -0,0 +1,74 @@ +name: Windows System Reboot CommandLine +id: 97fc2b60-c8eb-4711-93f7-d26fade3686f +version: 1 +date: '2022-07-27' +author: Teoderick Contreras, Splunk +type: Anomaly +datamodel: +- Endpoint +description: The following analytic identifies Windows commandlined to reboot a windows host machine. + This technique was seen in several APT, RAT like dcrat and other commodity malware to shutdown the machine to add more impact, + interrupt access, aid destruction of the system like wiping disk or inhibit system recovery. + This TTP is a good pivot to check why application trigger this commandline which is not so common way to reboot a machine. + Compare to shutdown and logoff shutdown.exe feature, reboot seen in some automation script like ansible to reboot the machine. +search: '| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes + where (Processes.process_name = shutdown.exe OR Processes.original_file_name = shutdown.exe) Processes.process="*shutdown*" Processes.process="* /r*" Processes.process="* /t*" + by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id + | `drop_dm_object_name(Processes)` + | `security_content_ctime(firstTime)` + | `security_content_ctime(lastTime)` + | `windows_system_reboot_commandline_filter`' +how_to_implement: To successfully implement this search, you need to be ingesting + logs with the process name, parent process, and command-line executions from your + endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the + Sysmon TA. +known_false_positives: Administrator may execute this commandline to trigger shutdown or restart the host machine. +references: +- https://attack.mitre.org/techniques/T1529/ +- https://www.mandiant.com/resources/analyzing-dark-crystal-rat-backdoor +tags: + analytic_story: + - DarkCrystal RAT + asset_type: Endpoint + cis20: + - CIS 3 + - CIS 5 + - CIS 16 + confidence: 50 + context: + - Source:Endpoint + - Stage:Execution + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/reboot_logoff_commandline/sysmon.log + impact: 60 + kill_chain_phases: + - Exploitation + message: Process $process_name$ that executed reboot via commandline on $dest$ + mitre_attack_id: + - T1529 + nist: + - DE.CM + observable: + - name: dest + type: Hostname + role: + - Victim + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - Processes.dest + - Processes.user + - Processes.parent_process_name + - Processes.parent_process + - Processes.original_file_name + - Processes.process_name + - Processes.process + - Processes.process_id + - Processes.parent_process_path + - Processes.process_path + - Processes.parent_process_id + risk_score: 30 + security_domain: endpoint diff --git a/detections/endpoint/windows_system_shutdown_commandline.yml b/detections/endpoint/windows_system_shutdown_commandline.yml new file mode 100644 index 0000000000..9374e4c8d5 --- /dev/null +++ b/detections/endpoint/windows_system_shutdown_commandline.yml @@ -0,0 +1,73 @@ +name: Windows System Shutdown CommandLine +id: 4fee57b8-d825-4bf3-9ea8-bf405cdb614c +version: 1 +date: '2022-07-27' +author: Teoderick Contreras, Splunk +type: Anomaly +datamodel: +- Endpoint +description: The following analytic identifies Windows commandlined to shutdown a windows host machine. + This technique was seen in several APT, RAT like dcrat and other commodity malware to shutdown the machine to add more impact, + interrupt access, aid destruction of the system like wiping disk or inhibit system recovery. + This TTP is a good pivot to check why application trigger this commandline which is not so common way to shutdown a machine. +search: '| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes + where (Processes.process_name = shutdown.exe OR Processes.original_file_name = shutdown.exe) Processes.process="*shutdown*" Processes.process="* /s*" Processes.process="* /t*" + by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id + | `drop_dm_object_name(Processes)` + | `security_content_ctime(firstTime)` + | `security_content_ctime(lastTime)` + | `windows_system_shutdown_commandline_filter`' +how_to_implement: To successfully implement this search, you need to be ingesting + logs with the process name, parent process, and command-line executions from your + endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the + Sysmon TA. +known_false_positives: Administrator may execute this commandline to trigger shutdown or restart the host machine. +references: +- https://attack.mitre.org/techniques/T1529/ +- https://www.mandiant.com/resources/analyzing-dark-crystal-rat-backdoor +tags: + analytic_story: + - DarkCrystal RAT + asset_type: Endpoint + cis20: + - CIS 3 + - CIS 5 + - CIS 16 + confidence: 70 + context: + - Source:Endpoint + - Stage:Execution + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/dcrat/shutdown_commandline/sysmon.log + impact: 70 + kill_chain_phases: + - Exploitation + message: Process $process_name$ seen to execute shutdown via commandline on $dest$ + mitre_attack_id: + - T1529 + nist: + - DE.CM + observable: + - name: dest + type: Hostname + role: + - Victim + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - Processes.dest + - Processes.user + - Processes.parent_process_name + - Processes.parent_process + - Processes.original_file_name + - Processes.process_name + - Processes.process + - Processes.process_id + - Processes.parent_process_path + - Processes.process_path + - Processes.parent_process_id + risk_score: 49 + security_domain: endpoint diff --git a/detections/endpoint/windows_system_time_discovery_w32tm_delay.yml b/detections/endpoint/windows_system_time_discovery_w32tm_delay.yml new file mode 100644 index 0000000000..bc9a0438ae --- /dev/null +++ b/detections/endpoint/windows_system_time_discovery_w32tm_delay.yml @@ -0,0 +1,76 @@ +name: Windows System Time Discovery W32tm Delay +id: b2cc69e7-11ba-42dc-a269-59c069a48870 +version: 1 +date: '2022-07-28' +author: Teoderick Contreras, Splunk +type: Anomaly +datamodel: +- Endpoint +description: The following analytic identifies DCRat delay time tactics using w32tm. + This technique was seen in DCRAT malware where it uses stripchart function of w32tm.exe application to delay the execution of its payload like + c2 communication , beaconing and execution. This anomaly detection may help the analyst to check other possible event like the process who + execute this command that may lead to DCRat attack. +search: '| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes + where Processes.process_name = w32tm.exe Processes.process= "* /stripchart *" Processes.process= "* /computer:localhost *" + Processes.process= "* /period:*" Processes.process= "* /dataonly *" Processes.process= "* /samples:*" + by Processes.parent_process Processes.process_name Processes.original_file_name Processes.process + Processes.process_id Processes.parent_process_id Processes.dest Processes.user + | `drop_dm_object_name(Processes)` + | `security_content_ctime(firstTime)` + | `security_content_ctime(lastTime)` + | `windows_system_time_discovery_w32tm_delay_filter`' +how_to_implement: To successfully implement this search, you need to be ingesting + logs with the process name, parent process, and command-line executions from your + endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the + Sysmon TA. Tune and filter known instances of wermgr.exe may be used. +known_false_positives: unknown +references: +- https://cert.gov.ua/article/405538 +- https://malpedia.caad.fkie.fraunhofer.de/details/win.dcrat +- https://www.mandiant.com/resources/analyzing-dark-crystal-rat-backdoor +tags: + analytic_story: + - DarkCrystal RAT + asset_type: Endpoint + cis20: + - CIS 3 + - CIS 5 + - CIS 16 + confidence: 60 + context: + - Source:Endpoint + - Stage:Execution + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/dcrat/dcrat_delay_execution/sysmon.log + impact: 60 + kill_chain_phases: + - Reconnaissance + message: Process name w32tm.exe is using suspcicious command line arguments $process$ on host $dest$. + mitre_attack_id: + - T1124 + nist: + - DE.CM + observable: + - name: dest + type: Hostname + role: + - Victim + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - Processes.dest + - Processes.user + - Processes.parent_process_name + - Processes.parent_process + - Processes.original_file_name + - Processes.process_name + - Processes.process + - Processes.process_id + - Processes.parent_process_path + - Processes.process_path + - Processes.parent_process_id + risk_score: 36 + security_domain: endpoint diff --git a/tests/endpoint/windows_command_shell_dcrat_forkbomb_payload.test.yml b/tests/endpoint/windows_command_shell_dcrat_forkbomb_payload.test.yml new file mode 100644 index 0000000000..de588caeb8 --- /dev/null +++ b/tests/endpoint/windows_command_shell_dcrat_forkbomb_payload.test.yml @@ -0,0 +1,13 @@ +name: Windows Command Shell DCRat ForkBomb Payload Unit Test +tests: +- name: Windows Command Shell DCRat ForkBomb Payload + file: endpoint/windows_command_shell_dcrat_forkbomb_payload.yml + pass_condition: '| stats count | where count > 0' + earliest_time: -24h + latest_time: now + attack_data: + - file_name: sysmon.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/dcrat/dcrat_forkbomb/sysmon.log + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational + sourcetype: xmlwineventlog + update_timestamp: true diff --git a/tests/endpoint/windows_system_logoff_commandline.test.yml b/tests/endpoint/windows_system_logoff_commandline.test.yml new file mode 100644 index 0000000000..ccada98596 --- /dev/null +++ b/tests/endpoint/windows_system_logoff_commandline.test.yml @@ -0,0 +1,13 @@ +name: Windows System LogOff Commandline Unit Test +tests: +- name: Windows System LogOff Commandline + file: endpoint/windows_system_logoff_commandline.yml + pass_condition: '| stats count | where count > 0' + earliest_time: -24h + latest_time: now + attack_data: + - file_name: sysmon.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/dcrat/reboot_logoff_commandline/sysmon.log + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational + sourcetype: xmlwineventlog + update_timestamp: true diff --git a/tests/endpoint/windows_system_reboot_commandline.test.yml b/tests/endpoint/windows_system_reboot_commandline.test.yml new file mode 100644 index 0000000000..fe9e81a0f0 --- /dev/null +++ b/tests/endpoint/windows_system_reboot_commandline.test.yml @@ -0,0 +1,13 @@ +name: Windows System Reboot CommandLine Unit Test +tests: +- name: Windows System Reboot CommandLine + file: endpoint/windows_system_reboot_commandline.yml + pass_condition: '| stats count | where count > 0' + earliest_time: -24h + latest_time: now + attack_data: + - file_name: sysmon.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/dcrat/reboot_logoff_commandline/sysmon.log + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational + sourcetype: xmlwineventlog + update_timestamp: true diff --git a/tests/endpoint/windows_system_shutdown_commandline.test.yml b/tests/endpoint/windows_system_shutdown_commandline.test.yml new file mode 100644 index 0000000000..0fb26ee195 --- /dev/null +++ b/tests/endpoint/windows_system_shutdown_commandline.test.yml @@ -0,0 +1,13 @@ +name: Windows System Shutdown CommandLine Unit Test +tests: +- name: Windows System Shutdown CommandLine + file: endpoint/windows_system_shutdown_commandline.yml + pass_condition: '| stats count | where count > 0' + earliest_time: -24h + latest_time: now + attack_data: + - file_name: sysmon.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/dcrat/shutdown_commandline/sysmon.log + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational + sourcetype: xmlwineventlog + update_timestamp: true diff --git a/tests/endpoint/windows_system_time_discovery_w32tm_delay.test.yml b/tests/endpoint/windows_system_time_discovery_w32tm_delay.test.yml new file mode 100644 index 0000000000..e8b88cb666 --- /dev/null +++ b/tests/endpoint/windows_system_time_discovery_w32tm_delay.test.yml @@ -0,0 +1,13 @@ +name: Windows System Time Discovery W32tm Delay Unit Test +tests: +- name: Windows System Time Discovery W32tm Delay + file: endpoint/windows_system_time_discovery_w32tm_delay.yml + pass_condition: '| stats count | where count > 0' + earliest_time: -24h + latest_time: now + attack_data: + - file_name: sysmon.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/dcrat/dcrat_delay_execution/sysmon.log + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational + sourcetype: xmlwineventlog + update_timestamp: true