Skip to main content
Challenges OTA firmware: checksum-patch
IoT Expert OTA firmware update Solves: 17

OTA firmware: checksum-patch

Author: CyberSamSU
Points
180

OTA (Over-The-Air) firmware update packets often use a simple additive checksum for integrity checking — not a cryptographic signature, just a sum of bytes/words. Here, a simplified version of the 16-bit "one's complement" checksum used in real network protocols (IP/TCP/UDP) is applied:

def fold16(total):
    while total >> 16:
        total = (total & 0xFFFF) + (total >> 16)
    return total & 0xFFFF

def checksum(words):          # words - 16-bitli sonlar ro'yxati
    return fold16(sum(words)) ^ 0xFFFF

# TEKSHIRISH XOSSASI: agar CHECKSUM to'g'ri hisoblangan bo'lsa,
# fold16(sum(words + [CHECKSUM])) == 0xFFFF (barcha bitlar 1)

The problem: this checksum is linear — if there is a "reserve" (PATCH) word in the packet that the attacker controls, the attacker can restore the checksum to its valid state (bypass it) by just choosing this one word correctly, without recalculating the entire packet — this is a classic vulnerability of additive checksums (since they are not cryptographic hashes).

The attached ota_packages.txt file contains 6 independent packet fragments. Each contains 3 known 16-bit DATA words, an unknown PATCH word (????), and the original (unmodified) CHECKSUM. Find the PATCH value for each fragment — it must pass the integrity check.

Convert each found PATCH word into 2 ASCII bytes (high byte — first character, low byte — second character) and combine them in the order of the fragments: BAYROQ{IOT_OTA_<SOZ>}

Attached files
ota_packages.txt Log in to download
SHA-256 checksums
ota_packages.txt: f0be9de23c8defc3429ce13f3f5fa2ad3cadb08f39c042413e945e05d85895e8
Theory: learn the topic
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −18 pts Log in
Hint 2 −36 pts Log in
Hint 3 −54 pts Log in
To submit a flag, log in.

First solvers

1. W.o.X 09.09.2026
2. Stiv_084100 10.09.2026
3. Лазиз 01.10.2026
4. testrejim 09.10.2026
5. Raumdeuter 09.10.2026
6. 11111tttt 09.10.2026
7. Mirjaxon Qaxxarov 26.10.2026
8. anonym 03.11.2026
9. Odam 03.11.2026
10. pentester_uz 12.11.2026