Skip to content
Adam Omar Saleh

TVX CTF 2026 placeholder badge (unofficial)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 placeholder badge (unofficial)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

Challenge page
Challenge page

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.

Text
read evidence → POST {id, answer} to /api/submit ×6 → join fragments → flag

02

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:

JavaScript
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

#CardAnswerFragment
1IAM / delegationiam:PassRoleROLE_HANDOFF
2IAM / trustlambda.amazonaws.comLAMBDA_TRUST
3S3 / public accessBlockPublicPolicyPUBLIC_POLICY
4Secrets ManagerGetSecretValueSECRET_READ
5STS / attributionFinanceReadOnlyROLE_SESSION
6KMS / authorizationkms:DecryptKMS_DECRYPT
  1. The Borrowed Identity. The BuildPublisher policy allows lambda:CreateFunction and iam:PassRole on the FinanceReadOnly role. Attaching a role to a new Lambda function is authorized by iam:PassRole.

  2. The Trust Boundary. The role's trust policy has "Principal": {"Service": "lambda.amazonaws.com"}, limited by SourceArn to the nightly-recon function.

  3. The Policy That Slipped Through. The bucket policy grants s3:GetObject to "*". BlockPublicPolicy: false is the control that would have rejected that public bucket policy.

  4. The Read Hidden in the Noise. ListSecrets and DescribeSecret only return the list and metadata. GetSecretValue returns the secret itself; the KMS Decrypt that follows is Secrets Manager acting on the caller's behalf.

  5. Role or Session? In arn:aws:sts::492610738155:assumed-role/FinanceReadOnly/release-8821, the role name is FinanceReadOnly and release-8821 is the session name.

  6. The Last Authorization Check. The error is "not authorized to perform kms:Decrypt on the key". The role has secretsmanager:GetSecretValue but also needs kms:Decrypt on the customer-managed key.

Step 2: Submitting

solve.py posts all six answers and assembles the flag:

Text
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

Python
import requests​URL = "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

Python
import requests​URL = "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:PassRole on a privileged role combined with lambda:CreateFunction lets a principal run code as that role, which is a classic privilege-escalation path.

  • BlockPublicPolicy is 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:GetSecretValue and kms: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.

PDF edition

Writeup PDF

Formatted edition of this walkthrough, built from my source notes · 5 pages.