Binwalk

Analyze and extract firmware

Open firmware. Find the structure. Extract the evidence. Binwalk identifies and extracts files, file systems, compressed streams, executables, bootloaders, kernels, and other data embedded inside firmware and binary images - built for firmware security research, reverse engineering, and digital forensics.

Download BinwalkView on GitHub

Free & open source · Binwalk 3.1.0 · Linux, macOS & Windows (WSL/Docker) · install options

Animated terminal recording of Binwalk scanning and extracting a firmware image

What is Binwalk?

A firmware image rarely contains just one file. It can hold layers of compressed data, proprietary headers, operating-system components, boot code, certificates, executables, configuration files, and complete file systems - and locating each one by hand is slow and error-prone.

Binwalk automates the first stage of analysis: it scans binary data for known structures, validates the objects it detects, and shows where every recognized component begins. Originally created by Craig Heffner at ReFirm Labs, Binwalk v3 rebuilt the engine in Rust for speed, structural validation, and lower false-positive rates. It is open source under the MIT License and works as a command-line tool or a Rust library.

How Binwalk works

Six commands cover most firmware analysis - scan, extract, recurse, measure entropy, log, and review.

1

Scan and identify

$ binwalk firmware.bin

Map the internal structure of an image: Binwalk reports recognized objects by decimal and hex offset, with size, format details, compression parameters, architecture, file-system metadata, and a confidence level for each find.

2

Extract embedded content

$ binwalk -e firmware.bin

Pull out recognized files, archives, compressed streams, and file systems using built-in extractors or supported external utilities - no manual offset math or file carving.

3

Unpack nested firmware

$ binwalk -Me firmware.bin

Recursively analyze newly extracted files to uncover archives inside file systems, compressed data inside partitions, and the deeper layers of update packages and layered firmware.

4

Locate unknown regions

$ binwalk --entropy firmware.bin

Generate an entropy graph to spot transitions between structured data and high-entropy regions - the compression, encryption, or padding that signatures alone do not explain.

5

Save structured results

$ binwalk --log=results.json firmware.bin

Export signature and entropy findings as JSON for automation, reporting, indexing, comparison, or hand-off to other analysis tools.

6

Review supported signatures

$ binwalk --list

List the signatures available in the installed version, their internal names, and the extraction utility associated with each format.

Why Binwalk

Custom Rust parsers, confidence-aware results, and automation-ready output - so a scan is a reliable starting point, not a pile of guesses.

Validation beyond magic bytes

Binwalk v3 uses custom Rust parsers to confirm a structure, calculate an embedded object’s size, and decide where scanning continues - far fewer false positives than byte-signature matching alone.

Confidence on every result

Each detection is graded high (metadata and data validated), medium (sane metadata checks passed), or low (identifying bytes only) - so strong findings are easy to separate from those needing manual review.

Entropy analysis

Visualize data randomness to find where a compressed partition starts and ends, whether an image holds several regions, and which unexplained sections may be encrypted, padded, or unknown.

Focused scans

Large images hold thousands of objects. Exclude noisy media, limit to selected signatures, or search every offset for an exhaustive pass - so results stay readable during time-sensitive work.

Built for automation

JSON output feeds scripts, CI pipelines, and forensic platforms. The Binwalk Rust library integrates directly into applications when command-line execution and JSON parsing are not enough.

Fully local analysis

Everything runs in your own environment - sensitive product images, unreleased builds, and forensic evidence never have to be uploaded. For untrusted samples, work inside a VM or container.

Supported formats

More than 100 file and data signatures across firmware, operating-system, archive, file-system, executable, and security-related formats.

Firmware & boot formats

TRXuImageAndroid bootAndroid sparseUEFI capsuleUEFI volumeDevice tree (DTB)CFE bootloaderMatter OTAD-Link / TP-Link / Dahua

File systems & disk structures

