DL·SYS
Contact ↗

CSCTF 2026 · Web · 887 pts

Landfall.

An observer account, a duplicate-key parser differential, and an archived Ed25519 grant that only needed a non-canonical scalar.

JSON parser differentialEd25519 malleabilityCAPReplay
EventCSCTF 2026, Operation Dawn (online jeopardy)
CategoryWeb
Points887
StatusSolved during the event
TargetANWA National Alert Origination Gateway (assigned container)

TL;DR. The v1 batch endpoint checks the caller's role with a case-insensitive duplicate-key lookup, then dispatches using the exact-case key, so one body can be preview to the gate and dispatch to the worker. The archived NAA-08 grant needed for the area was already consumed twice, but the server deduplicates grants on sha256(signature) and its Ed25519 verifier does not reduce S modulo the group order, so S + 2L verifies and hashes differently.

Challenge

A fabricated evacuation order is live under ANWA authority. Dispatcher roles were revoked at 03:11, leaving an observer account on the National Alert Origination Gateway. The broadcast centre still honours authorised cancellations: build one, get it on air, and the confirmation code returned by the broadcast is the flag.

The console at / issues the observer credential. The schema, CAP feed, archive, authority/key references and audit ledger are all served live by the instance.

First look

The console exposed one account, n.falk / 16e13e66882a, with role observer and authority NAA-06. Logging in returned a bearer token. The obvious move, submitting an order with "operation": "cancel", failed: the API has no cancel operation. A CAP Cancel has to go out as a dispatch.

POST /api/v1/session
{"operator":"n.falk","passphrase":"16e13e66882a"}
-> {"token":"...","role":"observer","authority":"NAA-06"}

Two reads shaped the rest of the solve. GET /feed/cap/current gave the fabricated order ANWA-CAP-9d74cc30-9eb7 for areas AS-BRA and AS-SER. GET /audit/ledger explained the intended bug class in plain text:

authorization single-use is enforced on sig_sha256
grant G-f42dbb5714 consumed twice with different sig_sha256
verifier_disagreement: noncanonical_scalar: scalar S not reduced modulo
  group order; accepted downstream, rejected by RFC 8032 conformant verifier

The observer grant is NAA-06, but the fabricated order is NAA-08/Extreme. Scope is derived server-side, so the console credential cannot cover the area. The archive entry ANWA-CAP-bc9c4072-b10c carried the matching NAA-08/Extreme dispatch grant in an XML comment.

Dead ends

Solution

1. Restore a valid grant identity

The dedup key is the hash of the 64-byte signature, not the grant ID. Ed25519 signatures are R || S; adding the group order to S keeps the equation valid for a verifier that forgets to reduce S, while changing the bytes and therefore the hash.

L = 2**252 + 27742317777372353535851937790883648493
sig = b64url_decode(archived_sig)          # 64 bytes
R, S = sig[:32], int.from_bytes(sig[32:], "little")
S2 = S + 2 * L
malleated = R + S2.to_bytes(32, "little")  # new sha256, same validity
open("sig.bin", "wb").write(malleated)

With S + 2L the new sig_sha256 was e39a7300…, absent from the ledger. The canonical signature hashed to 2df54d96… and the S + L variant to d247c56b…; both were burned.

2. Split the role gate from the worker

The v2 validating decoders reject duplicate member names. The v1 passthrough does not, and the two consumers disagree about case. The gate lowercases keys and lets the last one win; dispatch reads the exact key.

{"operation":"dispatch","Operation":"preview", ...}
-> 422 authorization.missing
{"operation":"preview","Operation":"dispatch", ...}
-> 403 role_required

The first body passes the gate. The duplicate-key lookup is case-insensitive and takes the last matching member, so the role check reads Operation: preview, which an observer may request. The dispatcher then reads the exact-case operation key, sees dispatch, and proceeds to authorization. Its 422 is progress: the role check is behind us. The second body reverses the values, so the gate reads Operation: dispatch and rejects with 403 before the dispatcher runs.

3. Compute the release digest and broadcast

The unlock value is a SHA-256 over the normalised broadcast fields:

sha256("landfall|ANWA-CAP-9d74cc30-9eb7|G-f42dbb5714|AS-BRA,AS-SER")
= 90f03210f84ec646e92a635f71278ca35653c5a024be980d621472d99bd550da

Posting the cancellation with the malleated grant and that digest returned status: BROADCAST, the channel, and the release digest containing the flag. The current CAP feed does not change afterwards; the broadcast response is the authoritative acceptance.

Flag

FlagCSCTF{a6SvUKOx2SDR9prVCD0RUBhn}

What I took from it