Skip to main content
Challenges Zigbee OTA chain
IoT Impossible Zigbee: Trust Center link key, AES-CCM*, ZCL OTA and an encrypted configuration Solves: 4

Zigbee OTA chain

Author: CyberSamSU
Points
350

Smart-home sniffer. On a Zigbee network in a laboratory, the firmware of a thermostat controller was updated "over the air" (OTA). A sniffer recorded the whole process: zigbee.pcap (linktype 195 — IEEE 802.15.4, with FCS). Two devices joined the network; the image of the device with manufacturer code 0x1337 that was updated successfully contains a configuration block — the flag is there.

All formats are in public standards: IEEE 802.15.4, Zigbee PRO (NWK/APS, sections 4.3 and 4.4, annex B.1), the ZCL OTA Upgrade cluster (0x0019), and the Zigbee OTA file format. Practical notes:

  • When a device joins the network, the Trust Center sends it the network key with an APS Transport-Key command. The command is encrypted at the APS layer with AES-CCM* (MIC-32); the key is the key-transport key derived from the Trust Center link key (a keyed hash, Zigbee specification B.1.4, input byte 0x00; the hash is Matyas-Meyer-Oseas). The link key is the well-known default key for Zigbee HA (ZigBeeAlliance09).
  • NWK layer: AES-CCM* with the network key, 4-byte MIC. Nonce = source IEEE address (in over-the-air order, little-endian) | frame counter (u32 LE) | security control. Over the air, the level field in the security control is written as 0, but for the nonce and a-data computation level = 5 (ENC-MIC-32) is used. a-data = NWK header | auxiliary header (with level = 5).
  • IEEE addresses are in reversed (little-endian) order over the air; when deriving keys, the usual (big-endian, 00:12:4b:...) notation is used.

Task 1. From the pcap, find the short address and the IEEE address of each device: decrypt the Transport-Key commands and obtain the network key.

Task 2. Decrypt the NWK data frames (verify the MIC). After the APS data header comes ZCL: Image Block Response (command 0x05: status, manufacturer, type, file version, offset, size, data). The blocks are out of order and repeated; there are noise frames (link status, "wait" responses).

Task 3. Which image version is the correct one? Assemble the version whose status in the Upgrade End Request (0x06) is 0x00 (SUCCESS) and whose manufacturer code is 0x1337. The other versions (including those that ended with INVALID_IMAGE) are decoys — they also contain a "flag".

Task 4. In the OTA file: a header (0x0BEEF11E, 56 bytes, little-endian) and tag elements (tag u16 | uzunlik u32 | ma'lumot). The blob in the 0xF001 tag = IV(16) | AES-128-CBC (PKCS#7). The key = SHA256(qurilma IEEE (big-endian 8 bayt) | "ota-cfg")[:16]; the device is the address to which the image was sent. The secret= value inside is the flag.

Flag format: BAYROQ{IOT_ZIGBEE_OTA_xxxxxxxxxxxxxxxx} (the last 16 characters are lowercase hex).

Attached files
zigbee.pcap Log in to download
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −35 pts Log in
Hint 2 −70 pts Log in
Hint 3 −105 pts Log in
To submit a flag, log in.

First solvers

1. Mirjaxon Qaxxarov 24.11.2026
2. Odam 25.11.2026
3. Asmaa Mottery 26.11.2026
4. Глеб Гой 27.11.2026