T1069.002 Splunk · SPL

Detect Domain Groups in Splunk

Adversaries may attempt to find domain-level groups and permission settings. The knowledge of domain-level permission groups can help adversaries determine which groups exist and which users belong to a particular group. Adversaries may use this information to determine which users have elevated permissions, such as domain administrators. Commands such as net group /domain, dscacheutil -q group on macOS, and ldapsearch on Linux can list domain-level groups. Tools such as BloodHound, AdFind, and AD Explorer are also commonly used for this purpose by threat actors including OilRig, FIN7, Volt Typhoon, LAPSUS$, and ToddyCat.

MITRE ATT&CK

Tactic
Discovery
Technique
T1069 Permission Groups Discovery
Sub-technique
T1069.002 Domain Groups
Canonical reference
https://attack.mitre.org/techniques/T1069/002/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1) OR (sourcetype="WinEventLog:Security" EventCode=4688)
| eval CommandLine=coalesce(CommandLine, ProcessCommandLine)
| eval Image=coalesce(Image, NewProcessName)
| eval ParentImage=coalesce(ParentImage, ParentProcessName)
| eval CommandLineLower=lower(CommandLine)
| eval ImageLower=lower(Image)
| eval IsNetGroup=if(match(ImageLower, "(\\\\net\.exe|\\\\net1\.exe)") AND match(CommandLineLower, "group") AND match(CommandLineLower, "(/domain|domain admins|enterprise admins|schema admins|domain controllers|group policy)"), 1, 0)
| eval IsPowerShellAD=if(match(ImageLower, "(\\\\powershell\.exe|\\\\pwsh\.exe)") AND match(CommandLineLower, "(get-adgroup|get-adgroupmember|get-domaingroup|get-netgroup|directorysearcher|objectclass=group|samaccounttype)"), 1, 0)
| eval IsADTool=if(match(ImageLower, "(adfind\.exe|sharphound\.exe|bloodhound\.exe|adexplorer\.exe|adexplorer64\.exe)"), 1, 0)
| eval IsDSQuery=if(match(ImageLower, "(\\\\dsquery\.exe|\\\\dsget\.exe)") AND match(CommandLineLower, "group"), 1, 0)
| eval IsLDAPSearch=if(match(CommandLineLower, "(ldapsearch|ldap.*objectclass.*group)"), 1, 0)
| eval DetectionScore=IsNetGroup + IsPowerShellAD + IsADTool + IsDSQuery + IsLDAPSearch
| where DetectionScore > 0
| eval TargetingPrivilegedGroup=if(match(CommandLineLower, "(domain admins|enterprise admins|schema admins|administrators|domain controllers|group policy creator)"), 1, 0)
| eval SuspiciousParent=if(match(lower(ParentImage), "(wscript\.exe|cscript\.exe|mshta\.exe|winword\.exe|excel\.exe|outlook\.exe|powerpnt\.exe|cmd\.exe)"), 1, 0)
| eval DetectionMethod=case(IsNetGroup=1, "net group /domain", IsPowerShellAD=1, "PowerShell AD Enumeration", IsADTool=1, "Known AD Enumeration Tool", IsDSQuery=1, "dsquery/dsget group", IsLDAPSearch=1, "LDAP Group Search", true(), "Unknown")
| table _time, host, User, Image, CommandLine, ParentImage, DetectionMethod, TargetingPrivilegedGroup, SuspiciousParent, DetectionScore
| sort - _time
medium severity high confidence

Detects domain group enumeration using Sysmon Event ID 1 (Process Creation) and Security Event ID 4688 (Process Creation with command line auditing). Evaluates multiple enumeration methods including net group /domain, PowerShell AD cmdlets, known tools like AdFind and BloodHound, dsquery commands, and LDAP searches. Flags commands targeting privileged groups (Domain Admins, Enterprise Admins) and suspicious parent process relationships indicative of script-driven or phishing-initiated discovery.

Data Sources

Process: Process CreationCommand: Command ExecutionSysmon Event ID 1Windows Security Event ID 4688

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/OperationalWinEventLog:Security

False Positives & Tuning

  • IT administrators running legitimate Active Directory audits or health checks using net group or PowerShell AD cmdlets
  • Helpdesk staff using AD management tools to look up group memberships when resolving user access issues
  • Monitoring and SIEM agents performing scheduled AD enumeration as part of their normal operation
  • Automated scripts used during onboarding or offboarding processes that check group membership to provision or deprovision access
  • Vulnerability scanners and compliance tools that enumerate AD groups as part of their assessment scope
Download portable Sigma rule (.yml)

Other platforms for T1069.002


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Net Group Domain Admin Enumeration

    Expected signal: Sysmon Event ID 1: Process Create with Image=net.exe or net1.exe, CommandLine containing 'group' and '/domain'. Security Event ID 4688 (if command line auditing is enabled). On the domain controller, Security Event ID 4661 may appear if SACL auditing is configured on Domain Admins group object.

  2. Test 2PowerShell Active Directory Module Group Enumeration

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Get-ADGroup' and 'Get-ADGroupMember'. Sysmon Event ID 3: LDAP network connections (port 389 or 3268) from powershell.exe to domain controller IP. PowerShell ScriptBlock Log Event ID 4104 with the full command. Sysmon Event ID 11: File creation event for groups_out.txt in %TEMP%.

  3. Test 3AdFind Domain Group Enumeration

    Expected signal: Sysmon Event ID 1: Process Create with Image=AdFind.exe, CommandLine containing '-f' and 'objectClass=group'. Sysmon Event ID 3: Network connections from AdFind.exe to domain controller on LDAP port 389 or Global Catalog port 3268. Sysmon Event ID 11: Output files created in %TEMP%. Prefetch file created at C:\Windows\Prefetch\ADFIND.EXE-*.pf.

  4. Test 4dsquery Group Enumeration

    Expected signal: Sysmon Event ID 1: Process Create with Image=dsquery.exe and Image=dsget.exe, CommandLine containing 'group'. Security Event ID 4688 if command line auditing is enabled. Sysmon Event ID 3: LDAP connections (port 389) from dsquery.exe to domain controller.

Unlock Pro Content

Get the full detection package for T1069.002 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections