Skip to content
Adam Omar Saleh

Chronos Security logo, as used by CSCTF 2026CSCTF 2026Web

Cyberboy

Relay Desk is a multi-tenant console: each unit is a tenant, and the theatre master key lives with the Theatre Relay Authority (KL-01, "Kestrel Lead").

Competition
Chronos Security logo, as used by CSCTF 2026CSCTF 2026
Category
WebHard (829 pts)
Source status
Source-documented · not platform-verified
Document
PDF edition2 min read

Brief

The challenge

Category
Web
Difficulty
Hard (829 pts)
Author
Chronos Security
Target
http://w03.ctf.chronos-security.ro:33472
Login
a.reyes / relay-bramble-27 (unit Bramble 14, analyst)

TL;DR

Relay Desk is a multi-tenant console: each unit is a tenant, and the theatre master key lives with the Theatre Relay Authority (KL-01, "Kestrel Lead"). An ordinary analyst can walk all the way to the master bundle by chaining two broken authorization checks:

  1. Self-service tenant hop. PATCH /api/profile lets you set duty_assignment to any unit id, and POST /api/profile/refresh re-issues the session scope from that field without checking you are actually posted there. Setting duty_assignment = KL-01 re-scopes the analyst session to the relay authority tenant.

  2. Export tier confusion. POST /api/rotations/{ref}/export takes a tier in the body and seals the bundle at whatever tier you name. It never checks the requested tier against the rotation's authorized_tier. Exporting an already-approved KL-01 rotation with {"tier":"master"} returns the theatre-custody master bundle, whose authorization_code is the flag.

No ref forging is needed: rotation refs are signed (rr_<b64(UNIT:SEQ)>.<hmac>), but once scoped to KL-01 the API hands back the real signed refs.

Recon

  • /api/openapi.json documents the API. Key notes: sessions cache "the effective unit scope from the account's home unit"; duty_assignment "feeds the session scope at the next refresh"; export "seals the rotation's key bundle at the named tier".

  • Logged in as a.reyes: role: analyst, home_unit: BR-14, scope: BR-14.

  • GET /api/units lists six units; KL-01 is detachment "Theatre Relay Authority" — the custodian of the theatre master key.

  • Ref format: rr_S0wtMDE6OQ... → base64 S0wtMDE6OQ = KL-01:9, followed by an HMAC. Refs encode unit:seq and are signed, so they can't be guessed for a tenant you can't see.

Solve steps

  1. POST /api/session with {"username":"a.reyes","password":"relay-bramble-27"} → rdsession cookie, scope BR-14.

  2. PATCH /api/profile with {"duty_assignment":"KL-01"} → accepted (no check that the analyst is posted to KL-01).

  3. POST /api/profile/refresh → session re-scoped to KL-01.

  4. GET /api/rotations now returns KL-01's rotations with valid signed refs. Pick seq 9 (rr_S0wtMDE6OQ.eadac5728f2dfe50), already approved (two sign-offs present), so no approval forgery is required.

  5. POST /api/rotations/rr_S0wtMDE6OQ.eadac5728f2dfe50/export with {"tier":"master"}:

JSON
{"bundle":{"bundle_id":"SEAL-B9653817B2","tier":"master","custody":"theatre", "unit":"KL-01","crypto_period":"DAWN-KILO-09", "key_fingerprint":"2a:86:c9:50:35:6c", "authorization_code":"CSCTF{ZwG4kNU9D8U2daYooELqXORh}","sealed_at":"..."}}

Root cause

  • The session scope is derived from a client-controllable profile field (duty_assignment) with no authorization binding it to the account's real postings — a horizontal/vertical privilege escalation across tenants.

  • The export endpoint trusts the client-supplied tier and does not constrain it to the rotation's authorized_tier (theater), allowing a master seal.

Flag

Flag

CSCTF{ZwG4kNU9D8U2daYooELqXORh}

Source-documented · not platform-verified

PDF edition

Writeup PDF

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