diff --git a/detections/endpoint/domain_group_discovery_with_adsisearcher.yml b/detections/endpoint/domain_group_discovery_with_adsisearcher.yml new file mode 100644 index 0000000000..6c3fa10a08 --- /dev/null +++ b/detections/endpoint/domain_group_discovery_with_adsisearcher.yml @@ -0,0 +1,57 @@ +name: Domain Group Discovery with Adsisearcher +id: 089c862f-5f83-49b5-b1c8-7e4ff66560c7 +version: 1 +date: '2021-08-25' +author: Mauricio Velazco, Splunk +type: TTP +datamodel: +- Endpoint +description: The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) + to identify the `[Adsisearcher]` type accelerator being used to query Active Directory + for domain groups. Red Teams and adversaries may leverage `[Adsisearcher]` to enumerate + domain groups for situational awareness and Active Directory Discovery. +search: '`powershell` EventCode=4104 (Message = "*[adsisearcher]*" AND Message = "*(objectcategory=group)*" + AND Message = "*findAll()*") | stats count min(_time) as firstTime max(_time) as + lastTime by EventCode Message ComputerName User | `security_content_ctime(firstTime)` + | `domain_group_discovery_with_adsisearcher_filter`' +how_to_implement: To successfully implement this analytic, you will need to enable + PowerShell Script Block Logging on some or all endpoints. Additional setup here + https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell. +known_false_positives: Administrators or power users may use Adsisearcher for troubleshooting. +references: +- https://attack.mitre.org/techniques/T1069/002/ +- https://devblogs.microsoft.com/scripting/use-the-powershell-adsisearcher-type-accelerator-to-search-active-directory/ +tags: + analytic_story: + - Active Directory Discovery + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log + kill_chain_phases: + - Reconnaissance + mitre_attack_id: + - T1069.002 + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - EventCode + - Message + - ComputerName + - User + security_domain: endpoint + impact: 30 + confidence: 60 + risk_score: 18 + context: + - Source:Endpoint + - Stage:Discovery + - Stage:Recon + message: Domain group discovery enumeration using PowerShell on $dest$ by $user$ + observable: + - name: dest + type: Endpoint + role: + - Victim + automated_detection_testing: passed 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..4f5a86b765 --- /dev/null +++ b/detections/endpoint/domain_group_discovery_with_dsquery.yml @@ -0,0 +1,64 @@ +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: + - 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 + 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 + automated_detection_testing: passed diff --git a/detections/endpoint/domain_group_discovery_with_net.yml b/detections/endpoint/domain_group_discovery_with_net.yml new file mode 100644 index 0000000000..16bb9fa8ad --- /dev/null +++ b/detections/endpoint/domain_group_discovery_with_net.yml @@ -0,0 +1,64 @@ +name: Domain Group Discovery With Net +id: f2f14ac7-fa81-471a-80d5-7eb65c3c7349 +version: 1 +date: '2021-08-25' +author: Mauricio Velazco, Splunk +type: Hunting +datamodel: +- Endpoint +description: This analytic looks for the execution of `net.exe` with command-line + arguments utilized to query for domain groups. The argument `group /domain`, returns + a list of all domain groups. Red Teams and adversaries alike use net.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="net.exe" + OR Processes.process_name="net1.exe") (Processes.process=*group* AND Processes.process=*/do*) + 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_net_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: + - 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 + 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 + automated_detection_testing: passed diff --git a/detections/endpoint/domain_group_discovery_with_wmic.yml b/detections/endpoint/domain_group_discovery_with_wmic.yml new file mode 100644 index 0000000000..1448fc937c --- /dev/null +++ b/detections/endpoint/domain_group_discovery_with_wmic.yml @@ -0,0 +1,65 @@ +name: Domain Group Discovery With Wmic +id: a87736a6-95cd-4728-8689-3c64d5026b3e +version: 1 +date: '2021-08-25' +author: Mauricio Velazco, Splunk +type: Hunting +datamodel: +- Endpoint +description: This analytic looks for the execution of `wmic.exe` with command-line + arguments utilized to query for domain groups. The arguments utilized in this command + return a list of all domain groups. Red Teams and adversaries alike use wmic.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="wmic.exe") + (Processes.process=*/NAMESPACE:\\\\root\\directory\\ldap* AND Processes.process=*ds_group* + AND Processes.process="*GET ds_samaccountname*") 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_wmic_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: + - 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 + 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 + automated_detection_testing: passed diff --git a/detections/endpoint/elevated_group_discovery_with_net.yml b/detections/endpoint/elevated_group_discovery_with_net.yml new file mode 100644 index 0000000000..e09d41afb0 --- /dev/null +++ b/detections/endpoint/elevated_group_discovery_with_net.yml @@ -0,0 +1,71 @@ +name: Elevated Group Discovery With Net +id: a23a0e20-0b1b-4a07-82e5-ec5f70811e7a +version: 1 +date: '2021-08-25' +author: Mauricio Velazco, Splunk +type: TTP +datamodel: +- Endpoint +description: This analytic looks for the execution of `net.exe` or `net1.exe` with + command-line arguments utilized to query for specific elevated domain groups. Red + Teams and adversaries alike use net.exe to enumerate elevated domain groups for + situational awareness and Active Directory Discovery to identify high privileged + users. +search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) + as lastTime from datamodel=Endpoint.Processes where (Processes.process_name="net.exe" + OR Processes.process_name="net1.exe") (Processes.process="*group*" AND Processes.process="*/do*") + (Processes.process="*Domain Admins*" OR Processes.process="*Enterprise Admins*" + OR Processes.process="*Schema Admins*" OR Processes.process="*Account Operators*" + OR Processes.process="*Server Operators*" OR Processes.process="*Protected Users*" + OR Processes.process="*Dns Admins*") 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)` + | `elevated_group_discovery_with_net_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/ +- https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-b--privileged-accounts-and-groups-in-active-directory +- https://adsecurity.org/?p=3658 +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: + - 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 + security_domain: endpoint + impact: 30 + confidence: 70 + risk_score: 21 + context: + - Source:Endpoint + - Stage:Discovery + - Stage:Recon + message: Elevated domain group discovery enumeration on $dest$ by $user$ + observable: + - name: dest + type: Endpoint + role: + - Victim + automated_detection_testing: passed diff --git a/detections/endpoint/elevated_group_discovery_with_powerview.yml b/detections/endpoint/elevated_group_discovery_with_powerview.yml new file mode 100644 index 0000000000..c770235243 --- /dev/null +++ b/detections/endpoint/elevated_group_discovery_with_powerview.yml @@ -0,0 +1,63 @@ +name: Elevated Group Discovery with PowerView +id: 10d62950-0de5-4199-a710-cff9ea79b413 +version: 1 +date: '2021-08-25' +author: Mauricio Velazco, Splunk +type: Hunting +datamodel: +- Endpoint +description: The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) + to identify the execution of the `Get-DomainGroupMember` commandlet. `Get-DomainGroupMember` + is part of PowerView, a PowerShell tool used to perform enumeration on Windows domains. + As the name suggests, `Get-DomainGroupMember` is used to list the members of an + specific domain group. Red Teams and adversaries alike use PowerView to enumerate + elevated domain groups for situational awareness and Active Directory Discovery + to identify high privileged users. +search: '`powershell` EventCode=4104 (Message = "*Get-DomainGroupMember*") AND Message + IN ("*Domain Admins*","*Enterprise Admins*", "*Schema Admins*", "*Account Operators*" + , "*Server Operators*", "*Protected Users*", "*Dns Admins*") | stats count min(_time) + as firstTime max(_time) as lastTime by EventCode Message ComputerName User | `security_content_ctime(firstTime)` + | `elevated_group_discovery_with_powerview_filter`' +how_to_implement: To successfully implement this analytic, you will need to enable + PowerShell Script Block Logging on some or all endpoints. Additional setup here + https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell. +known_false_positives: Administrators or power users may use this PowerView for troubleshooting. +references: +- https://attack.mitre.org/techniques/T1069/002/ +- https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainGroupMember/ +- https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-b--privileged-accounts-and-groups-in-active-directory +- 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-powershell.log + kill_chain_phases: + - Reconnaissance + mitre_attack_id: + - T1069.002 + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - EventCode + - Message + - ComputerName + - User + security_domain: endpoint + impact: 30 + confidence: 70 + risk_score: 21 + context: + - Source:Endpoint + - Stage:Discovery + - Stage:Recon + message: Elevated group discovery using PowerView on $dest$ by $user$ + observable: + - name: dest + type: Endpoint + role: + - Victim + automated_detection_testing: passed diff --git a/detections/endpoint/elevated_group_discovery_with_wmic.yml b/detections/endpoint/elevated_group_discovery_with_wmic.yml new file mode 100644 index 0000000000..5e057e4d6c --- /dev/null +++ b/detections/endpoint/elevated_group_discovery_with_wmic.yml @@ -0,0 +1,69 @@ +name: Elevated Group Discovery With Wmic +id: 3f6bbf22-093e-4cb4-9641-83f47b8444b6 +version: 1 +date: '2021-08-25' +author: Mauricio Velazco, Splunk +type: TTP +datamodel: +- Endpoint +description: This analytic looks for the execution of `wmic.exe` with command-line + arguments utilized to query for specific domain groups. Red Teams and adversaries + alike use net.exe to enumerate elevated domain groups for situational awareness + and Active Directory Discovery to identify high privileged users. +search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) + as lastTime from datamodel=Endpoint.Processes where (Processes.process_name="wmic.exe") + (Processes.process=*/NAMESPACE:\\\\root\\directory\\ldap*) (Processes.process="*Domain + Admins*" OR Processes.process="*Enterprise Admins*" OR Processes.process="*Schema + Admins*" OR Processes.process="*Account Operators*" OR Processes.process="*Server + Operators*" OR Processes.process="*Protected Users*" OR Processes.process="*Dns + Admins*") 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)` | `elevated_group_discovery_with_wmic_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/ +- https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-b--privileged-accounts-and-groups-in-active-directory +- https://adsecurity.org/?p=3658 +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: + - 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 + security_domain: endpoint + impact: 30 + confidence: 70 + risk_score: 21 + context: + - Source:Endpoint + - Stage:Discovery + - Stage:Recon + message: Elevated domain group discovery enumeration on $dest$ by $user$ + observable: + - name: dest + type: Endpoint + role: + - Victim + automated_detection_testing: passed diff --git a/detections/endpoint/getadgroup_with_powershell.yml b/detections/endpoint/getadgroup_with_powershell.yml new file mode 100644 index 0000000000..1e2294f765 --- /dev/null +++ b/detections/endpoint/getadgroup_with_powershell.yml @@ -0,0 +1,66 @@ +name: GetAdGroup with PowerShell +id: 872e3063-0fc4-4e68-b2f3-f2b99184a708 +version: 1 +date: '2021-08-25' +author: Mauricio Velazco, Splunk +type: Hunting +datamodel: +- Endpoint +description: This analytic looks for the execution of `powershell.exe` with command-line + arguments utilized to query for domain groups. The `Get-AdGroup` commandlnet is + used to return a list of all groups available in a Windows Domain. Red Teams and + adversaries alike may leverage this commandlet 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="powershell.exe") + (Processes.process=*Get-AdGroup*) 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)` + | `getadgroup_with_powershell_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/ +- https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-adgroup?view=windowsserver2019-ps +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: + - 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 + 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 + automated_detection_testing: passed diff --git a/detections/endpoint/getadgroup_with_powershell_script_block.yml b/detections/endpoint/getadgroup_with_powershell_script_block.yml new file mode 100644 index 0000000000..3cda8f2184 --- /dev/null +++ b/detections/endpoint/getadgroup_with_powershell_script_block.yml @@ -0,0 +1,58 @@ +name: GetAdGroup with PowerShell Script Block +id: e4c73d68-794b-468d-b4d0-dac1772bbae7 +version: 1 +date: '2021-08-25' +author: Mauricio Velazco, Splunk +type: Hunting +datamodel: +- Endpoint +description: The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) + to identify the execution of the `Get-AdGroup` commandlet. The `Get-AdGroup` commandlet + is used to return a list of all domain groups. Red Teams and adversaries may leverage + this commandlet to enumerate domain groups for situational awareness and Active + Directory Discovery. +search: '`powershell` EventCode=4104 (Message = "*Get-ADGroup*") | stats count min(_time) + as firstTime max(_time) as lastTime by EventCode Message ComputerName User | `security_content_ctime(firstTime)` + | `getadgroup_with_powershell_script_block_filter`' +how_to_implement: To successfully implement this analytic, you will need to enable + PowerShell Script Block Logging on some or all endpoints. Additional setup here + https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell. +known_false_positives: Administrators or power users may use this PowerShell commandlet + for troubleshooting. +references: +- https://attack.mitre.org/techniques/T1069/002/ +- https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-adgroup?view=windowsserver2019-ps +tags: + analytic_story: + - Active Directory Discovery + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log + kill_chain_phases: + - Reconnaissance + mitre_attack_id: + - T1069.002 + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - EventCode + - Message + - ComputerName + - User + security_domain: endpoint + impact: 30 + confidence: 50 + risk_score: 15 + context: + - Source:Endpoint + - Stage:Discovery + - Stage:Recon + message: Domain group discovery enumeration using PowerShell on $dest$ by $user$ + observable: + - name: dest + type: Endpoint + role: + - Victim + automated_detection_testing: passed diff --git a/detections/endpoint/getdomaingroup_with_powershell.yml b/detections/endpoint/getdomaingroup_with_powershell.yml new file mode 100644 index 0000000000..cd0a9f0339 --- /dev/null +++ b/detections/endpoint/getdomaingroup_with_powershell.yml @@ -0,0 +1,66 @@ +name: GetDomainGroup with PowerShell +id: 93c94be3-bead-4a60-860f-77ca3fe59903 +version: 1 +date: '2021-08-25' +author: Mauricio Velazco, Splunk +type: TTP +datamodel: +- Endpoint +description: This analytic looks for the execution of `powershell.exe` with command-line + arguments utilized to query for domain groups. `Get-DomainGroup` is part of PowerView, + a PowerShell tool used to perform enumeration on Windows domains. Red Teams and + adversaries alike may leverage PowerView 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="powershell.exe") + (Processes.process=*Get-DomainGroup*) 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)` + | `getdomaingroup_with_powershell_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/ +- https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainGroup/ +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: + - 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 + security_domain: endpoint + impact: 30 + confidence: 50 + risk_score: 15 + context: + - Source:Endpoint + - Stage:Discovery + - Stage:Recon + message: Domain group discovery with PowerView on $dest$ by $user$ + observable: + - name: dest + type: Endpoint + role: + - Victim + automated_detection_testing: passed diff --git a/detections/endpoint/getdomaingroup_with_powershell_script_block.yml b/detections/endpoint/getdomaingroup_with_powershell_script_block.yml new file mode 100644 index 0000000000..5f16f9ef06 --- /dev/null +++ b/detections/endpoint/getdomaingroup_with_powershell_script_block.yml @@ -0,0 +1,59 @@ +name: GetDomainGroup with PowerShell Script Block +id: 09725404-a44f-4ed3-9efa-8ed5d69e4c53 +version: 1 +date: '2021-08-26' +author: Mauricio Velazco, Splunk +type: TTP +datamodel: +- Endpoint +description: The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) + to identify the execution of the `Get-DomainGroup` commandlet. `Get-DomainGroup` + is part of PowerView, a PowerShell tool used to perform enumeration on Windows domains. + As the name suggests, `Get-DomainGroup` is used to query domain groups. Red Teams + and adversaries may leverage this function to enumerate domain groups for situational + awareness and Active Directory Discovery. +search: '`powershell` EventCode=4104 (Message = "*Get-DomainGroup*") | stats count + min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName + User | `security_content_ctime(firstTime)` | `getdomaingroup_with_powershell_script_block_filter`' +how_to_implement: To successfully implement this analytic, you will need to enable + PowerShell Script Block Logging on some or all endpoints. Additional setup here + https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell. +known_false_positives: Administrators or power users may use this PowerView functions + for troubleshooting. +references: +- https://attack.mitre.org/techniques/T1069/002/ +- https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainGroup/ +tags: + analytic_story: + - Active Directory Discovery + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log + kill_chain_phases: + - Reconnaissance + mitre_attack_id: + - T1069.002 + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - EventCode + - Message + - ComputerName + - User + security_domain: endpoint + impact: 30 + confidence: 50 + risk_score: 15 + context: + - Source:Endpoint + - Stage:Discovery + - Stage:Recon + message: Domain group discovery enumeration using PowerView on $dest$ by $user$ + observable: + - name: dest + type: Endpoint + role: + - Victim + automated_detection_testing: passed diff --git a/detections/endpoint/getwmiobject_ds_group_with_powershell.yml b/detections/endpoint/getwmiobject_ds_group_with_powershell.yml new file mode 100644 index 0000000000..0acaefe813 --- /dev/null +++ b/detections/endpoint/getwmiobject_ds_group_with_powershell.yml @@ -0,0 +1,68 @@ +name: GetWmiObject Ds Group with PowerShell +id: df275a44-4527-443b-b884-7600e066e3eb +version: 1 +date: '2021-08-25' +author: Mauricio Velazco, Splunk +type: TTP +datamodel: +- Endpoint +description: This analytic looks for the execution of `powershell.exe` with command-line + arguments utilized to query for domain groups. The `Get-WmiObject` commandlet combined + with the `-class ds_group` parameter can be used to return the full list of groups + in a Windows domain. Red Teams and adversaries alike may leverage WMI in this case, + using PowerShell, 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="powershell.exe") + (Processes.process=*Get-WmiObject* AND Processes.process="*namespace root\\directory\\ldap*" + AND Processes.process="*class ds_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)` + | `getwmiobject_ds_group_with_powershell_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/ +- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1 +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: + - 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 + 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 + automated_detection_testing: passed diff --git a/detections/endpoint/getwmiobject_ds_group_with_powershell_script_block.yml b/detections/endpoint/getwmiobject_ds_group_with_powershell_script_block.yml new file mode 100644 index 0000000000..c2bb3b029a --- /dev/null +++ b/detections/endpoint/getwmiobject_ds_group_with_powershell_script_block.yml @@ -0,0 +1,59 @@ +name: GetWmiObject Ds Group with PowerShell Script Block +id: 67740bd3-1506-469c-b91d-effc322cc6e5 +version: 1 +date: '2021-08-25' +author: Mauricio Velazco, Splunk +type: TTP +datamodel: +- Endpoint +description: The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) + to identify the execution of the `Get-WmiObject` commandlet used with specific parameters + . The `DS_Group` parameter leverages WMI to query for all domain groups. Red Teams + and adversaries may leverage this commandlet to enumerate domain groups for situational + awareness and Active Directory Discovery. +search: '`powershell` EventCode=4104 (Message=*Get-WmiObject* AND Message=*"namespace + root\\directory\\ldap"* AND Message=*"class ds_group"*) | stats count min(_time) + as firstTime max(_time) as lastTime by EventCode Message ComputerName User | `security_content_ctime(firstTime)` + | `getwmiobject_ds_group_with_powershell_script_block_filter`' +how_to_implement: To successfully implement this analytic, you will need to enable + PowerShell Script Block Logging on some or all endpoints. Additional setup here + https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell. +known_false_positives: Administrators or power users may use this PowerShell commandlet + for troubleshooting. +references: +- https://attack.mitre.org/techniques/T1069/002/ +- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1 +tags: + analytic_story: + - Active Directory Discovery + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log + kill_chain_phases: + - Reconnaissance + mitre_attack_id: + - T1069.002 + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - EventCode + - Message + - ComputerName + - User + security_domain: endpoint + impact: 30 + confidence: 50 + risk_score: 15 + context: + - Source:Endpoint + - Stage:Discovery + - Stage:Recon + message: Domain group discovery enumeration using PowerShell on $dest$ by $user$ + observable: + - name: dest + type: Endpoint + role: + - Victim + automated_detection_testing: passed diff --git a/tests/endpoint/domain_group_discovery_with_adsisearcher.test.yml b/tests/endpoint/domain_group_discovery_with_adsisearcher.test.yml new file mode 100644 index 0000000000..1a7c735731 --- /dev/null +++ b/tests/endpoint/domain_group_discovery_with_adsisearcher.test.yml @@ -0,0 +1,12 @@ +name: Domain Group Discovery with Adsisearcher Unit Test +tests: +- name: Domain Group Discovery with Adsisearcher + file: endpoint/domain_group_discovery_with_adsisearcher.yml + pass_condition: '| stats count | where count > 0' + earliest_time: '-24h' + latest_time: 'now' + attack_data: + - file_name: windows-powershell.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log + source: WinEventLog:Microsoft-Windows-PowerShell/Operational + sourcetype: wineventlog \ 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 diff --git a/tests/endpoint/domain_group_discovery_with_net.test.yml b/tests/endpoint/domain_group_discovery_with_net.test.yml new file mode 100644 index 0000000000..c74501e388 --- /dev/null +++ b/tests/endpoint/domain_group_discovery_with_net.test.yml @@ -0,0 +1,12 @@ +name: Domain Group Discovery With Net Unit Test +tests: +- name: Domain Group Discovery With Net + file: endpoint/domain_group_discovery_with_net.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 diff --git a/tests/endpoint/domain_group_discovery_with_wmic.test.yml b/tests/endpoint/domain_group_discovery_with_wmic.test.yml new file mode 100644 index 0000000000..a7f8f7f998 --- /dev/null +++ b/tests/endpoint/domain_group_discovery_with_wmic.test.yml @@ -0,0 +1,12 @@ +name: Domain Group Discovery With Wmic Unit Test +tests: +- name: Domain Group Discovery With Wmic + file: endpoint/domain_group_discovery_with_wmic.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 diff --git a/tests/endpoint/elevated_group_discovery_with_net.test.yml b/tests/endpoint/elevated_group_discovery_with_net.test.yml new file mode 100644 index 0000000000..c57ff3e2d5 --- /dev/null +++ b/tests/endpoint/elevated_group_discovery_with_net.test.yml @@ -0,0 +1,12 @@ +name: Elevated Group Discovery With Net Unit Test +tests: +- name: Elevated Group Discovery With Net + file: endpoint/elevated_group_discovery_with_net.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 diff --git a/tests/endpoint/elevated_group_discovery_with_powerview.test.yml b/tests/endpoint/elevated_group_discovery_with_powerview.test.yml new file mode 100644 index 0000000000..afa8c5cfae --- /dev/null +++ b/tests/endpoint/elevated_group_discovery_with_powerview.test.yml @@ -0,0 +1,12 @@ +name: Elevated Group Discovery with PowerViewUnit Test +tests: +- name: Elevated Group Discovery with PowerView + file: endpoint/elevated_group_discovery_with_powerview.yml + pass_condition: '| stats count | where count > 0' + earliest_time: '-24h' + latest_time: 'now' + attack_data: + - file_name: windows-powershell.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log + source: WinEventLog:Microsoft-Windows-PowerShell/Operational + sourcetype: wineventlog \ No newline at end of file diff --git a/tests/endpoint/elevated_group_discovery_with_wmic.test.yml b/tests/endpoint/elevated_group_discovery_with_wmic.test.yml new file mode 100644 index 0000000000..77b45b227d --- /dev/null +++ b/tests/endpoint/elevated_group_discovery_with_wmic.test.yml @@ -0,0 +1,12 @@ +name: Elevated Group Discovery With WmicUnit Test +tests: +- name: Elevated Group Discovery With Wmic + file: endpoint/elevated_group_discovery_with_wmic.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 diff --git a/tests/endpoint/getadgroup_with_powershell.test.yml b/tests/endpoint/getadgroup_with_powershell.test.yml new file mode 100644 index 0000000000..460b02ca32 --- /dev/null +++ b/tests/endpoint/getadgroup_with_powershell.test.yml @@ -0,0 +1,12 @@ +name: GetAdGroup with PowerShell Unit Test +tests: +- name: GetAdGroup with PowerShell + file: endpoint/getadgroup_with_powershell.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 diff --git a/tests/endpoint/getadgroup_with_powershell_script_block.test.yml b/tests/endpoint/getadgroup_with_powershell_script_block.test.yml new file mode 100644 index 0000000000..0a44e078a7 --- /dev/null +++ b/tests/endpoint/getadgroup_with_powershell_script_block.test.yml @@ -0,0 +1,12 @@ +name: GetAdGroup with PowerShell Script Block Unit Test +tests: +- name: GetAdGroup with PowerShell Script Block + file: endpoint/getadgroup_with_powershell_script_block.yml + pass_condition: '| stats count | where count > 0' + earliest_time: '-24h' + latest_time: 'now' + attack_data: + - file_name: windows-powershell.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log + source: WinEventLog:Microsoft-Windows-PowerShell/Operational + sourcetype: wineventlog \ No newline at end of file diff --git a/tests/endpoint/getdomaingroup_with_powershell.test.yml b/tests/endpoint/getdomaingroup_with_powershell.test.yml new file mode 100644 index 0000000000..303ec60e3d --- /dev/null +++ b/tests/endpoint/getdomaingroup_with_powershell.test.yml @@ -0,0 +1,12 @@ +name: GetDomainGroup with PowerShell Unit Test +tests: +- name: GetDomainGroup with PowerShell + file: endpoint/getdomaingroup_with_powershell.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 diff --git a/tests/endpoint/getdomaingroup_with_powershell_script_block.test.yml b/tests/endpoint/getdomaingroup_with_powershell_script_block.test.yml new file mode 100644 index 0000000000..569c34fb55 --- /dev/null +++ b/tests/endpoint/getdomaingroup_with_powershell_script_block.test.yml @@ -0,0 +1,12 @@ +name: GetDomainGroup with PowerShell Script Block Unit Test +tests: +- name: GetDomainGroup with PowerShell Script Block + file: endpoint/getdomaingroup_with_powershell_script_block.yml + pass_condition: '| stats count | where count > 0' + earliest_time: '-24h' + latest_time: 'now' + attack_data: + - file_name: windows-powershell.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log + source: WinEventLog:Microsoft-Windows-PowerShell/Operational + sourcetype: wineventlog \ No newline at end of file diff --git a/tests/endpoint/getwmiobject_ds_group_with_powershell.test.yml b/tests/endpoint/getwmiobject_ds_group_with_powershell.test.yml new file mode 100644 index 0000000000..24225be9c0 --- /dev/null +++ b/tests/endpoint/getwmiobject_ds_group_with_powershell.test.yml @@ -0,0 +1,12 @@ +name: GetWmiObject Ds Group with PowerShell Unit Test +tests: +- name: GetWmiObject Ds Group with PowerShell + file: endpoint/getwmiobject_ds_group_with_powershell.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 diff --git a/tests/endpoint/getwmiobject_ds_group_with_powershell_script_block.test.yml b/tests/endpoint/getwmiobject_ds_group_with_powershell_script_block.test.yml new file mode 100644 index 0000000000..0e862eae33 --- /dev/null +++ b/tests/endpoint/getwmiobject_ds_group_with_powershell_script_block.test.yml @@ -0,0 +1,12 @@ +name: GetWmiObject Ds Group with PowerShell Script Block Unit Test +tests: +- name: GetWmiObject Ds Group with PowerShell Script Block + file: endpoint/getwmiobject_ds_group_with_powershell_script_block.yml + pass_condition: '| stats count | where count > 0' + earliest_time: '-24h' + latest_time: 'now' + attack_data: + - file_name: windows-powershell.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log + source: WinEventLog:Microsoft-Windows-PowerShell/Operational + sourcetype: wineventlog \ No newline at end of file