Those accounts may serve people, services, support teams or administrators. A directory query needs session and role context before an analyst can call it suspicious.
How it works
MITRE places this sub-technique under Account Discovery (T1087). An authenticated principal may query a cloud identity directory or a provider’s IAM service for user and role records. The result can show which identities exist and which have elevated access. Discovery is a separate action from using a valid cloud account to gain or retain access.
MITRE lists identity and role queries across cloud providers and office suites. The same read operations also support routine administration. Check the principal’s assigned role, the session, the source device and the timing against a known inventory task. Then join related queries across accounts or tenants before deciding what happened.
A real example
MITRE lists APT29 as an example of Azure AD account enumeration. Elastic Security Labs mapped repeated GetCallerIdentity calls across eight identities in four AWS accounts to T1087.004; it says the calls checked credentials, not all users. Google Threat Intelligence Group and Mandiant reported that COLD RELIC exported full Google Workspace employee lists. Google mapped that directory export to T1087.004.
Who uses it
How to detect
-
Review IAM and directory queries
MITRE DET0386 calls for review of identity and role enumeration through cloud APIs, command interfaces and scripts. Compare the principal and its assigned role with the expected inventory workflow.
-
Join sessions across accounts
MITRE AN1088 flags cloud account queries from endpoints or cloud shells where they are unusual. Elastic recommends correlating first-time GetCallerIdentity calls by principal, source network and time across accounts.
-
Inspect bulk user exports
MITRE AN1089 and AN1090 cover unusual directory listings and access by apps outside normal roles. Google recommends reviewing Workspace Admin audit events for User List Download, especially from an unknown device.
-
Check what followed
Compare a suspicious query with later role changes, sign-ins and other cloud audit events. Elastic linked separate alerts through a shared source IP in its case, while Google used admin audit logs to review directory export activity.
How to defend
-
Audit identity discovery rights
MITRE M1047 recommends checking who can list IAM identities or otherwise discover cloud accounts. Confirm that each granted permission matches the user's or service's job.
-
Apply least privilege
MITRE M1018 recommends limiting account discovery rights and the number of administrators. Review IAM users, roles and policies on a regular schedule.
-
Reduce standing privilege
MITRE M1018 also recommends reducing permanent privileged role assignments. Remove access that is no longer needed and review entitlements after role changes.
-
Investigate unexpected exports
For a Workspace user list download outside a known admin task, Google recommends scrutiny of the device and session. Preserve the audit context and check for other activity before making a containment decision.
Frequently Asked Questions
Does GetCallerIdentity list all AWS users?
No. Elastic described it as a way to check which stolen credentials still worked. Elastic mapped repeated calls across several identities and accounts to T1087.004 in that case.
Can a legitimate administrator trigger these signals?
Yes. MITRE's detection strategy calls out unexpected users, automation accounts, endpoints and cloud shells. Compare the query with the administrator's role, device, session and scheduled work.
How does this differ from T1078.004?
T1087.004 covers discovery of cloud accounts. MITRE uses T1078.004 for misuse of a valid cloud account. An investigation may find both actions, but they describe different behavior.
Sources
- Account Discovery: Cloud Account, T1087.004MITRE ATT&CK
- Account Discovery, T1087MITRE ATT&CK
- 56 AWS API calls in 141 milliseconds: Inside an AI-run intrusionElastic Security Labs
- COLD RELIC: A Case Study in Impersonation and CompromiseGoogle Threat Intelligence Group and Mandiant
- Valid Accounts: Cloud Accounts, T1078.004MITRE ATT&CK
