Skip to content

Troubleshooting

Symptom → fix. Every entry here traces to something this guide's build actually hit, or to a behaviour the build verified on the specimen.

Extraction refuses to start, mentioning --run-as

Extractor Exception: Binwalk extraction uses many third party utilities,
which may not be secure. ... use '--run-as=root' (binwalk itself
must be run as root).

Fix: you are running binwalk as root, and it will not execute its external unpacking tools with root's privileges until you acknowledge it with --run-as=root. Better than the flag: run binwalk as an ordinary user, on a machine you can afford to lose, as the extraction chapter advises — the refusal is the tool telling you extraction is the dangerous part.

A member you expect is missing from the scan

Fix: it may have been seen and disbelieved. Re-run with -I to show results marked invalid. On the specimen, the planted gzip impostor at 78144 is invisible until -I, when it appears with "invalid extra flags" and a validator warning on stderr. If -I still shows nothing, check whether the member is inside a compressed or archived member — then it needs -Me, or extract the container first. If the region is a blank in every scan, read it with --entropy: a high plateau with no signatures usually means an encrypted or unknown-format region, and no option makes binwalk name what it doesn't know.

The scan finds an executable (or archive) in the middle of nowhere

Fix: suspect an accident before a discovery. Short signatures occur by chance inside compressed and random data — the specimen grows a "Microsoft executable" inside pure randomness at 0x128E3 (visible with -I). Test the claim: extract, or carve with -z and run file on the carve. A real member survives contact with its own parser; a phantom doesn't.

A filesystem was carved but never unpacked

The tree has 10000.squashfs (say) but no squashfs-root beside it.

Fix: the carve always happens; unpacking needs the format's helper. For SquashFS that is unsquashfs, and for vendor-modified SquashFS on real router images, sasquatch. For JFFS2, jefferson; for UBI/UBIFS, ubi_reader. Install the named helper and either re-run, or unpack the carve by hand — the carve on disk is already the whole member, intact.

-Me fills the disk or never seems to finish

Fix: recursing into self-similar archives is the classic extraction blow-up. Stop it, and re-run with the leashes set before the fact: -d to cap depth (default 8), -n to cap the number of extracted files, -j to cap each file's size. Work on a filesystem with room, and check the tree's growth while it runs rather than after.

A gzip member "extracted" but the output is empty or garbage

Fix: you have likely met a false positive that passed validation, or a truncated image. Look at the member with -I (was it already marked doubtful?), carve it alone with -e -z, and feed the carve to gzip -t — gzip's own test is the authority on whether a stream is whole. If the image came from a download, re-check its own checksum against the vendor's before blaming any tool.

Descriptions contradict reality (wrong name, absurd date, wrong size)

Fix: remember what a description is — a transcription of header fields. The specimen produced a tar whose owner is "ker.txt" and gzip members dated 1970, both faithfully read from peculiar headers. When a field matters, read the bytes yourself (xxd -s <offset>) or let the format's own tool report (tar -tvf on the carve disagreed with nobody). Never quote a description field as a finding without that second witness.

The scan of a real image finds nothing at all

Fix: in order — confirm the file is the image you think it is (file, size, the vendor's checksum). Run --entropy: a file that is one unbroken plateau near 1.0 is likely encrypted or fully compressed with an unknown scheme, and signature tools will not open it; a file that is mostly near 0 may be a sparse placeholder or the wrong download. If the device family is known, check whether its images carry a wrapper header or a signature scheme of their own — those belong to the vendor's tools first, and binwalk after the wrapper is off.

Check: every fix above is one of three moves — reveal what was filtered (-I), name the missing helper, or test the member with its own format's tool. Most binwalk mysteries surrender to one of the three.