pentesting, updated

binwalk

Firmware and file-carving tool that scans any binary blob for embedded files and filesystems by signature.

What it’s for

Identify and extract embedded files, filesystems and compressed data hidden inside another file — firmware images, PDFs, or any binary blob.

Install

apt install binwalk

Common commands

binwalk suspect.bin                  # scan and list every signature match with offset
binwalk -e suspect.bin                # extract everything it finds into _suspect.bin.extracted/
binwalk -Me suspect.bin               # recursive extraction into nested archives/filesystems
binwalk -E suspect.bin                # entropy graph — spots encrypted/compressed regions
binwalk --dd='.*' suspect.bin         # extract every match regardless of signature

Useful flags

FlagEffect
-eExtract matched files
-MRecurse into extracted files
-EPlot byte entropy (find packed/encrypted sections)
-y <sig>Limit the scan to one signature type

Notes

Firmware-specific, but the same signature scan works on any container format — PDFs, Office files, disk images.

Used in

§ home
~/knubertus/home/
1,1 Top