Writeup · Cyberweek Africa 2026 - National CTF (Finals)

Blackout Protocol 1: The First Alert

forensicsunknownsolvedFlag: FLAG{REDACTED}

Overview

Identify the earliest unauthorised, complete, corroborated blackout sequence affecting fictional CTRL-A on the hotel’s digital control platform, then derive the first incident token B1 per the FUSE-1 protocol. All records/identities are fictional. Python 3.9+ stdlib only; no network required.

Prerequisites / Setup

  • Python 3.9+ stdlib
  • site_policy.txt, protocol_note.txt, evidence_console.py, auth_events.csv, edge_routes.csv, controller_events.csv, service_witnesses.csv, relay_receipts.csv, clock_beacons.csv, trust_register.csv

Recon

Step 1 — Identify the earliest unauthorised, complete, corroborated blackout sequence

Goal: Find the first blackout sequence meeting all site_policy conditions.

  1. site_policy.txt — Approved override rule + candidate sequence conditions
  2. protocol_note.txt — Clock reconciliation, HMAC integrity tag rules, receipt_code formula, B1 derivation
  3. evidence_console.py — Interactive FUSE-1 console to verify a proposed chain and compute B1
  4. auth_events.csv — IAM authentication / grant events
  5. edge_routes.csv — EDGE-GW route / REWIRE events
  6. controller_events.csv — CTRL-A / CTRL-B controller events
  7. service_witnesses.csv — SENSOR-01 independent availability witnesses
  8. relay_receipts.csv — Paired TX/RX relay receipts for REWIRE events
  9. clock_beacons.csv — Time-sync beacons per host
  10. trust_register.csv — Per-host HMAC training/validation keys

Step 2 — Clock reconciliation

Goal: Convert all local times to corrected UTC.

Corrected UTC = local_time − offset. Offsets derived from clock_beacons.csv as observed_local − reference_utc:

Host Reference (UTC) Observed Local Offset
IAM-GW 18:10:00Z 18:10:37 +37 s
EDGE-GW 18:10:00Z 18:09:38 −22 s
CTRL-A 18:10:00Z 18:11:04 +64 s
CTRL-B 18:10:00Z 18:10:15 +15 s
SENSOR-01 18:10:00Z 18:09:49 −11 s

All chain comparisons are made in corrected UTC.

Step 3 — Integrity tag verification

Goal: Verify HMAC-SHA256 tags over CSV columns except the last tag column, joined by |, using the host’s key from trust_register.csv. Tag is first 12 uppercase hex chars.

Records failing HMAC are treated as altered/corrupted and excluded. One auth record failed verification.

Step 4 — Candidate sequence conditions (per site_policy.txt)

  1. Valid IAM record: grant=CONTROL_OVERRIDE, decision=GRANTED
  2. Matching EDGE-GW REWIRE event: destination=CTRL-A, result=ACCEPTED, same trace_id & token
  3. Independent paired receipts: TX (EDGE-GW) + RX (CTRL-A) agreeing on trace_id, token, route_event_id, receipt_code
  4. Matching CTRL-A BLACKOUT_ARM: result=APPLIED, same trace_id & token
  5. Independent SENSOR-01 witness: CTRL-A / SERVICE_STATE=DOWN / confidence=CORROBORATED, same trace_id
  6. After clock correction: IAM < EDGE < CTRL < SENSOR; EDGE−IAM ≤ 30 s; CTRL−EDGE ≤ 30 s; SENSOR−CTRL ≤ 60 s
  7. IAM event must be UNAUTHORISED under the approved override rule: Principal ops_admin, Workstation MGMT-01, EAT 21:00:00–21:25:00 on 2026-10-29

Flag

FLAG{REDACTED}

Derived as B1 per the FUSE-1 protocol from the earliest unauthorised, complete, corroborated blackout sequence.

Lessons / Takeaways

  • Correlate events across multiple log sources (IAM, EDGE-GW, CTRL, SENSOR) rather than relying on a single log.
  • Correct for clock skew before comparing timestamps across hosts.
  • Verify HMAC integrity tags over all evidence fields, not just a digest.
  • Follow the full chain: unauthorised IAM grant → EDGE-GW REWIRE → paired TX/RX receipts → CTRL-A BLACKOUT_ARM → independent SENSOR-01 witness.

Mitigations

  • Enforce approved-override rules server-side so unauthorised grants cannot be issued.
  • Verify HMAC tags over all event fields.
  • Synchronise clocks and correct for skew before correlating cross-host events.
  • Require independent two-sided witnessing (TX + RX) for critical relay events.

Techniques

  • HMAC Verification
  • Clock Offset Correction
  • Chain of Custody
  • Offline Forensics

References