CSCTF 2026 · Network · 540 pts
grid-watch.
A live drone over raw MAVLink2 only accepts signed, non-replayed commands — and the provisioning key for signing them is derivable entirely from its own broadcast nonce and the capture's clock drift.
| Event | CSCTF 2026, Operation Dawn (online jeopardy) |
|---|---|
| Category | Network |
| Points | 540 |
| Status | Solved during the event |
| Target | Live TCP MAVLink2 unit |
TL;DR. MAVLink2's SETUP_SIGNING message lets a connected client install a shared signing key, but the unit only accepts the installation if it's HMAC-authenticated with a provisioning key derived via HKDF from the unit's serial number, a commissioning epoch recoverable from capture timestamps, and a nonce the unit broadcasts on connect.
Challenge
Make a live MAVLink2 drone accept a reposition command; unsigned or replayed commands are refused.
First look
A 24-frame capture of signed MAVLink2 traffic gives the unit's serial, CX-FALCON-9951. Fitting the signing timestamps in those frames against wall-clock time recovers the commissioning epoch (1733965123) and a small RTC drift (17 ppm) that has to be compensated when computing fresh timestamps.
Solution
On connect, the live unit announces a provisioning nonce (PROV NONCE <16 hex>). The provisioning key is:
prov_key = HKDF-SHA256(
ikm = serial_ascii || epoch_u64_le,
salt = bytes.fromhex(nonce),
info = "CX-PROV/v1",
L = 32
)Send a MAVLink2 SETUP_SIGNING message (msgid 256) signed with prov_key to install a working session signing key, then send, in order: DO_SET_MODE (176, GUIDED), COMPONENT_ARM_DISARM (400), and MAV_CMD_DO_REPOSITION (192) with the capture's observed parameters. The unit accepts the signed reposition command and returns the flag in its STATUSTEXT.
Gotcha
MAVLink2 sorts a message's fields by size on the wire, not declaration order, so SETUP_SIGNING is packed <QBB32s> (the 8-byte initial_timestamp first), not the naive <BB32sQ>. The wrong order still passes the signature check (it covers the raw payload either way) and the unit even replies "signing re-provisioned", but it installs a garbage key and every later message is rejected as a bad signature — a trap that looks like success until the next step fails.
Flag
CSCTF{iJM0vqOVl8YhcLZWy2QlylrX}What I took from it
- MAVLink2 field ordering on the wire is by size, not declaration order — getting that subtly wrong still produces a message the receiver accepts as well-formed, just with the wrong content, which can hide the bug one step further down the chain than expected.