VeriKQL by Kaushik Saha

T1087 Account Discovery

Discoveryon attack.mitre.org

ATT&CK Enterprise 20.0 · 20.1 released, update in review

How MITRE detects it

DET0587 Enumeration of User or Account Information Across Platforms

AN1612 Windows

Detection of processes performing local or domain account enumeration by invoking account directory queries or security APIs followed by structured output of account lists. The defender observes command execution or API invocation patterns that retrieve account information and produce enumeration artifacts shortly afterward.

MITRE log sourceIn Microsoft Sentinel
WinEventLog:SysmonEventCode=1
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (1)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (1)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:SecurityEventCode=4688
  • Windows Security Events via AMA → SecurityEvent
    SecurityEvent | where EventID in (4688)
  • Security Events via Legacy Agent → SecurityEvent
    SecurityEvent | where EventID in (4688)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel == "Security" | where EventID in (4688)

The same events land in SecurityEvent (Windows Security Events connectors) or WindowsEvent (Windows Event Forwarding); many built-in rules read SecurityEvent only.

WinEventLog:SecurityEventCode=4798, 4799
  • Windows Security Events via AMA → SecurityEvent
    SecurityEvent | where EventID in (4798, 4799)
  • Security Events via Legacy Agent → SecurityEvent
    SecurityEvent | where EventID in (4798, 4799)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel == "Security" | where EventID in (4798, 4799)

The same events land in SecurityEvent (Windows Security Events connectors) or WindowsEvent (Windows Event Forwarding); many built-in rules read SecurityEvent only.

AN1613 Linux

Enumeration of users and groups through suspicious shell commands or unauthorized access to /etc/passwd or /etc/shadow.

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLPATHNot mapped to Sentinel yet.
linux:SysmonEventCode=1
  • [Deprecated] Microsoft Sysmon For Linux → Syslog
    Syslog | where ProcessName == "sysmon"

AN1614 macOS

Detection of account enumeration through directory service queries or system utilities accessing account metadata stores, followed by structured enumeration output.

MITRE log sourceIn Microsoft Sentinel
macos:unifiedlogprocess eventNot mapped to Sentinel yet.
macos:unifiedlogDirectoryService queries retrieving account informationNot mapped to Sentinel yet.

AN1615 IaaS

Detection of enumeration of identity entities through cloud provider APIs where principals retrieve account metadata such as IAM users or roles in rapid succession.

MITRE log sourceIn Microsoft Sentinel
AWS:CloudTrailDescribeUsers / ListUsers / GetUserNot mapped to Sentinel yet.

AN1616 Identity Provider

Detection of identity directory enumeration through API calls or administrative queries retrieving multiple account objects within a short interval.

MITRE log sourceIn Microsoft Sentinel
azure:signinlogsGraph API Query
  • Microsoft Entra ID → SigninLogs
    SigninLogs
  • Microsoft Entra ID → AADNonInteractiveUserSignInLogs
    AADNonInteractiveUserSignInLogs
  • Microsoft Entra ID → AADServicePrincipalSignInLogs
    AADServicePrincipalSignInLogs
  • Microsoft Entra ID → AADManagedIdentitySignInLogs
    AADManagedIdentitySignInLogs
saas:oktaUser Enumeration EventsNot mapped to Sentinel yet.

AN1617 ESXi

Detection of enumeration activity when system processes query ESXi host account configuration or management APIs to retrieve user account listings.

MITRE log sourceIn Microsoft Sentinel
esxi:vpxdvCenter ManagementNot mapped to Sentinel yet.

AN1618 SaaS

Account enumeration via bulk access to user directory features or hidden APIs.

MITRE log sourceIn Microsoft Sentinel
gcp:auditDirectory API AccessNot mapped to Sentinel yet.

AN1619 Office Suite

Account discovery via VBA macros, COM objects, or embedded scripting.

MITRE log sourceIn Microsoft Sentinel
m365:unifiedScripted Activityinterpreted
  • Microsoft 365 (formerly Office 365) → OfficeActivity
    OfficeActivity | where OfficeWorkload in ("Exchange", "SharePoint", "OneDrive", "MicrosoftTeams")
  • Microsoft Defender XDR → CloudAppEvents
    CloudAppEvents

The Office 365 connector brings the Exchange, SharePoint and Teams workloads of the unified audit log; Entra sign-ins in it are in SigninLogs; CloudAppEvents carries Microsoft 365 app activity.

Content Hub rules tagged with it (57)

Showing 25 of 57.

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

How the Content Hub rules for T1087 are built: their tables, filters, joins, schedules and windows.

In Sigma rules

41 SigmaHQ community rules name it or one of its sub-techniques in their tags.

Showing 25 of 41: stable rules first, then by level.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

Mitigations

Sub-techniques

MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.