Skip to content
Pwnversity
OT-FIRMWAREadvanced · 5 min · upd. 2026-10

Firmware analysis

Firmware is the software that makes an embedded device work. Analyzing it reveals embedded credentials, cryptographic keys, hidden services, vulnerabilities, and the device’s logic. It’s a central piece of IoT pentesting (IoT pentest) and often the link that lets you jump to the cloud backend.

  • Shared hardcoded secrets: an embedded key or password works for the whole fleet; a single dump compromises every device of the model.
  • Reused signing keys: if the private key that signs firmware is in the binary, an attacker can sign malicious firmware the device will accept.
  • Backdoors and factory accounts: debug services or hidden accounts that survive in production.
  • Outdated components: busybox/openssl/dropbear with known CVEs, unpatched for lack of a lifecycle.
  • No secure boot: unsigned firmware allows persistence that is hard to eradicate.
  • Download from the manufacturer’s site or update portal (the cleanest and most legal).
  • Capture the OTA update by intercepting the traffic (API Security).
  • Direct dump of the memory chip (SPI flash) via hardware (Hardware hacking (UART, JTAG)).
  • Extraction from the app itself or the live device’s filesystem.
flowchart LR
    OBT["Obtain firmware (web/OTA/chip/app)"]
    EXT["Extract (binwalk/unblob) → rootfs"]
    STA["Static analysis (grep, strings, Ghidra)"]
    EMU["Emulate (FirmAE/QEMU)"]
    DYN["Dynamic analysis (web/services)"]
    OBT --> EXT --> STA
    EXT --> EMU --> DYN
    STA -->|"secrets/URLs"| DYN
Ventana de terminal
binwalk firmware.bin # identify filesystems and components
binwalk -e firmware.bin # extract (squashfs, jffs2, cpio, kernel...)
unblob firmware.bin # modern recursive extraction alternative

After extracting the rootfs, look for:

  • Credentials: grep -rinE 'password|passwd|admin', /etc/shadow, keys in /etc, certificates.
  • Private keys and tokens: .pem, id_rsa, API tokens, hardcoded backend URLs.
  • Binaries with known vulns: versions of busybox, dropbear, openssl, lighttpd.
  • Boot and services: init scripts, active services, default accounts.
  • Emulate the firmware with QEMU + FirmAE/firmadyne to bring up its web interface and services.
  • Attack the emulated web/API like a normal app (see web area) without risking the physical device.
  • Useful for fuzzing and dynamic analysis without depending on hardware.
  • Hardcoded credentials/keys → access to all devices of the model.
  • Signing private keys → allow signing malicious firmware if reused.
  • Backdoors/hidden accounts and active debug services.
  • Weak crypto (Crypto fundamentals), predictable RNG, secrets reused across devices.
  • Extraction: binwalk, unblob, firmware-mod-kit, sasquatch (squashfs).
  • Automated: EMBA (full Linux firmware analysis), FACT.
  • Analysis: strings, grep, Ghidra for ARM/MIPS binaries (Static reversing).
  • Emulation: QEMU with FirmAE/firmadyne to bring up the web and services.
  • Work on your own firmware (downloaded from the manufacturer) or from a device you own; never on someone else’s infrastructure.
  • Prioritize static analysis: grep and strings yield credentials and URLs in minutes before emulating anything.
  • Emulate to reach the web/API and chain toward the cloud (API Security).
  • Reverse key binaries in Ghidra for proprietary logic or backdoors (Static reversing).
Ventana de terminal
# quick triage example after extracting the rootfs
grep -rinE 'password|passwd|token|secret|BEGIN .*PRIVATE KEY' squashfs-root/ | head
  • Don’t embed credentials/keys; per-device secrets in secure storage.
  • Sign the firmware and verify it at boot (secure boot); encrypt where appropriate.
  • Keep components updated (busybox/openssl/dropbear) and manage end of life.
  • Disable debug services and factory accounts in production.
  • Routers/cameras with shared private keys across all devices (one leak compromises the whole fleet).
  • Backdoors in firmware (hidden accounts) found by extraction and grep.
  • Campaigns exploiting unsigned firmware for persistence that’s hard to eradicate.
  • Obtain the firmware (web/OTA/chip/app)
  • Extract with binwalk/unblob and mount the rootfs
  • Look for hardcoded credentials/keys/tokens
  • Review component versions (known vulns)
  • Detect backdoors/hidden accounts/debug services
  • Emulate (FirmAE/QEMU) to attack web/services
  • Analyze key binaries in Ghidra if needed (Static reversing)