TVX CTF 2026Cloud
Mission: Broken Trust
A simulated AWS incident (“Shadow Cloud — Advanced Investigation”) with six evidence cards. Each card asks for one exact AWS name, and each correct answer unlocks a fragment of the flag.
- Competition
TVX CTF 2026
- Category
- CloudEasy · estimated
- Source status
- Confirmed by challenge service · recorded in source
- Document
- PDF edition5 min read
Brief
The challenge
- Competition
- TVX CTF 2026
- Category
- Cloud Security (platform category: Cloud)
- Difficulty
- Easy — estimated, not an official rating
- Points
- 120
- Solves
- 39 on the challenge card when captured
- Challenge author
- Ahmed Alwedyan
- Verification
- Confirmed by the challenge service (recorded in source)
Difficulty: Easy (estimated). TVX CTF 2026 did not publish difficulty ratings; the challenge cards show only points and solve counts. Six short questions, each answerable from the evidence card beside it, plus basic AWS terminology (IAM, Lambda, S3, Secrets Manager, CloudTrail, KMS). No exploitation is needed. The card showed 39 solves when captured.
01
Overview
Every things are Here

A simulated AWS incident (“Shadow Cloud — Advanced Investigation”) with six evidence cards. Each card asks for one exact AWS name, and each correct answer unlocks a fragment of the flag.
Solution path in brief
The site ("Shadow Cloud — Advanced Investigation") is a simulated AWS incident with six evidence cards. Each card asks for one exact AWS name that can be read straight from the evidence. Every correct answer sent to /api/submit returns a fragment, and app.js builds the flag as TVX{ + fragments joined with _ + } in card order.
read evidence → POST {id, answer} to /api/submit ×6 → join fragments → flag02
Initial investigation
The first step was to read the client-side JavaScript to see how answers are checked and how the flag is assembled.
Recon
The page loads /app.js. On submit it sends POST /api/submit with {"id": "<card>", "answer": "<text>"}, and the reply is {"correct": true, "piece": "..."}. Once all six are solved:
document.getElementById("finalFlag").textContent = `TVX{${orderedPieces.join("_")}}`;The card ids, in order, are iam, trust, s3, secret, trail, kms.
03
Tools used
Web browser (site and
app.js)Python 3 with
requests(solve.py)
04
Step-by-step process
Step 1: The six answers
| # | Card | Answer | Fragment |
|---|---|---|---|
| 1 | IAM / delegation | iam:PassRole | ROLE_HANDOFF |
| 2 | IAM / trust | lambda.amazonaws.com | LAMBDA_TRUST |
| 3 | S3 / public access | BlockPublicPolicy | PUBLIC_POLICY |
| 4 | Secrets Manager | GetSecretValue | SECRET_READ |
| 5 | STS / attribution | FinanceReadOnly | ROLE_SESSION |
| 6 | KMS / authorization | kms:Decrypt | KMS_DECRYPT |
The Borrowed Identity. The
BuildPublisherpolicy allowslambda:CreateFunctionandiam:PassRoleon theFinanceReadOnlyrole. Attaching a role to a new Lambda function is authorized byiam:PassRole.The Trust Boundary. The role's trust policy has
"Principal": {"Service": "lambda.amazonaws.com"}, limited bySourceArnto thenightly-reconfunction.The Policy That Slipped Through. The bucket policy grants
s3:GetObjectto"*".BlockPublicPolicy: falseis the control that would have rejected that public bucket policy.The Read Hidden in the Noise.
ListSecretsandDescribeSecretonly return the list and metadata.GetSecretValuereturns the secret itself; the KMSDecryptthat follows is Secrets Manager acting on the caller's behalf.Role or Session? In
arn:aws:sts::492610738155:assumed-role/FinanceReadOnly/release-8821, the role name isFinanceReadOnlyandrelease-8821is the session name.The Last Authorization Check. The error is "not authorized to perform kms:Decrypt on the key". The role has
secretsmanager:GetSecretValuebut also needskms:Decrypton the customer-managed key.
Step 2: Submitting
solve.py posts all six answers and assembles the flag:
iam iam:PassRole 200 {'correct': True, 'piece': 'ROLE_HANDOFF'}trust lambda.amazonaws.com 200 {'correct': True, 'piece': 'LAMBDA_TRUST'}s3 BlockPublicPolicy 200 {'correct': True, 'piece': 'PUBLIC_POLICY'}secret GetSecretValue 200 {'correct': True, 'piece': 'SECRET_READ'}trail FinanceReadOnly 200 {'correct': True, 'piece': 'ROLE_SESSION'}kms kms:Decrypt 200 {'correct': True, 'piece': 'KMS_DECRYPT'}TVX{ROLE_HANDOFF_LAMBDA_TRUST_PUBLIC_POLICY_SECRET_READ_ROLE_SESSION_KMS_DECRYPT}05
Commands and code
Solve script
import requestsURL = "https://ctf-tke5.onrender.com/api/submit"ANSWERS = { "iam": "iam:PassRole", "trust": "lambda.amazonaws.com", "s3": "BlockPublicPolicy", "secret": "GetSecretValue", "trail": "FinanceReadOnly", "kms": "kms:Decrypt",}pieces = []for pid, answer in ANSWERS.items(): data = requests.post(URL, json={"id": pid, "answer": answer}, timeout=60).json() pieces.append(data["piece"])print("TVX{" + "_".join(pieces) + "}")Full source: solve.py: submit the six answers and assemble the flag
import requestsURL = "https://ctf-tke5.onrender.com/api/submit"ANSWERS = { "iam": "iam:PassRole", "trust": "lambda.amazonaws.com", "s3": "BlockPublicPolicy", "secret": "GetSecretValue", "trail": "FinanceReadOnly", "kms": "kms:Decrypt",}pieces = []for pid, answer in ANSWERS.items(): r = requests.post(URL, json={"id": pid, "answer": answer}, timeout=60) data = r.json() print(pid, answer, r.status_code, data) pieces.append(data.get("piece", "?"))print("TVX{" + "_".join(pieces) + "}")06
Technical explanation
The six cards follow a typical cloud privilege chain: a role handed to a service through iam:PassRole, a Lambda trust relationship, an S3 bucket exposed because BlockPublicPolicy was off, secrets read with GetSecretValue, a CloudTrail session tied to a role, and data decrypted with kms:Decrypt. Because the server validates every answer and returns a fragment, each part of the final flag was confirmed independently.
Key lessons
iam:PassRoleon a privileged role combined withlambda:CreateFunctionlets a principal run code as that role, which is a classic privilege-escalation path.BlockPublicPolicyis the S3 Block Public Access setting that stops a public bucket policy from being applied. The ACL settings don't cover it.An assumed-role ARN has the form
assumed-role/<RoleName>/<SessionName>. Attribute actions to the role, and use the session name to trace who assumed it.Reading a secret encrypted with a customer-managed key needs both
secretsmanager:GetSecretValueandkms:Decrypt.
07
Flag
Flag
TVX{ROLE_HANDOFF_LAMBDA_TRUST_PUBLIC_POLICY_SECRET_READ_ROLE_SESSION_KMS_DECRYPT}
Confirmed by challenge service · recorded in source
08
Verification status
Status: Confirmed by the challenge service (recorded in source).
Each answer was posted to the challenge's /api/submit endpoint, which returns a flag fragment only for a correct answer. The six fragments were joined the same way the site's app.js joins them. Scoreboard acceptance of the assembled flag is not separately documented.
Source evidence in the archive: WRITEUP.md, solve.py, images/00_challenge.png.
09
Conclusion
A compact tour of the AWS permissions that typically appear in an incident timeline. Reading the client code first turned a six-step quiz into a deterministic, scriptable submission.
Prepared by Adam Omar Saleh from the archived solve notes in broken_trust/. Commands, code, output and screenshots are reproduced from the source; no results were added. Difficulty is an estimate.