From 503ce68ee18331e63852257aaf47701b0a1aa3c1 Mon Sep 17 00:00:00 2001 From: mvelazco Date: Wed, 1 Sep 2021 16:24:04 -0400 Subject: [PATCH] adding an extra detections --- .../domain_group_discovery_with_dsquery.yml | 52 +++++++++++++++++++ ...main_group_discovery_with_dsquery.test.yml | 12 +++++ 2 files changed, 64 insertions(+) create mode 100644 detections/endpoint/domain_group_discovery_with_dsquery.yml create mode 100644 tests/endpoint/domain_group_discovery_with_dsquery.test.yml diff --git a/detections/endpoint/domain_group_discovery_with_dsquery.yml b/detections/endpoint/domain_group_discovery_with_dsquery.yml new file mode 100644 index 0000000000..287f8d82fb --- /dev/null +++ b/detections/endpoint/domain_group_discovery_with_dsquery.yml @@ -0,0 +1,52 @@ +name: Domain Group Discovery With Dsquery +id: f0c9d62f-a232-4edd-b17e-bc409fb133d4 +version: 1 +date: '2021-09-01' +author: Mauricio Velazco, Splunk +type: Hunting +datamodel: +- Endpoint +description: This analytic looks for the execution of `dsquery.exe` with command-line + arguments utilized to query for domain groups. The argument `group`, returns a list of all domain groups. + Red Teams and adversaries alike use may leverage dsquery.exe to enumerate domain groups for situational awareness and Active Directory Discovery. +search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) + as lastTime from datamodel=Endpoint.Processes where (Processes.process_name="dsquery.exe") + (Processes.process="*group*") + by Processes.dest Processes.user Processes.parent_process Processes.process_name + Processes.process Processes.process_id Processes.parent_process_id | `drop_dm_object_name(Processes)` + | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `domain_group_discovery_with_dsquery_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. +known_false_positives: Administrators or power users may use this command for troubleshooting. +references: +- https://attack.mitre.org/techniques/T1069/002/ +tags: + analytic_story: + - Active Directory Discovery + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-sysmon.log + kill_chain_phases: + - Reconnaissance + mitre_attack_id: + - T1069.002 + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + security_domain: endpoint + impact: 30 + confidence: 50 + risk_score: 15 + context: + - Source:Endpoint + - Stage:Discovery + - Stage:Recon + message: Domain group discovery enumeration on $dest$ by $user$ + observable: + - name: dest + type: Endpoint + role: + - Victim \ No newline at end of file diff --git a/tests/endpoint/domain_group_discovery_with_dsquery.test.yml b/tests/endpoint/domain_group_discovery_with_dsquery.test.yml new file mode 100644 index 0000000000..befd87f9f1 --- /dev/null +++ b/tests/endpoint/domain_group_discovery_with_dsquery.test.yml @@ -0,0 +1,12 @@ +name: Domain Group Discovery With Dsquery Unit Test +tests: +- name: Domain Group Discovery With Dsquery + file: endpoint/domain_group_discovery_with_dsquery.yml + pass_condition: '| stats count | where count > 0' + earliest_time: '-24h' + latest_time: 'now' + attack_data: + - file_name: windows-sysmon.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-sysmon.log + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational + sourcetype: xmlwineventlog \ No newline at end of file