Skip to main content
Challenges CoAP block-wise transfer
IoT Medium IoT network protocols: reassembling a file from CoAP (RFC 7252) and Block2 (RFC 7959) packets Solves: 4

CoAP block-wise transfer

Author: CyberSamSU
Points
50

Traffic between low-power IoT nodes and the central CoAP server (10.40.10.1:5683/UDP) was recorded: coap.pcap.

On the network, two clients are downloading configurations in parallel using the CoAP Block2 (RFC 7959) mechanism: one is downloading a test resource (GET /fw/sandbox) and the other the real firmware configuration (GET /fw/config). In the CoAP protocol, response packets (2.05 Content, code 0x45) do not carry the URI again — they are tied to the request by the Token bytes.

CoAP options are delta-encoded: Uri-Path (option 11), Content-Format (option 12) and Block2 (option 23). The whole value of the Block2 option has the form (NUM << 4) | (M << 3) | SZX, where NUM is the block sequence number (starting from 0), M is the more-blocks flag, and SZX is the block size (2^(SZX+4) bytes). After the options come the 0xFF payload marker and the block data.

Note that in the /fw/config transfer the blocks were requested out of order and some packets were re-sent (duplicate Message ID). Identify the correct token, join the blocks in NUM order, base64-decode the "secret" field inside the resulting JSON and find BAYROQ{...}. (Flag format: BAYROQ{COAP_BLOK_<16 kichik hex>}).

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

First solvers

1. Mirjaxon Qaxxarov 24.11.2026
2. Odam 25.11.2026
3. clash royale 27.11.2026
4. Asmaa Mottery 27.11.2026