Detect Permission Groups Discovery in Elastic Security
Adversaries may attempt to discover group and permission settings to understand which user accounts and groups are available, group memberships, and which users and groups have elevated permissions. This information informs targeting decisions and enables privilege escalation, lateral movement, and persistence planning. Common enumeration methods include native Windows commands (net group, net localgroup), PowerShell cmdlets (Get-ADGroup, Get-LocalGroup), LDAP queries, BloodHound/SharpHound collection, Linux identity commands (id, groups, getent group), and cloud-provider APIs. Threat actors including APT41, TA505, Volt Typhoon, and Scattered Spider have used these techniques in real-world intrusions.
MITRE ATT&CK
- Tactic
- Discovery
- Technique
- T1069 Permission Groups Discovery
- Canonical reference
- https://attack.mitre.org/techniques/T1069/
Elastic Detection Query
process where event.type == "start" and (
(
process.name in~ ("net.exe", "net1.exe")
and process.args : ("group", "localgroup")
) or (
process.name in~ ("powershell.exe", "pwsh.exe")
and process.command_line : ("*Get-ADGroup*", "*Get-ADGroupMember*", "*Get-LocalGroup*", "*Get-LocalGroupMember*", "*Get-ADPrincipalGroupMembership*")
) or (
process.name in~ ("dsquery.exe", "dsget.exe")
and process.command_line : "*group*"
) or (
process.name : "whoami.exe"
and process.args : ("/groups", "/all", "/priv")
) or (
process.name : "gpresult.exe"
) or (
process.command_line : ("*SharpHound*", "*BloodHound*", "*-CollectionMethod*", "*--CollectionMethods*")
) or (
process.name in~ ("id", "groups", "getent")
and process.parent.name in ("bash", "sh", "zsh", "dash", "python", "python3", "perl", "ruby")
)
) Detects permission group discovery activity (MITRE T1069) by monitoring process execution for Windows group enumeration commands (net group, dsquery, whoami /groups), PowerShell AD/local group cmdlets, BloodHound/SharpHound collectors, and Linux identity commands (id, groups, getent group). Covers both domain and local group enumeration patterns used by APT41, TA505, Volt Typhoon, and Scattered Spider.
Data Sources
Required Tables
False Positives & Tuning
- IT administrators running routine AD health checks or group membership audits using Get-ADGroup or net group commands during normal operations
- Helpdesk staff using gpresult or whoami /groups to troubleshoot user permissions and Group Policy application issues
- Legitimate security tools and SIEM agents enumerating local groups during asset inventory or compliance scanning
- DevOps pipelines or configuration management tools (Ansible, Chef, Puppet) querying group membership to validate provisioning state
- BloodHound or SharpHound legitimately run by red team or internal penetration testing teams with prior authorization
Other platforms for T1069
Testing Methodology
Validate this detection against 5 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.
- Test 1Local Group Enumeration via net.exe
Expected signal: Sysmon Event ID 1: Two Process Create events for net.exe (or net1.exe, which net.exe spawns internally). CommandLine values: 'net localgroup' and 'net localgroup Administrators'. Security Event ID 4688 if command line auditing is enabled. Parent process will be cmd.exe or the shell used to execute the commands.
- Test 2Domain Group Enumeration via net.exe
Expected signal: Sysmon Event ID 1: Process Create for net.exe with CommandLine 'net group /domain' and 'net group "Domain Admins" /domain'. Network connection to domain controller on port 389 (LDAP) or 445 (SMB SAMR protocol). On the domain controller: Security Event ID 4661/4662 may fire for SAM group object access.
- Test 3PowerShell Active Directory Group Enumeration
Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Get-ADGroup' and 'Get-ADGroupMember'. PowerShell ScriptBlock Log Event ID 4104 capturing the full script content. LDAP network traffic to domain controller on port 389/636.
- Test 4whoami Group Membership Query
Expected signal: Sysmon Event ID 1: Two Process Create events for whoami.exe. CommandLine values: 'whoami /groups' and 'whoami /all'. No network traffic (local token query). Output includes SID values, group names, and enabled privileges — this data is often captured via screen scraping in interactive sessions.
- Test 5Linux Group Discovery via id and getent
Expected signal: Linux auditd: syscall execve events for /usr/bin/id, /usr/bin/groups, /usr/bin/getent with respective arguments. Syslog entries if exec auditing is enabled. On systems with osquery or EDR agents: process creation events for each command with full argument lists.
References (11)
- https://attack.mitre.org/techniques/T1069/
- https://attack.mitre.org/techniques/T1069/001/
- https://attack.mitre.org/techniques/T1069/002/
- https://attack.mitre.org/techniques/T1069/003/
- https://www.crowdstrike.com/blog/hidden-administrative-accounts-bloodhound-to-the-rescue/
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceprocessevents-table
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/net-group
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.001/T1069.001.md
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.002/T1069.002.md
- https://github.com/BloodHoundAD/BloodHound
- https://www.mandiant.com/resources/blog/apt41-initiates-global-intrusion-campaign-using-multiple-exploits
Unlock Pro Content
Get the full detection package for T1069 including response playbook, investigation guide, and atomic red team tests.