How the attack works
Credentials alone do not tell an attacker what they can reach. The next step is to read IAM: which users, groups and roles exist, which policies they hold, and which roles trust whom. GetAccountAuthorizationDetails answers all of it in one request, because it returns every IAM user, group, role and policy in the account together with their relationships. The credential report, produced with GenerateCredentialReport and downloaded with GetCredentialReport, lists all users and the status of their passwords, access keys and MFA devices, which shows who has no MFA and whose keys are old.
A principal that lacks these permissions falls back to the narrower List and Get calls and often tries them one after another to see which succeed. CloudTrail records them as management events under iam.amazonaws.com, with the caller in userIdentity, and a denied call carries an errorCode. They are read operations, so a trail has to log Read events to hold them. Each call is ordinary on its own, and audit tools make the same calls every day. The rules on this page therefore combine two single events that expose a lot at once with a threshold rule that counts how many different IAM read calls one principal makes in a short window.
What an attacker needs
- Valid credentials for any principal in the account, for example a leaked access key or a role session taken from a workload.
- IAM read permissions on that principal, which broad read-only and audit policies commonly include. Without them the attempts still appear in CloudTrail as denied calls.
Impact
A map of the account's identities and permissions: who is an administrator, which roles can be assumed and by whom, which users have no MFA or old access keys. Nothing is changed by the enumeration itself. It tells the attacker which escalation path to take next, and it is often the earliest sign that a credential is in the wrong hands.
Detection rules
IAM Account Authorization Details Retrieved
Detects GetAccountAuthorizationDetails calls. The call returns all IAM users, groups, roles and policies of the account with their relationships to one another, which AWS describes as a snapshot of the configuration of IAM permissions. Audit and posture tools use it for that reason, and so does anyone who wants to plan a privilege escalation. It is a read-only management event, so the trail has to log Read events. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.
title: IAM Account Authorization Details Retrieved
id: 25078296-5e3c-48e7-8912-8bae440cc06b
status: experimental
description: >-
Detects GetAccountAuthorizationDetails calls. The call returns all IAM
users, groups, roles and policies of the account with their relationships
to one another, which AWS describes as a snapshot of the configuration of
IAM permissions. Audit and posture tools use it for that reason, and so
does anyone who wants to plan a privilege escalation. It is a read-only
management event, so the trail has to log Read events.
It also matches attempts that failed (errorCode present): check errorCode,
because an unauthorized attempt is worth seeing.
references:
- https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html
- https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html
- https://attack.mitre.org/techniques/T1087/004/
author: Forestall
date: 2026-11-16
tags:
- attack.discovery
- attack.t1087.004
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: iam.amazonaws.com
eventName: GetAccountAuthorizationDetails
condition: selection
falsepositives:
- Cloud security posture tools, identity security scanners and audit scripts, which call it on a schedule. Allow-list the roles they use and alert on every other caller.
level: low
False positives
- Cloud security posture tools, identity security scanners and audit scripts, which call it on a schedule. Allow-list the roles they use and alert on every other caller.
IAM Credential Report Generated or Retrieved
Detects GenerateCredentialReport and GetCredentialReport calls. The credential report lists all users of the account and the status of their passwords, access keys and MFA devices, so it shows at a glance which users have no MFA and whose access keys are old. IAM classifies both actions as read access, so make sure the trail logs Read management events and not only Write events. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.
title: IAM Credential Report Generated or Retrieved
id: 909b2776-3bf9-41ad-874c-c235619c37bc
status: experimental
description: >-
Detects GenerateCredentialReport and GetCredentialReport calls. The
credential report lists all users of the account and the status of their
passwords, access keys and MFA devices, so it shows at a glance which users
have no MFA and whose access keys are old. IAM classifies both actions as
read access, so make sure the trail logs Read management events and not
only Write events.
It also matches attempts that failed (errorCode present): check errorCode,
because an unauthorized attempt is worth seeing.
references:
- https://docs.aws.amazon.com/IAM/latest/APIReference/API_GenerateCredentialReport.html
- https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetCredentialReport.html
- https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html
author: Forestall
date: 2026-11-16
tags:
- attack.discovery
- attack.t1087.004
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: iam.amazonaws.com
eventName:
- GenerateCredentialReport
- GetCredentialReport
condition: selection
falsepositives:
- Compliance and posture tools and AWS services that evaluate IAM credentials, which request the report on a schedule, and administrators who download it from the console. Allow-list those roles and alert on every other caller.
level: low
False positives
- Compliance and posture tools and AWS services that evaluate IAM credentials, which request the report on a schedule, and administrators who download it from the console. Allow-list those roles and alert on every other caller.
Many Different IAM Read Calls by One Principal
Counts, per calling principal (userIdentity.arn), how many different IAM List and Get operations it called. Ten or more different operations within 10 minutes is the pattern of someone working through the IAM read API to map users, groups, roles and policies, or testing which of these calls a credential is allowed to make. Denied calls are counted as well, because a run of denied read calls is the same activity with fewer permissions. The count and the window are starting points to tune. IAM read calls are read-only management events, so the trail has to log Read events. For role sessions the principal is the session ARN, so one role used with different session names is counted per session.
Fires when one userIdentity.arn has at least 10 different eventName values within 10 minutes.
title: IAM List or Get Call (Enumeration Base Event)
id: 1b57fd2c-6a90-45c1-a5ec-bf99e3c313c3
name: aws_iam_list_or_get_call
status: experimental
description: >-
Base event of the threshold rule in this file. Any CloudTrail event from
iam.amazonaws.com whose event name starts with List or Get, which are the
read operations of the IAM API. Calls that were denied are included.
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: iam.amazonaws.com
eventName|startswith:
- List
- Get
condition: selection
level: low
---
title: Many Different IAM Read Calls by One Principal
id: bb72e833-3b4c-436c-b588-2da9ef9270e6
status: experimental
description: >-
Counts, per calling principal (userIdentity.arn), how many different IAM
List and Get operations it called. Ten or more different operations within
10 minutes is the pattern of someone working through the IAM read API to
map users, groups, roles and policies, or testing which of these calls a
credential is allowed to make. Denied calls are counted as well, because a
run of denied read calls is the same activity with fewer permissions. The
count and the window are starting points to tune. IAM read calls are
read-only management events, so the trail has to log Read events. For role
sessions the principal is the session ARN, so one role used with different
session names is counted per session.
references:
- https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html
- https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html
- https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html
- https://attack.mitre.org/techniques/T1087/004/
author: Forestall
date: 2026-11-16
tags:
- attack.discovery
- attack.t1087.004
correlation:
type: value_count
rules:
- aws_iam_list_or_get_call
group-by:
- userIdentity.arn
timespan: 10m
condition:
field: eventName
gte: 10
falsepositives:
- Cloud security posture tools, audit and compliance scanners and infrastructure-as-code tools that refresh their state. Exclude the roles they use.
- Administrators who browse users, roles and policies in the IAM console, which makes many different read calls for each page. Exclude identity administrators or give them a higher count.
- The values of 10 different operations and 10 minutes are starting points, not tested limits. Measure what your own tools and administrators produce and adjust both.
level: medium
False positives
- Cloud security posture tools, audit and compliance scanners and infrastructure-as-code tools that refresh their state. Exclude the roles they use.
- Administrators who browse users, roles and policies in the IAM console, which makes many different read calls for each page. Exclude identity administrators or give them a higher count.
- The values of 10 different operations and 10 minutes are starting points, not tested limits. Measure what your own tools and administrators produce and adjust both.
Triage
- Identify the principal (userIdentity.arn), its access key, the source address and the user agent. Decide whether this is a known audit tool, an identity administrator in the console, or a workload identity that has no reason to read IAM.
- Count the calls that carry an errorCode. Many denied calls in a row mean that someone is testing what the credentials allow.
- Check whether this principal has made IAM read calls before, and whether the access key is being used from a new address.
- Look at what follows from the same principal, with priority on IAM write calls such as new access keys, policy changes and trust policy updates, and on AssumeRole calls into roles it has just read.
Response
Once the attack is confirmed:
- Deactivate the access key or revoke the role sessions of the principal that made the calls, and rotate the credential at its source.
- Assume that the attacker now knows the IAM layout of the account. Review the identities this data exposes as weak, such as users without MFA, old access keys and roles with a broad trust policy, and fix those first.
- Review everything the principal did after the enumeration, and the activity of every role it assumed.
- Find out how the credential was exposed, for example in code, in a build log or on a compromised workload, and close that source.
- Remove the IAM read permissions from the principal if its work does not need them.
Mitigation
- Grant IAM read permissions only to the people and tools that review access. Workload roles and application users rarely need them.
- Restrict iam:GetAccountAuthorizationDetails, iam:GenerateCredentialReport and iam:GetCredentialReport to security and audit roles.
- Record Read management events in a trail or event data store. These calls are read-only events, and a trail that keeps only Write events holds no trace of them.
- Replace long-term access keys with roles and temporary credentials, so that a leaked credential expires before it can be used to explore the account.
- Keep a list of the roles your audit and posture tools use, so that their calls can be told apart from everyone else's.
Frequently asked questions
Why is a single GetAccountAuthorizationDetails call worth an alert?
AWS describes the call as a snapshot of the configuration of IAM permissions. It returns all users, groups, roles and policies in the account, including their relationships to one another. A caller that receives this answer needs no further enumeration to plan an escalation, so one successful call from an unexpected principal exposes as much as hundreds of narrower calls.
Why are these events missing from my SIEM?
They are read-only management events. A trail or event data store can be set to log Read events, Write events or both, and one that logs only Write events does not contain them. The rules on this page need Read management events, and the IAM calls of the whole account must reach the SIEM, not only the changes.
Which legitimate activity produces the same pattern?
Cloud security posture tools, audit and compliance scanners, infrastructure-as-code tools that refresh their state, and administrators who browse the IAM console all make many different IAM read calls in a short time. The pattern is suspicious when it comes from a workload role, an application user, a new source address or an access key that has never read IAM before.
Does the threshold rule also count calls that were denied?
Yes. The base event matches every IAM call whose name starts with List or Get, whether it succeeded or carries an errorCode. A principal that tries one read call after another and is denied each time is counted in the same way, and that sequence is a strong sign of someone testing a stolen credential.
References
- MITRE ATT&CK T1087.004: Account Discovery: Cloud Account
- IAM API Reference: GetAccountAuthorizationDetails
- IAM API Reference: GenerateCredentialReport
- IAM API Reference: GetCredentialReport
- Generate credential reports for your AWS account
- Logging IAM and AWS STS API calls with AWS CloudTrail
- Logging management events (Read and Write events)
- Revoke IAM role temporary security credentials