/secskills-core:analyzing-firmware-imagesfrom secskills-core
Extracts and analyzes firmware images from embedded/IoT devices: filesystem extraction, credential discovery, binary analysis, web interface review, network service enumeration, emulation, and cryptographic assessment.
Ships in secskills-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Firmware is a frozen Linux (or RTOS) image, and its security froze with it. Hardcoded credentials, command injection in CGI scripts, unsigned update packages, and debug interfaces left enabled are not edge cases -- they are the baseline. The work is extraction, orientation, and then asking the same questions you would ask of any system, with the knowledge that nobody has patched this one since it shipped.
analyzing-binariesanalyzing-malwareauditing-code-for-vulnerabilitiesBefore analysis comes acquisition. The method determines what you get.
| Method | What you get | Notes |
|---|---|---|
| Vendor download | Update package, often compressed or encrypted | Check support portals, FTP servers, and FCC filings |
| OTA sniffing | Update payload in transit | mitmproxy or tcpdump on the device's update channel; many devices use plain HTTP |
| UART/serial console | Shell access, bootloader interaction | Three wires (TX, RX, GND); identify with a multimeter or logic analyzer |
| JTAG/SWD | Full memory read, debug access | Requires pin identification; JTAGulator, OpenOCD |
| Chip-off | Raw flash contents (NAND/NOR) | Desolder the flash chip; read with a programmer (CH341A, FlashcatUSB); last resort |
| Bootloader extraction | Dump via U-Boot md or sf read commands | If the bootloader shell is accessible over UART |
For OTA interception, configure the device to proxy through mitmproxy. Many devices ignore proxy settings -- ARP spoofing or a transparent bridge may be required. If the update is over HTTPS, check whether the device validates certificates at all; a surprising number do not.
Start with format identification and entropy analysis before extracting.
file firmware.bin
binwalk firmware.bin # identify embedded filesystems and compression
binwalk -E firmware.bin # entropy analysis -- high entropy = compressed or encrypted
hexdump -C firmware.bin | head -64 # header bytes reveal container format
strings -n 10 firmware.bin | head -100 # quick orientation
What the entropy plot tells you:
Common container formats:
| Header magic | Format |
|---|---|
hsqs / sqsh | SquashFS |
UBI# | UBI/UBIFS |
0x1985 | JFFS2 |
0x28cd3d45 | cramfs |
HDR0 | TRX (Broadcom routers) |
\x27\x05\x19\x56 | uImage (U-Boot) |
Use the right tool for the filesystem. Generic extraction misses metadata and permissions.
# General recursive extraction -- good starting point
binwalk -Me firmware.bin
# SquashFS -- the most common embedded filesystem
unsquashfs -d rootfs squashfs-root.img
# Non-standard SquashFS (vendor-modified): use sasquatch
sasquatch -d rootfs squashfs-root.img
# JFFS2
jefferson firmware.jffs2 -d rootfs
# UBI/UBIFS
ubireader_extract_images firmware.ubi
ubireader_extract_files firmware.ubi
# cramfs
cramfsck -x rootfs cramfs.img
# Raw NAND dumps may need OOB data stripped first
nandextract firmware.nand
If binwalk finds nothing and entropy is high, the image is likely encrypted. Look for a bootloader or earlier firmware version that contains the decryption routine. Some vendors ship the decryption key in the bootloader or in a companion partition.
Once extracted, treat the rootfs as a Linux system you are auditing for the first time.
# Password files
cat rootfs/etc/passwd
cat rootfs/etc/shadow
# Hardcoded credentials -- these are endemic
rg -rn 'password|passwd|admin|root|default' rootfs/etc/ --include='*.conf'
rg -rn 'BEGIN (RSA|EC|OPENSSH|DSA) PRIVATE KEY' rootfs/
rg -rn 'api[_-]?key|secret[_-]?key|token' -i rootfs/
# Certificates and keys
find rootfs -name '*.pem' -o -name '*.key' -o -name '*.crt' -o -name '*.p12'
# WiFi and VPN credentials
find rootfs -name 'wpa_supplicant*' -o -name '*.ovpn' -o -name 'ipsec.*'
Default credentials in /etc/shadow are the single most common firmware
finding. Check whether root has a password hash and whether it is crackable
-- it usually is. See cracking-passwords for hash handling.
# Startup scripts reveal what runs and how
ls rootfs/etc/init.d/ rootfs/etc/rc.d/
cat rootfs/etc/inittab
# Systemd units if present
find rootfs -name '*.service' -path '*/systemd/*'
# Installed packages and versions
cat rootfs/etc/opkg/status 2>/dev/null # OpenWrt-based
ls rootfs/usr/lib/ipkg/info/ 2>/dev/null # older ipkg
# Network configuration
cat rootfs/etc/network/interfaces 2>/dev/null
rg -rn 'iptables|ip6tables|nftables' rootfs/etc/
The web interface is where the exploitable bugs live. Embedded web servers are typically BusyBox httpd, lighttpd, uhttpd, or GoAhead, serving CGI scripts written in shell, Lua, or C.
# Find the web root
find rootfs -name 'httpd*' -o -name 'lighttpd*' -o -name 'uhttpd*'
ls rootfs/www/ rootfs/usr/www/ rootfs/usr/share/www/ 2>/dev/null
# CGI scripts -- these are the attack surface
find rootfs -name '*.cgi' -o -name '*.sh' -path '*/cgi-bin/*'
find rootfs -name '*.lua' -path '*/luci/*' -o -name '*.lua' -path '*/www/*'
# Command injection patterns in CGI
rg -rn 'system\(|popen\(|exec\(|os\.execute|io\.popen|\`.*\$' rootfs/www/
rg -rn '\$QUERY_STRING|\$REQUEST_URI|\$HTTP_' rootfs/www/
Command injection through CGI parameters is endemic in embedded web
interfaces. The pattern is a CGI script that takes user input from a query
parameter and passes it to a shell command without sanitization. Review
every CGI script for this pattern -- system(), popen(), backtick
execution, os.execute(), and io.popen() with any user-controlled input.
Also check for:
Firmware binaries target non-x86 architectures. Identify the architecture before disassembly.
# Identify architecture from ELF headers
file rootfs/usr/sbin/*
readelf -h rootfs/usr/sbin/httpd # Machine field: ARM, MIPS, PowerPC
# Common architectures in firmware
# ARM (little-endian) -- modern IoT, cameras, some routers
# MIPS (big-endian) -- routers (Broadcom, Atheros, MediaTek)
# MIPS (little-endian) -- some Realtek-based devices
# PowerPC -- older enterprise networking gear
Ghidra handles all common firmware architectures natively. Load the binary, select the correct processor and endianness, and auto-analyze.
# Ghidra headless analysis
analyzeHeadless /proj FirmwareProj -import rootfs/usr/sbin/httpd \
-processor ARM:LE:32:v7 -postScript DecompileAll.java
# radare2 with architecture specification
r2 -a arm -b 32 rootfs/usr/sbin/httpd
# For MIPS big-endian:
r2 -a mips -b 32 -e cfg.bigendian=true rootfs/usr/bin/target
Focus disassembly on:
# User-mode emulation for individual binaries
qemu-arm -L rootfs/ rootfs/usr/sbin/httpd
qemu-mipsel -L rootfs/ rootfs/usr/bin/target
# Use -strace to trace syscalls
qemu-arm -strace -L rootfs/ rootfs/usr/sbin/httpd
# If the binary needs specific /dev nodes or /proc, use chroot
sudo chroot rootfs/ /usr/sbin/httpd
# Or mount necessary filesystems
sudo mount -t proc proc rootfs/proc
sudo mount -t sysfs sysfs rootfs/sys
Enumerate what the device exposes on the network by reading init scripts and binary configurations rather than by scanning a live device.
# Services started at boot
rg -rn 'start\(\)|start_service' rootfs/etc/init.d/
# Listening ports from configuration
rg -rn 'listen|bind|port' rootfs/etc/ --include='*.conf'
# Common embedded services to look for
find rootfs -name 'telnetd' -o -name 'dropbear' -o -name 'sshd'
find rootfs -name 'upnpd' -o -name 'miniupnpd' -o -name 'minissdpd'
find rootfs -name 'mosquitto*' -o -name 'mqtt*'
find rootfs -name 'snmpd' -o -name 'snmp.conf'
Common findings:
public, private)When individual binary emulation is insufficient, emulate the entire firmware.
# FirmAE -- automated full-system emulation
sudo python3 firmae.py -r <brand> firmware.bin
# EMBA -- comprehensive firmware analysis framework
sudo ./emba -f firmware.bin -l ./logs
# firmwalker -- static analysis without emulation
./firmwalker.sh rootfs/
FirmAE and EMBA handle the hard parts: inferring the correct QEMU machine
type, setting up the network, and patching /dev/ nodes. If they fail,
manual QEMU system emulation requires building the correct device tree and
kernel for the target platform.
Once a full system is running, test it as you would any networked service: scan with nmap, test the web interface, fuzz the custom protocols. The difference is that you have the filesystem and can read the code while you test.
Firmware images routinely contain cryptographic material and implement custom cryptographic schemes.
# Find encryption keys and certificates
find rootfs -name '*.pem' -o -name '*.der' -o -name '*.key' -o -name '*.pub'
rg -rn 'AES|DES|RSA|SHA256|MD5|encrypt|decrypt' rootfs/usr/lib/ --include='*.so'
# Check update signature verification
# Look for signature checks in the update handler
rg -rn 'verify|signature|sign|openssl|gpg' rootfs/usr/sbin/ rootfs/etc/init.d/
What to look for:
/dev/urandom is seeded properly, whether the RNG is
initialized before key generation, and whether the device has a hardware
RNG that is actually used.See reviewing-cryptography for detailed cryptographic review methodology.
After completing the analysis, evaluate against these controls. The absence of any item is a finding.
| Control | Check | Common failure |
|---|---|---|
| Signed updates | Is the update package cryptographically signed with an asymmetric key? Is the signature verified before flashing? | No signature at all, or symmetric-only |
| Secure boot | Does the bootloader verify the kernel and rootfs integrity? | U-Boot with no signature verification |
| No default credentials | Does the device force a password change on first use? | root:root, admin:admin, or blank passwords |
| Minimal services | Are only necessary services enabled? | Telnet, UPnP, SNMP enabled by default |
| Debug interfaces | Are UART, JTAG, and SSH disabled or locked in production? | UART shell with root access, no authentication |
| Encrypted storage | Are credentials and keys stored encrypted at rest? | Plaintext passwords in config files |
| TLS everywhere | Do all network services use TLS with valid certificates? | Plain HTTP for web management, plain MQTT |
| Input validation | Do CGI and API handlers validate and sanitize input? | Direct shell injection through web parameters |
| Least privilege | Do services run as non-root where possible? | Everything runs as root |
| Logging and audit | Are security events logged? | No logging, or logs only in volatile memory |
analyzing-binaries -- disassembly and reverse engineering methodologyauditing-code-for-vulnerabilities -- source-level review when code is availableenumerating-network-services -- service discovery and assessmentreviewing-cryptography -- cryptographic implementation reviewWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub trilwu/secskills --plugin secskills-core30 skills in this plugin
/analyzing-binariesReverse engineer compiled binaries, firmware, and mobile app packages using triage, static disassembly, decompilation, and dynamic instrumentation. Use when analyzing an executable, ELF/PE/Mach-O file, firmware image, or stripped binary, recovering an algorithm or protocol, or working a CTF reversing challenge./analyzing-dotnet-assembliesReverse engineer .NET assemblies and executables with dnSpyEx, ILSpy, and de4dot — identifying and unwrapping obfuscators and packers, deobfuscating control flow and string encryption, handling single-file and NativeAOT publishes, and patching IL. Use when a binary is a managed PE, when ILSpy shows mangled names or empty method bodies, or when analyzing .NET malware, a loader, or a Windows application./analyzing-go-binariesReverse engineer Go binaries by recovering function names and types from pclntab and moduledata using GoReSym, redress, and IDA/Ghidra Go plugins, and by reading Go's non-standard calling convention, interface dispatch, and string layout. Use when a binary contains Go runtime strings, when strings show runtime.main or go:buildid, when a stripped binary is unexpectedly large, or when analyzing Go malware or a Go-based service./analyzing-ios-binariesAnalyze iOS applications at the binary level — decrypting FairPlay-protected IPAs with frida-ios-dump or bagbak, inspecting Mach-O load commands, recovering Objective-C headers with class-dump, and reading Swift metadata. Use when working with an IPA or .app bundle, when a downloaded App Store binary shows cryptid=1, when class-dump returns nothing, or when analyzing iOS frameworks and app extensions./analyzing-macos-binariesReverse engineer and security-review macOS applications and Mach-O binaries — thinning universal binaries, recovering Objective-C/Swift structure, reading code-signing entitlements and the hardened runtime, and auditing XPC services, dylib load paths, and TCC privacy exposure. Use when analyzing a .app bundle or Mach-O on macOS, checking entitlements and notarization, hunting a dylib-hijack or XPC privilege bug, or reasoning about Gatekeeper and quarantine./analyzing-rust-binariesReverse engineer Rust binaries — demangling legacy and v0 symbol schemes, recognizing monomorphized generics, Result and Option control flow, trait object vtable dispatch, and panic-site strings that leak source paths and crate names. Use when a binary contains rustc version strings, core::panicking, or _ZN/_R mangled symbols, when a stripped binary is unexpectedly large, or when analyzing Rust malware or a Rust service.2 plugins ship this exact skill · first indexed Jul 31, 2026
Other plugins' skills for the same job