From c4add63859a4aed29537b425805a97a6c7ed6941 Mon Sep 17 00:00:00 2001 From: Michael Haag <5632822+MHaggis@users.noreply.github.com> Date: Tue, 21 Mar 2023 09:47:00 -0600 Subject: [PATCH 1/6] Delete windows_lateral_tool_transfer_remcom.yml From 12092332d310efe83280b5103157c38c10780c69 Mon Sep 17 00:00:00 2001 From: Michael Haag <5632822+MHaggis@users.noreply.github.com> Date: Tue, 21 Mar 2023 09:47:13 -0600 Subject: [PATCH 2/6] Delete windows_service_create_remcomsvc.yml From 38f143d910dd976d01ecaf062651f8b37dbf832b Mon Sep 17 00:00:00 2001 From: Michael Haag <5632822+MHaggis@users.noreply.github.com> Date: Tue, 21 Mar 2023 09:47:32 -0600 Subject: [PATCH 3/6] Delete windows_lateral_tool_transfer_remcom.test.yml --- .../hunting_3cxdesktopapp_software.test.yml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 tests/endpoint/hunting_3cxdesktopapp_software.test.yml diff --git a/tests/endpoint/hunting_3cxdesktopapp_software.test.yml b/tests/endpoint/hunting_3cxdesktopapp_software.test.yml deleted file mode 100644 index b1b45e6873..0000000000 --- a/tests/endpoint/hunting_3cxdesktopapp_software.test.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Hunting 3CXDesktopApp Software Unit Test -tests: -- name: Hunting 3CXDesktopApp Software - file: endpoint/hunting_3cxdesktopapp_software.yml - pass_condition: '| stats count | where count > 0' - earliest_time: -24h - latest_time: now - attack_data: - - file_name: 3cx_windows-sysmon.log - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1195.002/3CX/3cx_windows-sysmon.log - source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational - sourcetype: xmlwineventlog - update_timestamp: true From d216da7d4c8e5d09698e3a90e2940a7d48e2cf33 Mon Sep 17 00:00:00 2001 From: Michael Haag <5632822+MHaggis@users.noreply.github.com> Date: Tue, 21 Mar 2023 09:48:04 -0600 Subject: [PATCH 4/6] Delete windows_service_create_remcomsvc.test.yml From 52c9d19cc480fa74dcb63b2b4197b071c8586cb2 Mon Sep 17 00:00:00 2001 From: Michael Haag <5632822+MHaggis@users.noreply.github.com> Date: Mon, 20 Mar 2023 14:46:12 -0600 Subject: [PATCH 5/6] every haag everywhere all at once --- .../windows_lateral_tool_transfer_remcom.yml | 79 +++++++++++++++++++ ...dows_lateral_tool_transfer_remcom.test.yml | 13 +++ 2 files changed, 92 insertions(+) create mode 100644 detections/endpoint/windows_lateral_tool_transfer_remcom.yml create mode 100644 tests/endpoint/windows_lateral_tool_transfer_remcom.test.yml diff --git a/detections/endpoint/windows_lateral_tool_transfer_remcom.yml b/detections/endpoint/windows_lateral_tool_transfer_remcom.yml new file mode 100644 index 0000000000..09043be3ed --- /dev/null +++ b/detections/endpoint/windows_lateral_tool_transfer_remcom.yml @@ -0,0 +1,79 @@ +name: Windows Lateral Tool Transfer RemCom +id: e373a840-5bdc-47ef-b2fd-9cc7aaf387f0 +version: 1 +date: '2023-03-20' +author: Michael Haag, Splunk +type: TTP +datamodel: +- Endpoint +description: This analytic identifies the use of RemCom.exe - The open source psexec. This utility provides the ability to move laterally and run scripts or commands remotely. +search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) + as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=remcom.exe OR Processes.original_file_name=RemCom.exe) Processes.process="*\\*" Processes.process IN ("*/user:*", "*/pwd:*") + by Processes.dest Processes.user Processes.parent_process_name 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_lateral_tool_transfer_remcom_filter`' +how_to_implement: To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product. +known_false_positives: False positives may be present based on Administrative use. Filter as needed. +references: + - https://www.crowdstrike.com/blog/bears-midst-intrusion-democratic-national-committee/ + - https://github.com/kavika13/RemCom +tags: + analytic_story: + - Active Directory Discovery + asset_type: Endpoint + cis20: + - CIS 3 + - CIS 5 + - CIS 16 + confidence: 50 + context: + - Source:Endpoint + - Stage:Defense Evasion + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1570/remcom/remcom_windows-sysmon.log + impact: 80 + kill_chain_phases: + - Installation + message: An instance of $parent_process_name$ spawning $process_name$ was identified on endpoint $dest$ by user $user$ attempting to move laterally. + mitre_attack_id: + - T1570 + nist: + - DE.CM + observable: + - name: user + type: User + role: + - Victim + - name: dest + type: Hostname + role: + - Victim + - name: parent_process_name + type: Process + role: + - Parent Process + - name: process_name + type: Process + role: + - Child Process + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - Processes.dest + - Processes.user + - Processes.parent_process_name #parent process name + - Processes.parent_process #parent cmdline + - Processes.original_file_name + - Processes.process_name #process name + - Processes.process #process cmdline + - Processes.process_id + - Processes.parent_process_path + - Processes.process_path + - Processes.parent_process_id + risk_score: 40 + security_domain: endpoint \ No newline at end of file diff --git a/tests/endpoint/windows_lateral_tool_transfer_remcom.test.yml b/tests/endpoint/windows_lateral_tool_transfer_remcom.test.yml new file mode 100644 index 0000000000..e2a3f3d374 --- /dev/null +++ b/tests/endpoint/windows_lateral_tool_transfer_remcom.test.yml @@ -0,0 +1,13 @@ +name: Windows Lateral Tool Transfer RemCom Unit Test +tests: +- name: Windows Lateral Tool Transfer RemCom + file: endpoint/windows_lateral_tool_transfer_remcom.yml + pass_condition: '| stats count | where count > 0' + earliest_time: -24h + latest_time: now + attack_data: + - file_name: remcom_windows-sysmon.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1570/remcom/remcom_windows-sysmon.log + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational + sourcetype: xmlwineventlog + update_timestamp: true From 0cbf4b5875f16233d76b12a896bcd0270f521c82 Mon Sep 17 00:00:00 2001 From: Michael Haag <5632822+MHaggis@users.noreply.github.com> Date: Mon, 20 Mar 2023 15:26:20 -0600 Subject: [PATCH 6/6] MOCMER --- .../windows_service_create_remcomsvc.yml | 57 +++++++++++++++++++ .../windows_service_create_remcomsvc.test.yml | 13 +++++ 2 files changed, 70 insertions(+) create mode 100644 detections/endpoint/windows_service_create_remcomsvc.yml create mode 100644 tests/endpoint/windows_service_create_remcomsvc.test.yml diff --git a/detections/endpoint/windows_service_create_remcomsvc.yml b/detections/endpoint/windows_service_create_remcomsvc.yml new file mode 100644 index 0000000000..2f3d2d0f35 --- /dev/null +++ b/detections/endpoint/windows_service_create_remcomsvc.yml @@ -0,0 +1,57 @@ +name: Windows Service Create RemComSvc +id: 0be4b5d6-c449-4084-b945-2392b519c33b +version: 1 +date: '2023-03-20' +author: Michael Haag, Splunk +type: Anomaly +datamodel: [] +description: The following analytic identifies RemComSvc installed on an endpoint. This typically occurs when someone is moving laterally with RemCom.exe. +search: '`wineventlog_system` EventCode=7045 ServiceName="RemCom Service" | stats count min(_time) as firstTime max(_time) as lastTime by + dest ImagePath ServiceName ServiceType | `security_content_ctime(firstTime)` + | `security_content_ctime(lastTime)` | `windows_service_create_remcomsvc_filter`' +how_to_implement: To implement this analytic, the Windows EventCode 7045 will need to be logged. The Windows TA for Splunk is also recommended. +known_false_positives: False positives may be present, filter as needed based on administrative activity. +references: + - https://www.crowdstrike.com/blog/bears-midst-intrusion-democratic-national-committee/ + - https://github.com/kavika13/RemCom +tags: + analytic_story: + - Active Directory Discovery + asset_type: Endpoint + cis20: + - CIS 3 + - CIS 5 + - CIS 16 + confidence: 80 + context: + - Source:Endpoint + - Stage:Persistence + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1543.003/atomic_red_team/remcom_windows-system.log + impact: 40 + kill_chain_phases: + - Installation + message: A new service was created related to RemCom on $dest$. + mitre_attack_id: + - T1543.003 + - T1543 + nist: + - DE.CM + observable: + - name: dest + type: Endpoint + role: + - Victim + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - dest + - EventCode + - ImagePath + - ServiceName + - ServiceType + risk_score: 32 + security_domain: endpoint diff --git a/tests/endpoint/windows_service_create_remcomsvc.test.yml b/tests/endpoint/windows_service_create_remcomsvc.test.yml new file mode 100644 index 0000000000..9341d290fb --- /dev/null +++ b/tests/endpoint/windows_service_create_remcomsvc.test.yml @@ -0,0 +1,13 @@ +name: Windows Service Create RemComSvc Unit Test +tests: +- name: Windows Service Create RemComSvc + file: endpoint/windows_service_create_remcomsvc.yml + pass_condition: '| stats count | where count > 0' + earliest_time: -24h + latest_time: now + attack_data: + - file_name: remcom_windows-system.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1543.003/atomic_red_team/remcom_windows-system.log + source: XmlWinEventLog:System + sourcetype: XmlWinEventLog + update_timestamp: true