The Neighbours
Binwalk sits in a crowded workshop. These are the tools on the neighbouring benches — what each is for, and the moment you'd reach for it instead. Several were run against the specimen while this guide was built, and their results are quoted from that run, not from their reputations.
file — the first tool everyone tries,
and the specimen shows its limit in one word:
$ file specimen.bin
specimen.bin: data
file reads the beginning of a file and
names the whole by it. Our image begins with
an invented header, so the verdict is "data" —
true, and useless. Binwalk exists because
firmware is interesting in the middle. Use
file on single files and on binwalk's
carves (it correctly called the carved 11090
a POSIX tar archive); don't ask it about
containers.
strings — prints the readable text
inside a binary. Against the specimen it found
exactly one of the strings planted for it:
$ strings specimen.bin | grep -E 'QUOKKA|WOMBAT|MMLAB'
MMLAB-FW 1.0
The two markers are inside compressed
members, and compression makes text unreadable
until something unpacks it. strings sees the
uncompressed surface of a file and nothing
else — invaluable inside an extracted
filesystem, blind inside an image.
A hex editor / xxd — the manual
instrument. When a description looks wrong,
or a signature hits somewhere implausible,
looking at the actual bytes at that offset is
the court of appeal. Every verification in
this guide could, at need, be repeated with
xxd -s <offset> and your own eyes.
7-Zip (7z) — the general-purpose
unpacker. It opens a surprising range of what
binwalk carves (archives, some filesystems,
installer formats) and is often the quickest
way to finish a job binwalk started, one
member at a time, by hand.
The filesystem's own tools — unsquashfs,
sasquatch, jefferson, ubi_reader. The
previous chapter's helpers. Binwalk calls them
for you; knowing them directly is what turns
"extraction stopped halfway" into a diagnosis.
firmware-mod-kit — a toolkit built around binwalk's extraction for the round trip: extract a router image, modify the filesystem, rebuild an image to flash. If your goal is a modified device rather than an understood one, that is its bench — with all the bricking risk that flashing a rebuilt image implies, which is why this guide stays on the analysis side of the line.
FACT (Firmware Analysis and Comparison Tool) — the industrial neighbour: a server platform that ingests firmware images, unpacks them with binwalk among its extractors, and builds a searchable corpus with comparison across versions. For a fleet of images and a team, FACT is the grown-up answer; for one image on your bench, it is a data centre to fetch a hand tool.
Ghidra — for the code itself. When the extracted filesystem yields a program whose behaviour is the real question, binwalk's work is done and a disassembler's begins. The companion guide Ghidra for Mere Mortals picks up exactly there, including the architecture question the opcode chapter previews.
binvis and visual tools — render a file as a picture, bytes to colours, and let your eyes find the regions. A cousin of the entropy plot: same instinct (structure is visible), less precision, sometimes faster intuition on a wholly unknown file.
Check: the division of labour in one
line — file names a file, strings reads
its surface, binwalk maps and opens the
container, the format tools unpack their own,
Ghidra reads the code, FACT does it at scale.
Reaching for the right bench first is most of
the craft.