Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Binwalk?

Binwalk analyses firmware images and other binary blobs, identifying embedded file systems, kernels, and certificates by signature and extracting them for examination.

Illustration for the cybersecurity term Binwalk
Home / Blog / Cybersecurity Terms / What Is Binwalk?
17 November 2026

What Is Binwalk?

What Is Binwalk?

Binwalk is a tool for analysing binary files, used almost exclusively against firmware. Point it at the update image a manufacturer publishes for a router, camera, or industrial controller, and it scans for the magic byte sequences that mark the beginning of known formats, reports what it finds and where, and then extracts those components into a directory tree you can read.

The reason it matters is that a firmware image is usually a container rather than a program. Inside a single file you typically find a bootloader header, a compressed Linux kernel, and a root file system in SquashFS, JFFS2, CramFS, or UBIFS format. Once that file system is unpacked, it is an ordinary directory of ordinary files, and everything the device runs can be read at leisure.

What an Analysis Produces

The signature scan is the first step and often the most informative. It gives an offset table: a uImage header at the start, an LZMA-compressed kernel a few hundred bytes in, a SquashFS file system at some later offset, and sometimes a certificate or a public key sitting on its own. Extraction then recursively unpacks each of those.

What a tester reads out of the extracted file system, in rough order of how often it appears:

Entropy Analysis

Binwalk’s entropy graph is the quickest way to answer a question that determines how the rest of the assessment goes: is this image encrypted? Uncompressed code and data produce a varied, moderate entropy profile. Compressed data produces consistently high entropy with visible structure at the boundaries. Encrypted data produces a flat line at near-maximum entropy from beginning to end, with no structure at all.

A flat high-entropy image means signature scanning will find nothing, and the analysis has to go another way: obtaining the decrypted image from the device’s own flash through JTAG or UART, dumping the SPI flash chip directly, or recovering the decryption key from the bootloader. That is a considerably larger piece of work, which is precisely the point of encrypting firmware.

A Note on Running It Safely

Extraction means invoking third-party decompressors on attacker-influenced data, and the tool itself has had security problems. CVE-2022-4510 was a path traversal flaw in Binwalk’s PFS file system extractor that allowed a crafted firmware image to write files outside the extraction directory and achieve code execution on the analyst’s machine. Treat firmware you did not build as hostile input: extract inside a disposable container or virtual machine, use a non-privileged account, and keep the tool updated.

What Manufacturers Should Do About It

Firmware extraction cannot be prevented once a device is in someone’s hands, so the objective is to make the extracted contents worthless.

ETSI EN 303 645 sets out these expectations as a baseline standard, and it is the reference the UK regime draws on.

At Privia Security, our IoT Penetration Testing includes firmware extraction and analysis as a standard part of device assessments.

FAQ – Frequently Asked Questions

What Does Binwalk Do if the Firmware Is Encrypted?

Very little, and that is useful information in itself. A flat entropy graph at near-maximum value across the whole image indicates encryption, and signature scanning will return nothing. The analysis then has to obtain a decrypted image another way, typically by dumping the flash chip directly, using a UART or JTAG interface, or recovering the key from an unencrypted bootloader stage.

Is Extracting a Vendor’s Firmware Legal?

In the UK, analysing firmware from a device you own is generally lawful, and the Copyright, Designs and Patents Act 1988 permits decompilation in limited circumstances. Licence terms may still prohibit it contractually, and publishing extracted proprietary code is a separate matter. Testing someone else’s device, or any device still in service on a network you do not own, requires written authorisation under the Computer Misuse Act 1990.

Can Binwalk Analyse Any Binary File?

It can scan any file for known signatures, but it is designed for firmware. Running it against a normal application binary produces mostly noise, since compiled code contains byte sequences that coincidentally match signature patterns. For application binaries, a disassembler such as Ghidra or IDA Pro is the correct tool, and the two are frequently used together on the executables Binwalk extracts.

What Should a Manufacturer Change After a Firmware Review?

Remove every shared secret from the image, provision per-device credentials and keys at manufacture, sign firmware and verify the signature in the bootloader, and update bundled components to current versions. In the UK, universal default passwords on consumer connectable products have been prohibited since 29 April 2024 under the PSTI regime, alongside published vulnerability disclosure and support period requirements.

Related Terms

You May Be Interested In These

What Is Zerologon?

Cybersecurity Terms

17 November 2026

What Is Zerologon?

Read More
What Is a Disaster Recovery Plan?

Cybersecurity Terms

17 November 2026

What Is a Disaster Recovery Plan?

Read More
What Is Hospital Device Network Security?

Cybersecurity Terms

17 November 2026

What Is Hospital Device Network Security?

Read More