Hardware and Firmware Testing
Use when the target is a device, PCB, UART/JTAG, RF dongle, or a firmware
image. Hand unpacked binaries to reverse-engineering-binaries and
crashes to deep-exploitation.
When to use
- firmware dump, IoT, router image, MCU flash
- UART / SPI / I2C / JTAG / SWD
- RF / SDR path (
PWN::SDR,pwn_gqrx_scanner)
Methodologies
OWASP Firmware Security Testing Methodology (FSTM) - 9 stages:
- Information gathering
- Obtaining firmware
- Analyzing firmware
- Extracting the filesystem
- Analyzing filesystem contents
- Emulating firmware
- Dynamic analysis
- Runtime analysis
- Binary exploitation
Also:
| Catalog | Role |
|---|---|
| OWASP ISTG | IoT device test cases (firmware chapter cites FSTM) |
| OSSTMM | physical + wireless + telecom channels |
| NIST SP 800-115 | evidence and reporting |
| CWE | 119, 798, 1278, 1326 for embedded flaws |
Tooling
- Hardware:
PWN::Plugins::Serial,BusPirate,Android(adb),
MSR206 when magstripe is in the ask
- RF:
PWN::SDR,pwn_gqrx_scanner, Flipper helpers in SDR docs - Extract:
binwalk,sasquatch/unsquashfs,firmware-mod-kitif
present
- RE:
file,strings,radare2,PWN::Plugins::Assembly - Emulate: QEMU user/system when the arch is known
Procedure
- FSTM-1: chip markings, FCC ID, model, debug headers. Photograph or
note.
- Obtain the image (vendor download, dump via UART/flash). Hash it.
binwalk -e, list filesystems, creds, keys, init scripts.- Emulate or boot if possible. Dynamic: default creds, open ports,
update channel.
- Runtime: attach serial, check root shell, busybox, leftover test
hooks.
- Binary: pick one sink, then
reverse-engineering-binaries/
deep-exploitation.
- Report per FSTM stage with artefact paths.
Pitfalls
stringson a blob is not FSTM-complete.- Do not brick the only sample. Prefer a copy / emulator.
- RF work stays on the named band/profile.
Verification
Image hash + extract dir exist, at least two FSTM stages have evidence
beyond notes, and leftover secrets or sinks are cited from files that
were read back.