CSCTF 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
CSCTF 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:
Self-service tenant hop.
PATCH /api/profilelets you setduty_assignmentto any unit id, andPOST /api/profile/refreshre-issues the session scope from that field without checking you are actually posted there. Settingduty_assignment = KL-01re-scopes the analyst session to the relay authority tenant.Export tier confusion.
POST /api/rotations/{ref}/exporttakes atierin the body and seals the bundle at whatever tier you name. It never checks the requested tier against the rotation'sauthorized_tier. Exporting an already-approvedKL-01rotation with{"tier":"master"}returns the theatre-custody master bundle, whoseauthorization_codeis 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.jsondocuments 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/unitslists six units;KL-01is detachment "Theatre Relay Authority" — the custodian of the theatre master key.Ref format:
rr_S0wtMDE6OQ...→ base64S0wtMDE6OQ=KL-01:9, followed by an HMAC. Refs encodeunit:seqand are signed, so they can't be guessed for a tenant you can't see.
Solve steps
POST /api/sessionwith{"username":"a.reyes","password":"relay-bramble-27"}→rdsessioncookie, scopeBR-14.PATCH /api/profilewith{"duty_assignment":"KL-01"}→ accepted (no check that the analyst is posted toKL-01).POST /api/profile/refresh→ session re-scoped toKL-01.GET /api/rotationsnow returnsKL-01's rotations with valid signed refs. Pickseq 9(rr_S0wtMDE6OQ.eadac5728f2dfe50), alreadyapproved(two sign-offs present), so no approval forgery is required.POST /api/rotations/rr_S0wtMDE6OQ.eadac5728f2dfe50/exportwith{"tier":"master"}:
{"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
tierand does not constrain it to the rotation'sauthorized_tier(theater), allowing amasterseal.
Flag
Flag
CSCTF{ZwG4kNU9D8U2daYooELqXORh}
Source-documented · not platform-verified