Detection rules › Splunk
User_Domain Enumeration Tool - Windows (PowerShell)
Adversaries may attempt to get a listing of domain accounts. This information can help adversaries determine which domain accounts exist to aid in follow-on behavior. This use case detects the execution of ADSISearcher or ADFind or parameters filtering for user or domain enumeration
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | T1136.002 Create Account: Domain Account |
| Discovery | T1087.002 Account Discovery: Domain Account |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| PowerShell | Event ID 4103 | Payload Context: ContextInfo User Data: UserData. |
| PowerShell | Event ID 4104 | Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule body yaml
id: '17165.27786'
title: User_Domain Enumeration Tool - Windows
description: 'Adversaries may attempt to get a listing of domain accounts. This information
can help adversaries determine which domain accounts exist to aid in follow-on behavior.
This use case detects the execution of ADSISearcher or ADFind or parameters filtering
for user or domain enumeration. -- Threat Actor Association: Alloy Taurus/Gallium
-- Atomics T1087.002 Test #7 Atomics T1087.002 Test #12 Atomics T1087.002 Test #13
Atomics T1087.002 Test #14 Atomics T1087.002 Test #16'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_powershell` (TERM(EventCode=4103) OR
"<EventID>4103<" OR TERM(EventCode=4104) OR "<EventID>4104<") (TERM(adsisearcher)
OR "adsisearcher") OR (TERM(adfind) OR "adfind") OR (TERM(kerbrute) OR "kerbrute")
("searchroot" OR "objectcategory=" OR "userenum") | regex process="(?i)searchroot|objectcategory=|userenum"
| table _time, host, user, user, process | bin span=1s | stats values(*) as * by
_time, host '
techniques:
- discovery:account discovery:domain account
- discovery:account discovery
- persistence:create account:domain account
technique_id:
- T1087.002
- T1136.002
data_category:
- PowerShell logs
references:
- https://devblogs.microsoft.com/scripting/use-the-powershell-adsisearcher-type-accelerator-to-search-active-directory/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_powershell` (TERM(EventCode=4103) OR "<EventID>4103<" OR TERM(EventCode=4104) OR "<EventID>4104<") (TERM(adsisearcher) OR "adsisearcher") OR (TERM(adfind) OR "adfind") OR (TERM(kerbrute) OR "kerbrute") ("searchroot" OR "objectcategory=" OR "userenum")
Stage 2: regex
| regex process="(?i)searchroot|objectcategory=|userenum"
Stage 3: table
| table _time, host, user, user, process
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
Search terms
Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.
| Stage | Term |
|---|---|
| 1 | TERM |
| 1 | "<EventID>4103<" |
| 1 | TERM |
| 1 | "<EventID>4104<" |
| 1 | TERM |
| 1 | adsisearcher |
| 1 | "adsisearcher" |
| 1 | TERM |
| 1 | adfind |
| 1 | "adfind" |
| 1 | TERM |
| 1 | kerbrute |
| 1 | "kerbrute" |
| 1 | "searchroot" |
| 1 | "objectcategory=" |
| 1 | "userenum" |