Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:MCUboot image

From ReverseEngineering.wiki
Format
On this wiki Facts · Code · Notes · Topics

The header and TLV trailer MCUboot (the usual bootloader of Zephyr and Mynewt apps) puts around a signed firmware: magic 0x96f3b83d, load address, header size, image size, flags and version, then a trailer of type-length-value entries (SHA256 0x10, signature, key hash).

Layout

An MCUboot application slot holds: image_header (all little endian): ih_magic 0x96f3b83d (the older v1 magic is 0x96f3b83c), ih_load_addr, ih_hdr_size (16-bit), ih_protect_tlv_size (16-bit), ih_img_size (does not include the header), ih_flags, ih_ver (major, minor, revision 16-bit, build number 32-bit), padding. The application image proper (starting with its Platform:ARM Cortex-M vector table) follows at ih_hdr_size, commonly 0x200 or 0x400. After the image: an optional protected TLV area, then a TLV info header (magic 0x6907, protected variant 0x6908, total size) and TLV entries (type 16-bit, length 16-bit, value).

Flags

0x1 PIC, 0x4 encrypted AES128, 0x8 encrypted AES256, 0x10 non-bootable (split image), 0x20 RAM load, 0x100 ROM fixed, 0x200 LZMA1, 0x400 LZMA2, 0x800 ARM thumb filter.

TLV types

0x01 key hash, 0x02 public key, 0x10 SHA256, 0x11 SHA384, 0x12 SHA512, 0x20 RSA2048-PSS, 0x22 ECDSA signature, 0x23 RSA3072-PSS, 0x24 ed25519, 0x30-0x34 encrypted-key types, 0x40 dependency, 0x50 security counter, 0x60 boot record. Reading these only identifies what the image is signed with; it says nothing on how to bypass verification.

Reversing

Skip ih_hdr_size bytes to reach the real vector table; the image is linked to run at the slot address plus the header size, so use that as the load address. See also Library:Zephyr, Format:UF2.

Code & repositories

  • https://github.com/mcu-tools/mcuboot @ e19ad039b4864a2a49883c8279e4a24abbbcfe84 · license: Apache-2.0
    MCUboot bootloader; image.h defines the image header, flags and TLV types.
    Tested on: source read, not run: read · checked 2026-10-18; last activity 2026-10-16