From 70fc7ff58e7250010fd8150f7fc4ef4553c29e9f Mon Sep 17 00:00:00 2001 From: mvelazco Date: Mon, 27 Mar 2023 15:26:28 -0400 Subject: [PATCH] adding detection --- ...tive_shares_accessed_on_multiple_hosts.yml | 4 +- ...ial_privileged_logon_on_multiple_hosts.yml | 65 +++++++++++++++++++ ...rivileged_logon_on_multiple_hosts.test.yml | 12 ++++ 3 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 detections/endpoint/windows_special_privileged_logon_on_multiple_hosts.yml create mode 100644 tests/endpoint/windows_special_privileged_logon_on_multiple_hosts.test.yml diff --git a/detections/endpoint/windows_administrative_shares_accessed_on_multiple_hosts.yml b/detections/endpoint/windows_administrative_shares_accessed_on_multiple_hosts.yml index b4ca012384..f14e96e765 100644 --- a/detections/endpoint/windows_administrative_shares_accessed_on_multiple_hosts.yml +++ b/detections/endpoint/windows_administrative_shares_accessed_on_multiple_hosts.yml @@ -6,9 +6,9 @@ author: Mauricio Velazco, Splunk type: TTP datamodel: [] description: UPDATE_DESCRIPTION -search: ' `wineventlog_security` EventCode=5140 (ShareName="\\\\*\\ADMIN$" OR ShareName="\\\\*\\IPC$" OR ShareName="\\\\*\\C$") +search: ' `wineventlog_security` EventCode=5140 OR EventCode=5145 (ShareName="\\\\*\\ADMIN$" OR ShareName="\\\\*\\IPC$" OR ShareName="\\\\*\\C$") | bucket span=5m _time - | stats dc(Computer) AS unique_targets values(Computer) as host_targets by _time, IpAddress, SubjectUserName, ShareName + | stats dc(Computer) AS unique_targets values(Computer) as host_targets values(ShareName) as shares by _time, IpAddress, SubjectUserName, EventCode | where unique_targets > 40 | `windows_administrative_shares_accessed_on_multiple_hosts_filter`' how_to_implement: UPDATE_HOW_TO_IMPLEMENT diff --git a/detections/endpoint/windows_special_privileged_logon_on_multiple_hosts.yml b/detections/endpoint/windows_special_privileged_logon_on_multiple_hosts.yml new file mode 100644 index 0000000000..807a5cd19e --- /dev/null +++ b/detections/endpoint/windows_special_privileged_logon_on_multiple_hosts.yml @@ -0,0 +1,65 @@ +name: Windows Special Privileged Logon On Multiple Hosts +id: 4c461f5a-c2cc-4e86-b132-c262fc9edca7 +version: 1 +date: '2023-03-27' +author: Mauricio Velazco, Splunk +type: TTP +datamodel: [] +description: UPDATE_DESCRIPTION +search: ' `wineventlog_security` EventCode=4672 AND NOT(Caller_User_Name IN ("DWM-1","DWM-2","DWM-3","LOCAL SERVICE","NETWORK SERVICE","SYSTEM","*$")) + | bucket span=5m _time + | stats dc(Computer) AS unique_targets values(Computer) as host_targets values(PrivilegeList) as privileges by _time, Caller_User_Name + | where unique_targets > 40 + | `windows_special_privileged_logon_on_multiple_hosts_filter`' +how_to_implement: UPDATE_HOW_TO_IMPLEMENT +known_false_positives: UPDATE_KNOWN_FALSE_POSITIVES +references: +- REFERENCE +tags: + analytic_story: + - Active Directory Privilege Escalation + - Active Directory Lateral Movement + asset_type: Endpoint + cis20: + - CIS 3 + - CIS 5 + - CIS 16 + confidence: 80 + context: + - Source:Endpoint + - Stage:Privilege Escalation + - Stage:Lateral Movement + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078/special_logon_on_mulitple_hosts/windows-security.log + impact: 80 + kill_chain_phases: + - Reconnaissance + - Exploitation + message: UPDATE message + mitre_attack_id: + - T1087 + - T1021.002 + - T1135 + nist: + - DE.CM + observable: + - name: Computer + type: Hostname + role: + - Victim + - name: Caller_User_Name + type: User + role: + - Attacker + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - EventCode + - Caller_User_Name + - Computer + - PrivilegeList + risk_score: 64 + security_domain: endpoint diff --git a/tests/endpoint/windows_special_privileged_logon_on_multiple_hosts.test.yml b/tests/endpoint/windows_special_privileged_logon_on_multiple_hosts.test.yml new file mode 100644 index 0000000000..a922c7b9ca --- /dev/null +++ b/tests/endpoint/windows_special_privileged_logon_on_multiple_hosts.test.yml @@ -0,0 +1,12 @@ +name: Windows Special Privileged Logon On Multiple Hosts Unit Test +tests: +- name: Windows Special Privileged Logon On Multiple Hosts + file: endpoint/windows_special_privileged_logon_on_multiple_hosts.yml + pass_condition: '| stats count | where count > 0' + earliest_time: -24h + latest_time: now + attack_data: + - file_name: windows-security.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078/special_logon_on_mulitple_hosts/windows-security.log + source: XmlWinEventLog:Security + sourcetype: XmlWinEventLog