Overview
A fictional controller (CTRL-A) incident review was “compromised by poisoned evidence”. The originals survive only as four printed dossiers (A–D) at a physical Incident Desk where no electronic devices are allowed (pen and notepad only). Eight candidate containment cases exist; exactly one is cryptographically authentic, chronologically valid after clock correction, authorised by an IR_LEAD with a GRANTED CTRL-A-CONTAIN permit, following the safe order REVOKE > SNAPSHOT > ISOLATE > HOLD, independently witnessed (OBSERVED TX then CONFIRMED RX for the same HOLD event), and sealed in a custody receipt that carries a 20-hex VAULT_NONCE.
The 11 evidence values from that case are submitted to a portal, which returns a team-specific TEAM_SEAL_NONCE. That seal plus the common continuity token B5 gives the individual flag.
Prerequisites / Setup
- Paper and notepad (no electronic devices allowed at the Incident Desk)
- The provided ZIP:
README.txt,incident_brief.txt,desk_protocol.txt,clock_offsets.csv,candidate_index.csv,desk_console.py,desk_finish.py,portal_instructions.txt,NOTES_TEMPLATE.txt - Python 3.9+ stdlib (for offline verification after transcribing from paper)
Recon
Step 1 — Read the provided files
Goal: Inventory the package and understand the workflow.
| File | Role |
|---|---|
README.txt, incident_brief.txt |
Workflow and the six validity requirements |
desk_protocol.txt |
Record formats, HMAC scheme, rules |
clock_offsets.csv |
Per-node local_minus_reference skew |
candidate_index.csv |
The 8 case IDs |
desk_console.py |
--verify one row, --commit notes to a B5 candidate |
desk_finish.py |
Team flag from --team --b5 --seal |
portal_instructions.txt, NOTES_TEMPLATE.txt |
Portal flow, 11-field notes template |
Candidate cases: IR-51A2, IR-83C4, IR-27B9, IR-61D0, IR-0F75, IR-B8E1, IR-E326, IR-4A98.
Step 2 — Understand the cryptography
Goal: Learn how records are authenticated.
KEY = SHA256(ASCII("BP05-" + TYPE + "|" + B4)) # raw 32 bytes, per record type
TAG = upper(hex(HMAC-SHA256(KEY, fields[:-1] joined by "|")))[:12]
DIGEST = upper(hex(SHA256(first 6 event fields joined by "|")))[:12]
B5 = upper(hex(SHA256("BP05|B4|CASE|REVOKE|SNAPSHOT|ISOLATE|HOLD|PERMIT|PLAN|TX|RX|CUSTODY|VAULT_NONCE")))[:12]
FLAG = FLAG{BP05_<B5>_<upper(hex(HMAC-SHA256(bytes.fromhex(SEAL), "BP05|B5|TEAM")))[:12]>}
Every record’s HMAC is keyed from B4, so authenticity can only be checked with the Chapter 4 token. A matching digest or a forged but well-formed row proves nothing without the tag check.
Step 3 — Understand the record layouts
| Dossier | Type | Fields |
|---|---|---|
| A | EVENT (8) | case_id, stage, event_id, node, local_tick, prev_digest, digest, tag |
| B | PERMIT (9) | permit_id, case_id, operator, role, scope, valid_from, valid_to, decision, tag |
(continued for dossiers C–H)
Flag
FLAG{REDACTED}
Derived as FLAG{BP05_<B5>_<HMAC-SHA256(seal, "BP05|B5|TEAM")[:12]>}.
Lessons / Takeaways
- Paper dossiers can be forged unless every record is independently verified.
- Clock skew must be corrected before comparing timestamps across nodes.
- Chain-of-custody requires independent witnessing (TX + RX for the same HOLD event).
- HMAC tags keyed from a Chapter-4 token mean authenticity cannot be checked without that token.
- The portal seal plus continuity token
B5binds the individual flag to the team’s submission.
Mitigations
- Always verify HMAC tags over all evidence fields, not just a digest.
- Correct for clock skew before comparing timestamps.
- Require independent two-sided witnessing (TX and RX) for custody events.
- Bind seals and continuity tokens to team submissions to prevent substitution.
Techniques
- HMAC Verification
- Clock Offset Correction
- Chain of Custody
- Offline Forensics
References
- HMAC: RFC 2104: https://datatracker.ietf.org/doc/html/rfc2104
- NIST SP 800-63: Digital Identity Guidelines: https://doi.org/10.6028/NIST.SP.800-63-3

