yenn503/net-runners/performing-firmware-extraction-with-binwalk
Claude Code and agent skill by yenn503/net-runners
- community
Checking that the SKILL.md file is still in the repository.
'Performs firmware image extraction and analysis using binwalk to identify embedded filesystems, compressed archives,
Install
npx vskill@latest install yenn503/net-runners/performing-firmware-extraction-with-binwalkSKILL.md
The same SKILL.md was published earlier as agentflocks/flocks/performing-firmware-extraction-with-binwalk.
Performing Firmware Extraction with Binwalk
When to Use
- Analyzing IoT device firmware downloaded from vendor sites or extracted from flash chips
- Reverse engineering router, camera, or embedded device firmware for vulnerability research
- Identifying embedded filesystems (SquashFS, CramFS, JFFS2, UBIFS) within firmware blobs
- Detecting encrypted or compressed regions using entropy analysis
- Extracting hardcoded credentials, API keys, certificates, or configuration files from firmware
- Performing security assessments of embedded devices in authorized penetration tests
Do not use for analyzing standard desktop application binaries or malware samples that are not firmware images; use dedicated malware analysis tools instead.
Prerequisites
- binwalk v3.x installed (
pip install binwalk3or from system package manager) - Python 3.8+ with standard libraries (struct, math, hashlib, subprocess)
- SquashFS tools (
unsquashfs) for mounting extracted SquashFS filesystems - Jefferson for JFFS2 filesystem extraction (
pip install jefferson) - Sasquatch for non-standard SquashFS variants used by vendors like TP-Link and D-Link
stringsutility (GNU binutils) for string extraction- Optional: firmware-mod-kit for repacking modified firmware images
Workflow
Step 1: Initial Firmware Reconnaissance
Perform a signature scan to identify embedded file types and their offsets:
Step 2: Entropy Analysis
Analyze entropy to identify encrypted, compressed, and plaintext regions:
Interpreting entropy values:
- 0.0 - 1.0: Empty or padding regions (null bytes, 0xFF fill)
- 1.0 - 5.0: Plaintext data, code, ASCII strings, configuration
- 5.0 - 7.0: Compressed data (gzip, LZMA, zlib)
- 7.0 - 7.99: Strongly compressed or encrypted data
- ~8.0: Maximum entropy, likely encrypted or random data
Step 3: Extract Embedded Files
Extract all identified components from the firmware image:
Step 4: Mount and Inspect Extracted Filesystems
Mount extracted filesystems for deep inspection:
Step 5: String Analysis and Credential Discovery
Search extracted filesystem and raw firmware for sensitive data:
Step 6: Generate Firmware Analysis Report
Compile comprehensive extraction and analysis findings:
Key Concepts
| Term | Definition | |
|---|---|---|
| Firmware | Software embedded in hardware devices providing low-level control; typically contains a bootloader, kernel, root filesystem, and configuration data | |
| Entropy Analysis | Statistical measurement of randomness in binary data; high entropy indicates encryption or compression, low entropy indicates plaintext or structured data | |
| SquashFS | Read-only compressed filesystem commonly used in embedded Linux devices; supports LZMA, gzip, LZO, and zstd compression | |
| Magic Bytes | Known byte sequences at fixed offsets that identify file types; binwalk uses a database of magic signatures to detect embedded files | |
| Matryoshka Extraction | Recursive extraction mode where binwalk re-scans extracted files for additional embedded content, handling deeply nested archives | |
| CramFS | Compressed ROM filesystem designed for embedded systems with limited flash storage; supports only zlib compression | |
| JFFS2 | Journalling Flash File System version 2, designed for NOR and NAND flash memory in embedded devices |
Tools & Systems
- binwalk: Primary firmware analysis tool for signature scanning, entropy analysis, and automated extraction of embedded files
- unsquashfs: SquashFS extraction utility for mounting read-only compressed filesystems found in router and IoT firmware
- jefferson: Python tool for extracting JFFS2 flash filesystem images commonly found in embedded devices
- sasquatch: Patched SquashFS utility supporting non-standard vendor-modified SquashFS variants
- firmware-mod-kit: Toolkit for extracting, modifying, and repacking firmware images for security testing
Common Scenarios
Scenario: Extracting and Auditing Router Firmware for Hardcoded Credentials
Context: A security researcher is performing an authorized assessment of a consumer router. The firmware update file was downloaded from the vendor's support page. The goal is to identify hardcoded credentials, insecure default configurations, and known vulnerable components.
Approach:
- Run
binwalk -e firmware.binto perform initial extraction - Use
binwalk -E firmware.binto check entropy and identify encrypted regions - Locate the SquashFS root filesystem in the extracted output
- Mount with
unsquashfsand inspect/etc/passwd,/etc/shadow, and web server configs - Search for hardcoded credentials with
grep -rni "password" /tmp/root/etc/ - Identify service versions and cross-reference with CVE databases
- Check for debug interfaces (telnet, UART, JTAG references) in startup scripts
- Examine web application code for authentication bypass or command injection
Pitfalls:
- Some vendors use non-standard SquashFS with custom compression; use sasquatch instead of unsquashfs
- Encrypted firmware requires decryption keys often found in bootloader or previous unencrypted versions
- Firmware headers may need to be stripped before binwalk can identify the embedded filesystem
- Obfuscated strings may evade simple grep searches; use entropy analysis to locate data blobs
Output Format
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.netrunner/skills/forensics/performing-firmware-extraction-with-binwalk/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/yenn503/net-runners/performing-firmware-extraction-with-binwalk)