Firmware#
Firmware extraction and reverse engineering. The operator dumps the binary off the target, identifies what is on it (boot ROM, bootloader, app, file system, secrets), opens it in a disassembler, and reads enough of the result to understand behavior or find a foothold. Firmware analysis is half art and half ritual; the workflow below is the ritual.
Extraction#
Method |
Note |
|---|---|
JTAG / SWD dump |
Halt the CPU, |
SPI flash dump (in-circuit) |
SOIC-8 clip onto the flash chip, CH341A or BusPirate
on the other end, |
SPI flash dump (chip-off) |
Desolder the flash, drop it in a socket, dump. The fallback when in-circuit dumping fails (shared SPI lines, hidden chip select). |
eMMC dump |
eMMC is just MMC; pads onto a microSD adapter, or
through an eMMC programmer (Easy-JTAG, |
Vendor firmware download |
OEM update file from the support site, OTA capture, or USB DFU. The least invasive option; sometimes encrypted or signed. |
USB DFU (Device Firmware Update) |
The standard USB class for firmware updates;
|
Bootloader leak |
UART bootloader, recovery mode, or vendor command interface that dumps flash without removing it. |
Triage#
Tool |
Effect |
|---|---|
|
Identify the container (raw, ELF, U-Boot uImage, FIT, NK.bin). |
|
Walk the file looking for signatures (file systems, compressed regions, key material, certificates). |
|
Extract embedded file systems (SquashFS, CramFS, JFFS2, YAFFS, FAT). |
|
First-pass triage; the operator’s fastest signal on what the firmware does. |
|
Eyeball the structure when nothing else identifies it. |
|
Identify the CPU architecture of an unknown raw blob by entropy and instruction frequency. |
|
Modern alternative to |
Disassembly#
Tool |
Note |
|---|---|
Ghidra |
NSA-released, free, multi-architecture. Decompiler is included. The operator’s default for free firmware RE. |
IDA Pro + Hex-Rays |
The commercial standard. Best decompiler, best multi-architecture support, expensive. |
Binary Ninja |
Mid-tier commercial; competitive decompiler and a Python API that is more pleasant than Ghidra’s. |
radare2 / rizin / Cutter |
Free, terminal-first (Cutter is the GUI front-end). Steep learning curve. |
|
Symbolic execution; useful for finding inputs that reach a target basic block. |
Workflow#
The operator’s standard sequence on a fresh dump:
file dump.binto identify the container.binwalk dump.binto spot embedded file systems and sub-images.strings dump.bin | head -200for first-pass intent (URLs, credentials, version strings, debug messages).If a file system extracts cleanly, walk it for credentials, keys, init scripts, vendor binaries.
Identify the CPU architecture (vendor doc,
cpu_rec, or reading the reset vector).Load into Ghidra with the right loader, base address, and architecture; let the analysis run.
Locate
main(start at reset vector, follow the bootloader if present).Rename functions, types, and globals as understanding accumulates; the operator’s notes become the artifact.