Skip to content

Writing Criteria

Every guide in this repo is written to the same standard. If you're adding or editing a guide — human or AI — hold it to these.

  1. Plain words, real ideas. Simple language, never dumbed-down concepts. Explain jargon on first use; collect terms in the glossary.
  2. No hype. No marketing adjectives, no "revolutionary," no promises about what something will do for the reader.
  3. Honest about limits. Say what the thing can't do. State uncertainty instead of smoothing it over. Validation notes include what remains unverified.
  4. No invented numbers. Benchmarks, defaults, and specs are either measured or qualified with "depends on your setup." If it wasn't tested, say so.
  5. Checkable. Commands are meant to be run, with "Check:" blocks showing what success looks like. Sources are linked, not asserted.
  6. Respect the reader's setup. Call out Windows/Mac/Linux differences. Don't assume a GPU, a budget, or prior experience.
  7. Safety isn't skipped. Real risks get stated plainly, not buried.
  8. Scoped. Each guide says what it covers and points elsewhere for the rest. No guide pretends to be the whole subject.
  9. Structure over prose. Tables, before/after examples, symptom → fix. Scannable beats essay.

Verification notes for this guide

Standard 3 and 4 applied to this guide, specifically. The lab ran on the build machine with Binwalk v2.3.3 (Ubuntu 24.04 package 2.3.4+dfsg1-5; the banner reports the upstream number, and the installing chapter says so). Every hands-on claim was exercised against a specimen image assembled on the machine by examples/make_specimen.py — 78,202 bytes: invented header, 64 KB of zeros, a real SquashFS (built by mksquashfs from three text files written for the purpose), two gzip members (one carrying plain notes, one carrying a tar with a marker file), 8,192 random bytes, and a planted trap of bare gzip magic with junk behind it. All transcripts are kept with the lab (binwalk-lab/transcripts/, 19 numbered transcripts plus the two v3 build logs); the chapters quote them trimmed but unaltered.

Run for real, captured:

  • Inventory. binwalk banner v2.3.3; the shipped magic library (27 files beside the Python package); signature count 411 as reported in the matryoshka run's header.
  • The scan. Plain scan of the specimen returned exactly the three real members at the builder manifest's offsets — SquashFS at 65536 (0x10000), gzip at 69632, gzip at 69776 — and nothing else. The SquashFS row's "size: 650 bytes" is the superblock's figure against the member's 4,096-byte padded footprint; chapter 3 teaches the discrepancy.
  • What the plain scan hides. binwalk -I added two rows: a "Microsoft executable" at 76003 (0x128E3) inside the random region — a chance match — and the trap at 78144, described with a garbage filename and a 2031 date read from junk header fields. The gzip validator crashed on the trap (stderr WARNING: gzipvalid.scan failed [IndexError]); binwalk continued.
  • The root refusal. binwalk -e as root was refused verbatim ("Binwalk extraction uses many third party utilities, which may not be secure… use '--run-as=root'"); the transcript is kept and chapter 4 is built around it.
  • Extraction. With --run-as=root: carves 10000.squashfs, 11000, 11090, and squashfs-root unpacked by unsquashfs. The planted notes file's SHA-256 after extraction — 7ccaa2b81c3f9aa9d677756ff16be21f13ada62afcc82fe19abdfbe6bc944a1e — equals the source file's hash taken at build time. Byte-for-byte recovery, proven.
  • Carve-only. binwalk -e -z produced 10000.squashfs, 11000.gz, 11090.gz and no unpacked trees — the contrast chapter 4 teaches.
  • Matryoshka. binwalk -Me ran four scans: the image; the extracted notes (empty); the extracted 11090, where a POSIX tar was found at offset 0 and unpacked to _11090.extracted/deep/marker.txt; and the marker itself (empty). The nested marker line "WOMBAT-2210-CANDLE" was recovered from image → gzip → tar → text. The tar's description ("owner user name: ker.txt") is quoted in chapters 5 and 10 as a misread header field.
  • Entropy. --entropy --nplot reported a falling edge at 0 (0.016505) and a rising edge at 69632 (0.961859) — one member later than the compressed region's true start, and no falling edge for the file's tail; chapter 6 teaches both as block-granularity evidence. --entropy --save produced a real PNG (579 × 453, specimen.bin.png).
  • Filters and raw search. binwalk -y squashfs reduced the table to the one row. binwalk -R '\x1f\x8b\x08' reported all three gzip magics, the trap included — the validation contrast chapter 8 teaches.
  • Opcode scan. binwalk -A on a small gcc-compiled x86-64 ELF returned an empty table. The shipped opcode signatures were read directly (binwalk/magic/binarch): ARM/Thumb, MIPS family, PowerPC and kin. Chapter 8 reports the abstention and the reason, from that evidence.
  • A custom signature. A two-line magic file for the specimen's invented header, run with binwalk -m, found the header at offset 0 and read its version string ("1.0") via the continuation line — and returned no other rows, evidencing that -m replaces the built-in set for the run.
  • Neighbours, measured. file specimen.bin answered "data"; strings found only the uncompressed header (both markers sit inside compressed members); file on the carved 11090 answered "POSIX tar archive" and tar -tvf listed its member. Chapter 11 quotes these runs, not reputations.

Documented-only (not run), and why:

  • Binwalk v3 (the Rust rewrite). No working v3 binary was produced on this machine. Two attempts are on record: cargo install binwalk --version 3.1.0 with the system Cargo 1.75 failed — a dependency requires the edition2024 Cargo feature, unstabilised in 1.75; a retry with a current rustup toolchain collided with another build's rustup/cargo file locks and component rename errors on the shared machine, and was stopped rather than nursed. Upstream ships no prebuilt release binaries (the v3.1.0 release carries no assets), so v3 is covered from the project's own README and wiki — what it is, how it's distributed (Docker image or source build), and that its flags differ — with no v3 output quoted anywhere in the guide.
  • The non-SquashFS filesystems of chapter 7 (JFFS2, UBI/UBIFS, CramFS, YAFFS, ext, cpio) — surveyed from binwalk's shipped signature and extractor configuration and the helper tools' documentation. Their helpers (jefferson, ubi_reader, sasquatch) were not installed; only SquashFS was exercised end to end, and the chapter says so over its own table.
  • macOS and Windows arrangements in the installing chapter — stated from the project's documentation, not run here.
  • FACT and firmware-mod-kit — described from their projects' documentation; neither was installed. firmware-mod-kit's rebuild half is out of the guide's scope by design.

Sandbox state after the build, for the record: the specimen, its builder script, the lab magic file, the entropy PNG, and all transcripts remain with the guide; the working extraction trees and the build venv were removed as regenerable. The binwalk package itself remains installed, stock. No real firmware image was scanned at any point; nothing extracted was executed.