Reverse eng firmware

From NoorQureshi/security-skills · View interactive version

Reverse eng firmware is an AI agent skill from the GitHub repository NoorQureshi/security-skills. Extract and analyze device firmware to find hardcoded secrets, backdoors, vulnerable services, and the real version behind an appliance. Load when you have a firmware image or can pull one. Signals: a .bin/.img firmware download, a router/IoT/appliance in scope, an OTA update file, a flash dump, "an

How to use this skill

Skill file

Firmware analysis

When it applies

You have a firmware image — a vendor download, an OTA update, or a flash dump — for a router, IoT

device, or network appliance in scope. Offline firmware analysis is the static counterpart to

network-appliance-attacks: it explains why a device is vulnerable and often yields the exact

version, hardcoded creds, or patched-function diff behind an edge CVE.

Why it works

Firmware ships the whole system: a packed filesystem, config, keys, and binaries. Vendors routinely

leave hardcoded credentials, private keys, debug/backdoor accounts, and old vulnerable services in

the image — all readable offline, with no traffic to the live device, once you carve the filesystem

out of the container.

Method

  1. Recognize and carve. binwalk <image> to identify the container and offsets (U-Boot header,

compression, one or more filesystems). Extract with binwalk -e (or unsquashfs /

firmware-mod-kit for SquashFS/JFFS2/CramFS). Encrypted images → find the bootloader/update

routine that decrypts (often in a prior version's cleartext image).

  1. Inventory the filesystem. Identify the OS/libc, the init scripts, the web root, and the

service binaries. emba automates a first-pass audit if you want breadth fast.

  1. Hunt secrets & accounts. /etc/passwd+/etc/shadow (crack weak hashes offline),

hardcoded API keys/private keys/certs, backdoor accounts, and secrets in config and startup

scripts (CWE-798, CWE-912).

  1. Pin the version and diff. Read the real build/version from the filesystem (not a spoofable

banner) to drive CVE applicability. Diff the pre/post-patch image of a known CVE to locate the

vulnerable function, then analyze it with reverse-eng-binary-triage.

  1. Find the reachable attack surface. Network-listening binaries (the web UI CGI, telnet/SSH,

custom daemons) are the ones that matter live — triage those for injection/overflow and map them

back to a remote path on the running device.

Gotchas

unsquashfs/sasquatch for non-standard SquashFS; a partial carve looks like "nothing there".

fleet; that's the finding, but handle it responsibly per RoE.

strings; the image is ground truth.

restricted; keep it in the git-ignored engagements/ tree.

Verify success

A concrete offline finding: a hardcoded credential/key, a backdoor account, the pinned build

version, or a vulnerable network-facing binary and its remote entry point — each traceable to a

file in the extracted image.

References

binwalk & firmware-mod-kit docs; emba firmware analyzer; OWASP IoT / firmware testing guidance;

CWE-798/912.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.