SquashFSJFFS2UBIUBIFSEXTFATNTFSAPFSBTRFSCramFSRomFSYAFFSISO9660MBRGPT/EFI

Compression & archives

gzipLZMAXZZIP7-Zipbzip2LZ4LZFSELZOZstandardRARCPIOTARCABARJ

Executables & system

ELFWindows PELinux kernelARM / ARM64 bootWindows CEVxWorksQNXQEMU disk image

Security & cryptographic

PEM certificatesPublic / private keysLUKS headersOpenSSL encryptedAES tablesRSA session keysHash constantsSigned files

Available formats and extraction capabilities vary by Binwalk version and by the external utilities installed on the system.

Who uses Binwalk

From security research to embedded development - wherever firmware and binary data need to be opened up.

Firmware & IoT security research

Map update packages, recover embedded file systems, inspect startup scripts, locate configuration files, and prepare firmware for vulnerability analysis.

Product security & PSIRT teams

Triage firmware from routers, cameras, industrial devices, appliances, automotive systems, and connected products before deeper static analysis or emulation.

Reverse engineering

Separate proprietary containers into smaller components, identify internal boundaries, locate executable code, and reduce how much unknown data must be inspected by hand.

Digital forensics & IR

Extract artifacts from device images, identify embedded payloads, and export structured results for use in repeatable forensic workflows.

Embedded development

Inspect release images, verify expected components, compare firmware layouts, and integrate binary analysis into development or quality-assurance tooling.

Hardware hacking & training

Move quickly from a captured flash image or vendor update file to an extracted root file system, kernel, bootloader, and device-specific configuration.

Install Binwalk

64-bit Linux (Cargo)

Linux is the officially supported platform for Binwalk v3, with Ubuntu-based distributions giving the most predictable setup. Some file systems and archive formats need additional external utilities.

$ cargo install binwalk

macOS & Linux (Homebrew)

Homebrew provides packaged installation for supported macOS and Linux environments.

$ brew install binwalk

Docker

Docker gives a reproducible environment with controlled dependencies, well suited to isolated firmware analysis.

$ sudo docker run -t -v "$PWD":/analysis binwalkv3 -Me firmware.bin

Windows (WSL or Docker)

For the most predictable Windows workflow, run Binwalk inside WSL or Docker. Native Windows builds may compile, but upstream testing and support remain limited.

$ wsl -- cargo install binwalk

Get the Binwalk source

Download the Binwalk 3.1.0 source archive to build from source, inspect the implementation, contribute signatures and parsers, or integrate the Rust library into your own project. Analysis stays local - treat extracted code as untrusted and keep unknown samples isolated.

Source archive (.zip) · Binwalk 3.1.0 · MIT License

Frequently asked questions

What is Binwalk?

Binwalk is an open-source firmware analysis tool that identifies and extracts files, file systems, compressed data, executables, bootloaders, kernels, certificates, and other structures embedded inside binary images. It is commonly used in firmware security research, reverse engineering, digital forensics, embedded development, hardware hacking, and product security investigations.

What is Binwalk used for?

Binwalk helps analysts understand the internal structure of firmware and other binary files. Typical uses include extracting embedded file systems, locating compressed or encrypted regions, identifying executable code, recovering configuration files, inspecting device update packages, comparing firmware layouts, and preparing binary images for deeper security analysis.

Who is Binwalk designed for?

Binwalk is designed for security researchers, reverse engineers, penetration testers, forensic analysts, embedded developers, hardware hackers, product security teams, and anyone working with firmware or binary data. It supports both quick command-line inspection and more advanced automated analysis workflows.

What types of files can Binwalk analyze?

Binwalk can analyze firmware images, flash dumps, device update packages, disk images, boot images, executables, archives, compressed streams, and other binary files. The file does not need a standard extension - Binwalk analyzes the underlying binary data rather than relying on the filename.

Can Binwalk extract files from firmware?

