Skip to main content
Challenges Cloud IAM: policy scope and AssumeRole chain
Misc Hard Evaluating a CloudTrail AssumeRole chain and IAM policies (NotAction, Condition) Solves: 3

Cloud IAM: policy scope and AssumeRole chain

Author: CyberSamSU
Points
85

The SOC team detected access without MFA into an AWS account from an unknown IP address outside the corporate network (10.20.0.0/16) using a leaked static AKIA... key. In the account, CloudTrail is enabled only for Management Events (control plane: sts:AssumeRole and IAM/management calls), and S3 Data Events logs were not recorded.

You are given the cloud_iam_audit.zip package:

  • cloudtrail/events.json.gz — CloudTrail Records log (corporate background traffic and attacker actions);
  • iam/policies_snapshot.json — IAM users, roles (Tags, TrustPolicy, AttachedPolicies, InlinePolicies), managed policies (ManagedPolicies), and S3 BucketPolicies;
  • s3_objects/<bucket>/<key>.b64 — base64-encoded JSON copies of S3 objects (containing many decoy tokens).

Task: first, trace the successful sts:AssumeRole chain (responseElements.credentials.accessKeyId -> userIdentity.accessKeyId) performed without MFA from an external IP in the CloudTrail log to determine the roles assumed by the attacker and the session context (aws:SourceIp, aws:MultiFactorAuthPresent, aws:PrincipalTag/clearance). Then, evaluate the role and bucket policies according to AWS IAM evaluation rules (Explicit Deny > Explicit Allow > Implicit Deny, wildcard *, NotAction, Condition operators: StringEquals, StringNotEquals, StringLike, Bool, IpAddress, NotIpAddress) to find the only S3 object that the attacker could read with s3:GetObject. Decode the object from base64 and obtain the audit_token value. Flag format: BAYROQ{...} (the last 16 characters are lowercase hexadecimal digits).

Attached files
cloud_iam_audit.zip Log in to download
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −8 pts Log in
Hint 2 −17 pts Log in
Hint 3 −25 pts Log in
To submit a flag, log in.

First solvers

1. Odam 25.11.2026
2. Mirjaxon Qaxxarov 25.11.2026
3. Asmaa Mottery 27.11.2026