From 2a32bc9694a3949cffbf9e3c856f2bf1a8a10781 Mon Sep 17 00:00:00 2001 From: mvelazco Date: Fri, 17 Mar 2023 14:17:07 -0400 Subject: [PATCH] adding new detection --- .../windows_findstr_gpp_discovery.yml | 75 +++++++++++++++++++ .../windows_powershell_gpp_discovery.yml | 1 + .../windows_findstr_gpp_discovery.test.yml | 12 +++ 3 files changed, 88 insertions(+) create mode 100644 detections/endpoint/windows_findstr_gpp_discovery.yml create mode 100644 tests/endpoint/windows_findstr_gpp_discovery.test.yml diff --git a/detections/endpoint/windows_findstr_gpp_discovery.yml b/detections/endpoint/windows_findstr_gpp_discovery.yml new file mode 100644 index 0000000000..32b06dfee3 --- /dev/null +++ b/detections/endpoint/windows_findstr_gpp_discovery.yml @@ -0,0 +1,75 @@ +name: Windows Findstr GPP Discovery +id: 1631ac2d-f2a9-42fa-8a59-d6e210d472f5 +version: 1 +date: '2023-03-16' +author: Mauricio Velazco, Splunk +type: TTP +datamodel: [] +description: UPDATE_DESCRIPTION +search: ' | tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) + as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=findstr.exe AND Processes.process=*sysvol* AND Processes.process=*cpassword*) + by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name + | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` + | `windows_findstr_gpp_discovery_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: Administrators may leverage findstr to find passwords in GPO to validate exposure. Filter as needed. +references: +- https://pentestlab.blog/2017/03/20/group-policy-preferences/ +- https://adsecurity.org/?p=2288 +- https://www.hackingarticles.in/credential-dumping-group-policy-preferences-gpp/ +- https://attack.mitre.org/techniques/T1552/006/ +tags: + analytic_story: + - Active Directory Privilege Escalation + asset_type: Endpoint + cis20: + - CIS 3 + - CIS 5 + - CIS 16 + confidence: 80 + context: + - Source:Endpoint + - Stage:Privilege Escalation + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1552.006/findstr_gpp_discovery/windows-security.log + impact: 70 + kill_chain_phases: + - Exploitation + message: Findstr was executed to discover GPP credentials on $dest$ + mitre_attack_id: + - T1552 + - T1552.006 + nist: + - DE.CM + observable: + - name: dest + type: Hostname + role: + - Victim + - name: user + type: User + role: + - Victim + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - Processes.user + - Processes.dest + - Processes.process_name + - Processes.process + - Processes.dest + - Processes.user + - Processes.parent_process_name + - Processes.process_name + - Processes.process_id + - Processes.parent_process_id + - Processes.original_file_name + risk_score: 56 + security_domain: endpoint diff --git a/detections/endpoint/windows_powershell_gpp_discovery.yml b/detections/endpoint/windows_powershell_gpp_discovery.yml index 44c4d1151d..dba0d3d7a6 100644 --- a/detections/endpoint/windows_powershell_gpp_discovery.yml +++ b/detections/endpoint/windows_powershell_gpp_discovery.yml @@ -18,6 +18,7 @@ references: - https://pentestlab.blog/2017/03/20/group-policy-preferences/ - https://adsecurity.org/?p=2288 - https://www.hackingarticles.in/credential-dumping-group-policy-preferences-gpp/ +- https://attack.mitre.org/techniques/T1552/006/ tags: analytic_story: - Active Directory Privilege Escalation diff --git a/tests/endpoint/windows_findstr_gpp_discovery.test.yml b/tests/endpoint/windows_findstr_gpp_discovery.test.yml new file mode 100644 index 0000000000..3805dee99c --- /dev/null +++ b/tests/endpoint/windows_findstr_gpp_discovery.test.yml @@ -0,0 +1,12 @@ +name: Windows Findstr GPP Discovery Unit Test +tests: +- name: Windows Findstr GPP Discovery + file: endpoint/windows_findstr_gpp_discovery.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/T1552.006/findstr_gpp_discovery/windows-security.log + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational + sourcetype: xmlwineventlog