Cloud Security

6 CloudTrail Signals of AWS IAM Privilege Escalation

November 30, 2026 · 6 min read · By CloudAI Security
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.

PathIAM call to watchWhy it escalates
Policy version swapCreatePolicyVersion with setAsDefault=true, SetDefaultPolicyVersionReplaces permissions for every attached identity at once
Attach a broader policyAttachRolePolicy, AttachUserPolicy, AttachGroupPolicyAdds a wildcard or AdministratorAccess policy to an existing principal
Inline policy writePutRolePolicy, PutUserPolicyGrants new permissions with no managed policy object to review
Trust policy editUpdateAssumeRolePolicyLets a lower-privileged principal assume a more privileged role
New credential or boundary removalCreateAccessKey, CreateLoginProfile, UpdateLoginProfile, DeleteRolePermissionsBoundaryCreates 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.

SignalWhat to inspectCommon false positive
CreatePolicyVersion with setAsDefault=truePolicy ARN, the new document, and whether the caller is a deployment roleTerraform replacing a policy document during apply
PutRolePolicy on a role the caller does not ownWhether the caller’s own policy allows that specific role ARNA platform script that writes inline policies
UpdateAssumeRolePolicy on an admin or deploy roleThe new Principal block and the session durationAdding a partner account during onboarding
CreateAccessKey for a different userWhether the target user already had keys and who requested itA new engineer onboarding scripted by IT
DeleteRolePermissionsBoundaryAny call at all; this should be rareA planned boundary redesign
iam:PassRole followed by a compute createThe role ARN passed versus what the service needsCI 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.

  1. 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.
  2. 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 responseElements is what you roll back to.
  3. Check what came before. Look back through the same principal’s events for ConsoleLogin, AssumeRole or CreateAccessKey. An escalation that follows an unusual login is an incident, not drift.
  4. 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.
  5. Contain. Set the previous policy version as default, detach the policy, delete the new access key or login profile, and call RevokeOlderSessions on the affected role before investigating further.
  6. 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