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
| Flag | Effect |
|---|---|
-e | Extract matched files |
-M | Recurse into extracted files |
-E | Plot 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.