CSCTF 2026Hardware / ICS
Operation Blackout
The flag is the first 8 hex characters of a SHA-256 over five fields, each one confirmed by at least two of the evidence files:
- Competition
CSCTF 2026- Category
- Hardware / ICSHard
- Source status
- Source-documented · not platform-verified
- Document
- PDF edition4 min read
Brief
The challenge
- Category
- ICS
- Difficulty
- Hard
- Points
- 605
- Files
scada_network.pcap,hmi_config.xml,plc_firmware.bin,substation_log.json,alarm_override.dat
A regional energy grid lost power at substation 0x4A2E. The recovered SCADA capture, HMI configuration, PLC firmware, event log, and alarm overrides describe the same incident from different operational layers.
Reconstruct the incident only where the evidence agrees and submit the resulting marker.

TL;DR
The flag is the first 8 hex characters of a SHA-256 over five fields, each one confirmed by at least two of the evidence files:
sha256("0x504C4331:0x4A2E:2025-11-15T06:15:03Z:40001:137")[:8] = 12fcdb0dThe first version of this challenge didn't say how to build the marker, which sent the first attempt into PRNG and cipher analysis of the firmware. A later revision added an exact serialization spec, and from there the solve is reading five values out of the files.

01
The spec
sha256("<firmware_header_hex>:<station_hex>:<log_timestamp_iso>:<register_decimal>:<seed_decimal>")[:8]firmware_header_hex: the first 4 bytes ofplc_firmware.bin, uppercase with a0xprefix.station_hex: the station ID, uppercase with a0xprefix.log_timestamp_iso: the log's timestamp for the malicious FC16 write, withTand a trailingZ.register_decimal: the start register.seed_decimal: the calibration seed.
scada_blackout_2026 is a stated decoy. That string is hidden in the firmware at offset 0x11, XORed with 0x37.
02
Firmware header
50 4C 43 31 56 33 2E 32 2E 31 00 00 ... PLC1V3.2.1..The first 4 bytes give 0x504C4331 ("PLC1"). The spec says not to use the version string V3.2.1 that follows them.
03
Station ID
hmi_config.xml has <station_id>0x4A2E</station_id>. The briefing, the alarm file and the log entry Power outage detected at substation 0x4A2E agree, so the value is 0x4A2E.
04
Timestamp of the FC16 write
{ "timestamp": "2025-11-15T06:15:03Z", "level": "WARNING", "source": "PLC_FIRMWARE", "message": "Unexpected Modbus FC 0x10 write to read-only registers 40001-40064" },{ "timestamp": "2025-11-15T06:15:03Z", "level": "CRITICAL", "source": "PLC_FIRMWARE", "message": "Buffer overflow detected in Modbus TCP handler (247 bytes vs 128-byte limit)" }FC 0x10 is function code 16 (Write Multiple Registers). The write entry and the first CRITICAL entry share the same second, so both readings of the brief give 2025-11-15T06:15:03Z.
The pcap puts the write at 06:05:03, because the log clock runs about 10 minutes ahead. The spec asks for the log timestamp, so the pcap time isn't used.
05
Start register
The HMI config hides the write inside a calibration routine:
<HiddenModbusWrite function_code="16" start_address="40001" count="64"> <Payload type="ALARM_OVERRIDE_PATTERN">55 FA 55 FA ...</Payload></HiddenModbusWrite>The log (registers 40001-40064) and the FC16 packet in the pcap agree, so the start register is 40001.
06
Calibration seed
<ManifestSeed>137</ManifestSeed> in the HMI config matches "manifest_seed": 137 in the log's first entry, so the seed is 137.
Solve script
The script is in solve.py. It reads each field from the files and asserts that the sources agree before hashing:
import hashlibimport jsonimport xml.etree.ElementTree as ETfirmware = open("plc_firmware.bin", "rb").read()firmware_header = "0x" + firmware[:4].hex().upper()hmi = ET.parse("hmi_config.xml").getroot()station = hmi.findtext("station_id")write = hmi.find("CalibrationRoutine/HiddenModbusWrite")assert write.get("function_code") == "16"register = write.get("start_address")hmi_seed = hmi.findtext("CalibrationRoutine/ManifestSeed")log = json.load(open("substation_log.json", encoding="utf-8"))log_seed = next(e["manifest_seed"] for e in log if "manifest_seed" in e)fc16 = next(e for e in log if "FC 0x10" in e["message"])first_critical = next(e for e in log if e["level"] == "CRITICAL")assert fc16["timestamp"] == first_critical["timestamp"]assert int(hmi_seed) == log_seedassert station in next(e["message"] for e in log if "substation" in e["message"])marker = f"{firmware_header}:{station}:{fc16['timestamp']}:{register}:{log_seed}"print("marker :", marker)print("flag : CSCTF{%s}" % hashlib.sha256(marker.encode()).hexdigest()[:8])marker : 0x504C4331:0x4A2E:2025-11-15T06:15:03Z:40001:137flag : CSCTF{12fcdb0d}The other .py files in this folder are left over from the first attempt, which tried to recover the marker from the firmware body before the spec was published.
Flag
Flag
CSCTF{12fcdb0d}
Source-documented · not platform-verified
Takeaways
When a challenge gets revised, reread the description. Here the update turned an unspecified marker into a direct computation.
"Only where the evidence agrees" means picking values confirmed by more than one source: the station, register and seed all appear in two or more files.
When sources disagree, as the pcap and log timestamps do here, follow the spec. It names the log timestamp explicitly.