diff --git a/detections/endpoint/7zip_commandline_to_smb_share_path.yml b/detections/endpoint/7zip_commandline_to_smb_share_path.yml new file mode 100644 index 0000000000..59f9728be9 --- /dev/null +++ b/detections/endpoint/7zip_commandline_to_smb_share_path.yml @@ -0,0 +1,72 @@ +name: 7zip CommandLine To SMB Share Path +id: 01d29b48-ff6f-11eb-b81e-acde48001122 +version: 1 +date: '2021-08-17' +author: Teoderick Contreras, Splunk +type: Hunting +datamodel: +- Endpoint +description: This search is to detect a suspicious 7z process with commandline pointing + to SMB network share. This technique was seen in CONTI LEAK tools where it use 7z + to archive a sensitive files and place it in network share tmp folder. This search + is a good hunting query that may give analyst a hint why specific user try to archive + a file pointing to SMB user which is un usual. +search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) + as lastTime from datamodel=Endpoint.Processes where (Processes.process_name ="7z.exe" + OR Processes.process_name = "7za.exe" OR Processes.original_file_name = "7z.exe" + OR Processes.original_file_name = "7za.exe") AND (Processes.process="*\\C$\\*" + OR Processes.process="*\\Admin$\\*" OR Processes.process="*\\IPC$\\*") by Processes.original_file_name + Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process + Processes.parent_process_id Processes.process_id Processes.dest Processes.user + | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` + | `7zip_commandline_to_smb_share_path_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 where renamed 7z.exe may be used. +known_false_positives: unknown +references: +- https://threadreaderapp.com/thread/1423361119926816776.html +tags: + analytic_story: + - Ransomware + confidence: 50 + context: + - Source:Endpoint + - Stage:Execution + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/conti/conti_leak/windows-sysmon_7z.log + impact: 50 + kill_chain_phases: + - Exploitation + message: archive process $process_name$ with suspicious cmdline $process$ in host + $dest$ + mitre_attack_id: + - T1560.001 + - T1560 + observable: + - name: dest + type: Hostname + role: + - Victim + - name: SourceImage + type: Process + role: + - Attacker + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - Processes.dest + - Processes.user + - Processes.parent_process + - Processes.parent_process_name + - Processes.process_name + - Processes.process + - Processes.process_id + - Processes.parent_process_id + risk_score: 25 + security_domain: endpoint + asset_type: Endpoint diff --git a/tests/endpoint/7zip_commandline_to_smb_share_path.test.yml b/tests/endpoint/7zip_commandline_to_smb_share_path.test.yml new file mode 100644 index 0000000000..fe1a1f6a07 --- /dev/null +++ b/tests/endpoint/7zip_commandline_to_smb_share_path.test.yml @@ -0,0 +1,12 @@ +name: 7zip CommandLine To SMB Share Path Unit Test +tests: +- name: 7zip CommandLine To SMB Share Path + file: endpoint/7zip_commandline_to_smb_share_path.yml + pass_condition: '| stats count | where count > 0' + earliest_time: -24h + latest_time: now + attack_data: + - file_name: windows-sysmon_7z.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/conti/conti_leak/windows-sysmon_7z.log + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational + sourcetype: xmlwineventlog