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-kit if
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
strings on 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.
1---2name: hardware-and-firmware-testing3description: Test firmware and hardware with OWASP FSTM/ISTG and PWN serial plugins.4license: MIT5allowed-tools: [pwn, terminal]6metadata:7 source: https://skillmd.com/skills/0dayinc/hardware-and-firmware-testing8 bundled: true9 references:10 - https://github.com/scriptingxss/owasp-fstm11 - https://owasp.org/www-project-iot-security-testing-guide/12 - https://owasp.org/owasp-istg/03_test_cases/firmware/13---1415# Hardware and Firmware Testing1617Use when the target is a device, PCB, UART/JTAG, RF dongle, or a firmware18image. Hand unpacked binaries to `reverse-engineering-binaries` and19crashes to `deep-exploitation`.2021## When to use2223- firmware dump, IoT, router image, MCU flash24- UART / SPI / I2C / JTAG / SWD25- RF / SDR path (`PWN::SDR`, `pwn_gqrx_scanner`)2627## Methodologies2829OWASP Firmware Security Testing Methodology (FSTM) - 9 stages:30311. Information gathering322. Obtaining firmware333. Analyzing firmware344. Extracting the filesystem355. Analyzing filesystem contents366. Emulating firmware377. Dynamic analysis388. Runtime analysis399. Binary exploitation4041Also:4243| Catalog | Role |44|---|---|45| OWASP ISTG | IoT device test cases (firmware chapter cites FSTM) |46| OSSTMM | physical + wireless + telecom channels |47| NIST SP 800-115 | evidence and reporting |48| CWE | 119, 798, 1278, 1326 for embedded flaws |4950## Tooling5152- Hardware: `PWN::Plugins::Serial`, `BusPirate`, `Android` (adb),53 `MSR206` when magstripe is in the ask54- RF: `PWN::SDR`, `pwn_gqrx_scanner`, Flipper helpers in SDR docs55- Extract: `binwalk`, `sasquatch`/`unsquashfs`, `firmware-mod-kit` if56 present57- RE: `file`, `strings`, `radare2`, `PWN::Plugins::Assembly`58- Emulate: QEMU user/system when the arch is known5960## Procedure61621. FSTM-1: chip markings, FCC ID, model, debug headers. Photograph or63 note.642. Obtain the image (vendor download, dump via UART/flash). Hash it.653. `binwalk -e`, list filesystems, creds, keys, init scripts.664. Emulate or boot if possible. Dynamic: default creds, open ports,67 update channel.685. Runtime: attach serial, check root shell, busybox, leftover test69 hooks.706. Binary: pick one sink, then `reverse-engineering-binaries` /71 `deep-exploitation`.727. Report per FSTM stage with artefact paths.7374## Pitfalls7576- `strings` on a blob is not FSTM-complete.77- Do not brick the only sample. Prefer a copy / emulator.78- RF work stays on the named band/profile.7980## Verification8182Image hash + extract dir exist, at least two FSTM stages have evidence83beyond notes, and leftover secrets or sinks are cited from files that84were read back.