Writeup · Cyberweek Africa 2026 - National CTF (Finals)

Blackout Protocol 2: The Access Puzzle

forensicsunknownsolvedFlag: FLAG{REDACTED}

Overview

Determine how an ordinary visitor badge crossed four controlled doors and reached CTRL-A-CAGE before the Chapter 1 blackout anchor (tick 240), despite lacking engineering privileges. Reconstruct the single unauthorised, independently confirmed physical access path and derive B2 using B1 from Chapter 1.

Prerequisites / Setup

  • Python 3
  • gate_capture.pcap, access_protocol.txt, investigation_brief.txt, gate_probe.py, access_console.py, door_topology.csv, badge_registry.csv, lease_register.csv, cache_snapshots.csv, panel_receipts.csv, panel_roots.csv, cache_root.txt

Recon

Step 1 — Extract PCAP frames

Goal: Extract the 36 UDP/BP2 frames from gate_capture.pcap.

The capture is a standard Ethernet/IPv4/UDP PCAP. UDP payloads begin with BP2| followed by a JSON object with fields:

frame_id|session_id|badge_id|door_id|tick|from_zone|to_zone|cache_slot|lease_id|role_applied|prev_proof|panel_nonce|gateway_tag

36 frames were extracted across 9 sessions.

Step 2 — Understand the cache-slot collision

Goal: Understand how the controller indexes badges using only 16 bits.

A controller indexes a badge using only 16 bits:

CACHE_SLOT(badge_id) = SHA256("SLOT|" + B1 + "|" + badge_id)[:4]  (uppercase hex)

With B1 = E39F35ADE250:

  • CACHE_SLOT(ENG-01733) = 5365
  • CACHE_SLOT(VST-00023) = 5365 ← COLLISION

Both badges map to cache slot 5365. Two cache snapshots exist for slot 5365:

cache_slot cached_badge lease_id cached_role active ticks
5365 ENG-01733 L-BF7FA22A OPS 120–300
5365 VST-00023 L-3C569680 VISITOR 310–460

For ticks 181–231, only the ENG-01733 / OPS snapshot matches (the VST-00023 snapshot is active 310–460, outside this window). The gateway therefore applies ENG-01733’s OPS role and lease L-BF7FA22A to the visitor badge VST-00023 — a classic cache-poisoning / short-digest collision attack.

Vulnerability Analysis

The flaw class is Hash Collision / Cache Poisoning (short-digest cache indexing), leading to access control bypass / privilege escalation.

Exploitation

Step 3 — Reconstruct the access path

Goal: Trace the visitor badge VST-00023 through four doors to CTRL-A-CAGE using the colliding OPS role and lease.

(To be completed during full normalization — this challenge requires parsing the 36 PCAP frames, matching panel receipts to panel roots, tracing the badge through doors, and deriving B2 from B1.)

Flag

FLAG{REDACTED}

Derived as B2 using B1 from Chapter 1 and the reconstructed access path.

Lessons / Takeaways

  • Short hash truncations (16 bits) collide easily — never use truncated hashes for security-critical indexing.
  • Cache keys derived from user-controlled input can be collided to impersonate another principal.
  • Always validate the full identity (badge_id + role + lease) on every access check, not just a cached slot.

Mitigations

  • Use full-length hash outputs or include a secret salt in cache keys.
  • Re-validate identity and authorisation on every access, not just at cache lookup.
  • Bind cache entries to the full credential set, not a truncated digest.

Techniques

  • Cache Poisoning
  • Hash Collision
  • Broken Access Control
  • PCAP Analysis

References