Domain Groups
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.
let DomainGroupCommands = dynamic([
"net group", "net localgroup /domain",
"Get-ADGroup", "Get-ADGroupMember",
"dsquery group", "dsget group",
"adfind", "AdFind",
"ldapsearch",
"dscacheutil",
"Get-DomainGroup", "Get-NetGroup",
"PowerView",
"System.DirectoryServices",
"DirectorySearcher",
"samAccountType",
"objectClass=group"
]);
let SuspiciousTools = dynamic([
"adfind.exe", "AdFind.exe",
"SharpHound.exe", "bloodhound.exe",
"ADExplorer.exe", "adexplorer64.exe",
"ldapsearch"
]);
let NetGroupEvents = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "net.exe" or FileName =~ "net1.exe"
| where ProcessCommandLine has "group" and (
ProcessCommandLine has "/domain" or
ProcessCommandLine has "domain admins" or
ProcessCommandLine has "enterprise admins" or
ProcessCommandLine has "domain controllers" or
ProcessCommandLine has "schema admins" or
ProcessCommandLine has "group policy creator"
)
| extend DetectionSource = "net group /domain";
let PowerShellADEvents = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("powershell.exe", "pwsh.exe")
| where ProcessCommandLine has_any ("Get-ADGroup", "Get-ADGroupMember", "Get-DomainGroup", "Get-NetGroup", "DirectorySearcher", "objectClass=group", "samAccountType")
| extend DetectionSource = "PowerShell AD Group Enumeration";
let ToolBasedEvents = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName has_any (SuspiciousTools)
| extend DetectionSource = "Known AD Enumeration Tool";
let DSQueryEvents = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("dsquery.exe", "dsget.exe")
| where ProcessCommandLine has "group"
| extend DetectionSource = "dsquery/dsget group enumeration";
union NetGroupEvents, PowerShellADEvents, ToolBasedEvents, DSQueryEvents
| extend IsElevatedContext = AccountName in~ ("Administrator", "SYSTEM") or InitiatingProcessFileName in~ ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe", "mshta.exe")
| extend TargetingPrivilegedGroups = ProcessCommandLine has_any ("domain admins", "enterprise admins", "schema admins", "administrators", "domain controllers")
| project Timestamp, DeviceName, AccountName, AccountDomain, FileName,
ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine,
InitiatingProcessAccountName, DetectionSource, IsElevatedContext, TargetingPrivilegedGroups
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- 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 (e.g., Microsoft Defender for Identity, CrowdStrike Falcon) 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 (e.g., Tenable, Qualys) that enumerate AD groups as part of their assessment scope
References (11)
- https://attack.mitre.org/techniques/T1069/002/
- https://attack.mitre.org/techniques/T1069/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.002/T1069.002.md
- https://docs.microsoft.com/en-us/sysinternals/downloads/adexplorer
- https://www.joeware.net/freetools/tools/adfind/
- https://bloodhound.readthedocs.io/en/latest/
- https://github.com/BloodHoundAD/BloodHound
- https://www.secureworks.com/blog/bronze-silhouette-volt-typhoon
- https://www.microsoft.com/security/blog/2022/03/22/dev-0537-criminal-actor-targeting-organizations-for-data-exfiltration-and-destruction/
- https://www.kaspersky.com/about/press-releases/2023_toddycat
- https://learn.microsoft.com/en-us/defender-for-identity/reconnaissance-discovery-alerts
Unlock Pro Content
Get the full detection package for T1069.002 including response playbook, investigation guide, and atomic red team tests.