6 CloudTrail Signals of AWS IAM Privilege Escalation

AWS IAM privilege escalation shows up in CloudTrail as a small set of IAM write calls: a new default policy version, a freshly attached managed policy, an inline policy on a role, a changed trust policy, or a new access key for someone who never had one. Detecting it means alerting on those calls by name, scoring them against the caller’s normal behavior, and knowing which ones your automation is expected to make. This guide lists the escalation paths, the exact CloudTrail signals for each, a six-step triage order, and the limits of GuardDuty, IAM Access Analyzer and permissions boundaries.
Runtime detections catch container escapes inside a cluster, as covered in 5 eBPF Runtime Detections That Catch Container Escapes, but IAM escalation never touches a pod. It happens entirely in the control plane, which is why the audit trail is where the evidence lands.
Where IAM Escalation Happens
MITRE ATT&CK sub-technique T1078.004 (Valid Accounts: Cloud Accounts) records that misconfigurations in role assignments or role assumption policies can let a valid cloud account leverage permissions outside its intended scope. In AWS that plays out through five concrete paths, and each one is a separate IAM API call that CloudTrail records as a management event.
The quietest path is a policy version swap. Switching the default version of an existing customer managed policy applies that version to every identity it is attached to, so an attacker who holds iam:CreatePolicyVersion on one policy changes the permissions of every role using it without attaching anything or firing an attachment alert.
| Path | IAM call to watch | Why it escalates |
|---|---|---|
| Policy version swap | CreatePolicyVersion with setAsDefault=true, SetDefaultPolicyVersion | Replaces permissions for every attached identity at once |
| Attach a broader policy | AttachRolePolicy, AttachUserPolicy, AttachGroupPolicy | Adds a wildcard or AdministratorAccess policy to an existing principal |
| Inline policy write | PutRolePolicy, PutUserPolicy | Grants new permissions with no managed policy object to review |
| Trust policy edit | UpdateAssumeRolePolicy | Lets a lower-privileged principal assume a more privileged role |
| New credential or boundary removal | CreateAccessKey, CreateLoginProfile, UpdateLoginProfile, DeleteRolePermissionsBoundary | Creates a persistent way in or removes the ceiling on the role |
CloudTrail Signals Worth Alerting
Each event carries the fields you need to separate an infrastructure-as-code pipeline from a compromised key. userIdentity tells you whether the caller is a role, an IAM user or an assumed session; requestParameters holds the policy ARN and document; responseElements holds the new version ID; and the readOnly flag is false for every call in the table above. The next table turns those fields into alert logic with the false positive each one usually produces.
| Signal | What to inspect | Common false positive |
|---|---|---|
CreatePolicyVersion with setAsDefault=true | Policy ARN, the new document, and whether the caller is a deployment role | Terraform replacing a policy document during apply |
PutRolePolicy on a role the caller does not own | Whether the caller’s own policy allows that specific role ARN | A platform script that writes inline policies |
UpdateAssumeRolePolicy on an admin or deploy role | The new Principal block and the session duration | Adding a partner account during onboarding |
CreateAccessKey for a different user | Whether the target user already had keys and who requested it | A new engineer onboarding scripted by IT |
DeleteRolePermissionsBoundary | Any call at all; this should be rare | A planned boundary redesign |
iam:PassRole followed by a compute create | The role ARN passed versus what the service needs | CI deploying a Lambda function with its usual execution role |
Two event details sharpen the signal. A policy document in requestParameters that contains "Effect": "Allow" with "Action": "*", or a Principal of "*", is a stronger indicator than the call itself. GuardDuty’s Discovery finding names GetRolePolicy and ListAccessKeys as typical reconnaissance calls; a policy write from the same key shortly after is the sequence that matters, not either call on its own.
Triage Each Finding
Work the alert in this order so containment comes before root cause, and keep it as your checklist the next time an IAM write alert fires.
- Identify the caller. Pull
userIdentity, the source IP, the user agent and the role session name. A session from a CI system is a different problem from an IAM user with long-lived keys. - Read the new policy document. Compare the previous default version with the new one and note every added action and resource. The version ID in
responseElementsis what you roll back to. - Check what came before. Look back through the same principal’s events for
ConsoleLogin,AssumeRoleorCreateAccessKey. An escalation that follows an unusual login is an incident, not drift. - Match against expected change. Confirm whether a change ticket, a pipeline run or an infrastructure-as-code commit corresponds to the policy ARN and timestamp. No matching change means treat it as unauthorized.
- Contain. Set the previous policy version as default, detach the policy, delete the new access key or login profile, and call
RevokeOlderSessionson the affected role before investigating further. - Close the path. Add a deny for the specific
iam:write actions outside a break-glass role, and record the event with the version IDs you restored.
Native Tools and Their Limits
GuardDuty consumes CloudTrail management events and emits IAM findings tied to the access key that made the call. Its PrivilegeEscalation:IAMUser/AnomalousBehavior finding sits in the anomalous-behavior family, where the model scores each IAM API request against the calling identity, its source location and the specific API requested. That baseline is both the strength and the weakness: a human or a key that suddenly starts writing policies stands out, a deployment role that writes policies every day does not, and a role created last week has little history to compare against.
IAM Access Analyzer answers a different question. It uses logic-based reasoning over resource-based policies to flag resources shared with external principals and validates policy documents against grammar and AWS best practices. It tells you that a trust policy now allows an outside account; it does not tell you who changed it or when. Pair it with the CloudTrail alerts above.
Permissions boundaries are the control most teams assume will stop this. A boundary on a role looks like a ceiling, yet permissions boundaries cap what identity-based policies can grant but do not cap what a resource-based policy can grant. A trust policy that lets a low-privilege principal assume an admin role is a resource-based grant, so boundaries alone leave that path open. Close it with a service control policy that denies iam:UpdateAssumeRolePolicy and sts:AssumeRole outside approved principals, and restrict iam:PassRole the same way you would deploy-time provenance checks, a topic covered in 6 Gates to Verify Artifact Provenance Before Deploy.
Reviewed 30 November 2026 against the AWS IAM, GuardDuty and MITRE ATT&CK pages listed below. Event and field names follow the IAM and CloudTrail API references; the triage order and the signal-to-false-positive mapping are our own.
Sources
- MITRE ATT&CK: Valid Accounts: Cloud Accounts (T1078.004)
- AWS IAM User Guide: Versioning IAM policies
- Amazon GuardDuty User Guide: IAM finding types
- Amazon GuardDuty User Guide: What is Amazon GuardDuty?
- AWS IAM User Guide: Using AWS Identity and Access Management Access Analyzer
- AWS IAM User Guide: Policies and permissions in AWS Identity and Access Management