Yes. Binwalk can automatically extract many recognized files, archives, compressed streams, and file systems. Some formats are handled by built-in extraction logic, while others require additional utilities installed on the system. Detection and extraction support may differ depending on the format and the installed Binwalk version. A basic extraction uses binwalk -e firmware.bin.

Can Binwalk recursively unpack nested firmware?

Yes. Recursive extraction lets Binwalk analyze files created during the extraction process. This is useful when firmware contains multiple layers - such as a vendor update package containing a compressed partition, which then contains a file system, archives, and embedded executables. A common recursive command is binwalk -Me firmware.bin.

What does an entropy scan show?

An entropy scan visualizes how random or repetitive different regions of a binary file appear. Higher-entropy regions often contain compressed or encrypted data; lower-entropy regions may contain text, structured records, padding, or repetitive data. Entropy analysis does not prove a region is encrypted or compressed, but it reveals boundaries and unexplained areas that deserve further investigation.

How accurate are Binwalk signatures?

Accuracy depends on the format, the available parser, and how much structural validation can be performed. Binwalk v3 can validate many detected objects beyond their initial identifying bytes, which helps reduce false positives, calculate object sizes, and provide more useful metadata. Results should still be treated as evidence for further analysis rather than a final conclusion.

Does Binwalk work locally?

Yes. Binwalk runs locally on the analyst’s system. Firmware images, unreleased builds, customer files, and forensic evidence do not need to be uploaded to an external service, which makes Binwalk suitable for sensitive research and controlled environments. Untrusted firmware should still be analyzed inside an isolated machine, virtual machine, or container.

Which operating systems support Binwalk?

Binwalk v3 is primarily developed and tested for 64-bit Linux systems. It can also be installed through Homebrew on supported macOS and Linux environments. Windows users can run Binwalk through WSL or Docker for a more predictable setup. Native compatibility, available extraction tools, and installation requirements may vary by platform.

How is Binwalk installed?

Binwalk can be installed through Cargo (cargo install binwalk), Homebrew (brew install binwalk), Docker, or by building the project from source on GitHub. Some extraction features require external utilities that may not be installed automatically with the main package.

Is Binwalk free and open source?

Yes. Binwalk is open-source software distributed under the MIT License. The source code can be inspected, modified, integrated into other software, and used in commercial or non-commercial environments under the terms of the license.

Can Binwalk be integrated into automated tools?

Yes. Binwalk can export analysis results as structured JSON for use in scripts, CI pipelines, forensic systems, firmware-processing platforms, and internal security tools. Binwalk v3 can also be used as a Rust library, letting applications scan binary data directly without relying only on command-line execution.

Who created Binwalk?

Binwalk was originally created by Craig Heffner at ReFirm Labs to simplify the identification and extraction of embedded data from firmware images. It became a widely used tool in firmware security, reverse engineering, digital forensics, penetration testing, and hardware research. Binwalk v3 rebuilt the analysis engine in Rust with a stronger focus on performance, structural validation, extraction, and reduced false positives.

Is Binwalk a complete firmware security scanner?

No. Binwalk is a firmware identification, extraction, and analysis tool. It exposes the components inside a binary image, but it does not automatically determine whether every extracted component is secure or vulnerable. A complete firmware security workflow may also include disassembly, decompilation, emulation, software composition analysis, secret scanning, configuration review, cryptographic analysis, vulnerability research, and testing on authorized hardware.

Is Binwalk available for Windows?

Binwalk is Linux-first, but it runs well on Windows through WSL (Windows Subsystem for Linux) or a Docker container, which give the closest match to the officially supported environment. Inside WSL you can install it with cargo install binwalk and analyze files from your Windows drives. Native Windows builds may compile, but they receive limited upstream testing.

Start with the binary. Get to the evidence faster.

Map the firmware image, extract its internal components, and identify unexplained regions - open source, MIT licensed, and analyzed entirely on your own machine.