T1069 Microsoft Sentinel · KQL

Detect Permission Groups Discovery in Microsoft Sentinel

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/

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
let GroupDiscoveryCommands = dynamic([
  "net group", "net localgroup", "net user /domain",
  "Get-ADGroup", "Get-ADGroupMember", "Get-LocalGroup", "Get-LocalGroupMember",
  "dsquery group", "dsget group",
  "gpresult", "whoami /groups", "whoami /all",
  "id ", "id;", "groups ", "getent group",
  "SharpHound", "BloodHound"
]);
let SuspiciousParents = dynamic([
  "cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe",
  "mshta.exe", "rundll32.exe", "regsvr32.exe", "svchost.exe"
]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where (
    // net.exe based group enumeration
    (FileName =~ "net.exe" or FileName =~ "net1.exe")
    and ProcessCommandLine has_any ("group", "localgroup")
  ) or (
    // PowerShell AD/local group cmdlets
    (FileName =~ "powershell.exe" or FileName =~ "pwsh.exe")
    and ProcessCommandLine has_any ("Get-ADGroup", "Get-ADGroupMember", "Get-LocalGroup", "Get-LocalGroupMember", "Get-ADPrincipalGroupMembership")
  ) or (
    // dsquery/dsget LDAP group enumeration
    (FileName =~ "dsquery.exe" or FileName =~ "dsget.exe")
    and ProcessCommandLine has "group"
  ) or (
    // whoami with group flags — common post-exploitation recon
    FileName =~ "whoami.exe"
    and ProcessCommandLine has_any ("/groups", "/all", "/priv")
  ) or (
    // gpresult — Group Policy result showing group memberships
    FileName =~ "gpresult.exe"
  ) or (
    // BloodHound / SharpHound collector binaries
    ProcessCommandLine has_any ("SharpHound", "BloodHound", "-CollectionMethod", "--CollectionMethods")
  )
| extend IsDomainGroupQuery = ProcessCommandLine has_any ("/domain", "net group", "dsquery group", "Get-ADGroup")
| extend IsLocalGroupQuery = ProcessCommandLine has_any ("localgroup", "Get-LocalGroup", "whoami /groups")
| extend IsBloodHound = ProcessCommandLine has_any ("SharpHound", "BloodHound", "-CollectionMethod")
| extend SuspiciousParent = InitiatingProcessFileName has_any (SuspiciousParents)
| project Timestamp, DeviceName, AccountName, AccountDomain,
         FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         IsDomainGroupQuery, IsLocalGroupQuery, IsBloodHound, SuspiciousParent
| sort by Timestamp desc
medium severity medium confidence

Detects permission group discovery activity using Microsoft Defender for Endpoint DeviceProcessEvents. Covers net.exe/net1.exe group enumeration (both local and domain), PowerShell AD cmdlets (Get-ADGroup, Get-ADGroupMember, Get-LocalGroup), dsquery/dsget LDAP queries, whoami /groups and /all flags, gpresult execution, and BloodHound/SharpHound collector usage. Flags whether each event targets domain groups, local groups, or appears to be automated BloodHound collection. Parent process context is captured to identify execution from unexpected interpreters.

Data Sources

Process: Process CreationCommand: Command ExecutionMicrosoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives & Tuning

  • IT administrators and helpdesk staff routinely running net localgroup or net group to troubleshoot access issues
  • Active Directory management scripts and scheduled tasks using Get-ADGroup or Get-ADGroupMember for account provisioning
  • Security tools and monitoring agents (e.g., CrowdStrike, Tenable) that enumerate group memberships as part of posture assessment
  • Software installation processes that check for membership in local Administrators or specific service groups
  • Legitimate BloodHound usage by authorized red team or vulnerability management teams with change management records
  • GPO deployment verification scripts using gpresult to confirm policy application to the correct groups
Download portable Sigma rule (.yml)

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections