Introduction
Firmware security research
FATFirmware Analysis Toolkit
Classify unknown images, extract filesystems, map trust-relevant code and data flow, and coordinate emulation — from one CLI, with structured evidence at every step.
Start where you are
New to FAT
Install the CLI and runtime data, then walk through a first investigation.
02Unknown image
Identify containers, filesystems, MCU images, update envelopes, and BMC flash.
03Extracted rootfs
Inventory startup, credentials, crypto material, trust paths, and Edge AI artifacts.
04Binary or script
Triage, decompile, and trace source-to-sink flow through binaries and shell.
05BMC flash
Read FIT metadata and U-Boot environments, then boot supported images.
06Automation
JSON, SARIF, exit gates, and pinned external campaign replays.
Quick start
Download the archive for your platform from FAT Releases, verify its .sha256, and keep fat and share/ together. Or install with Cargo and fetch the matching runtime data:
cargo binstall firmware-analysis-toolkit
fat data install --release
fat doctor
Then point FAT at a file:
fat ./firmware.bin # identify: compact overview
fat ./firmware.bin --details # supporting tables
fat new ./firmware.bin # create a project under .fat-projects/
fat extract .fat-projects/firmware
fat analyze .fat-projects/firmware
fat ./firmware.bin is shorthand for fat identify --file ./firmware.bin. See First contact for how to read the result and choose the next command.
What FAT analyzes
| Target | Evidence |
|---|---|
| Unknown blobs and directories | Containers, compressed members, high-entropy regions, MCU signals, candidate firmware files |
| Firmware images | Headers, update envelopes, partitions, bootloaders, image-to-image differences |
| BMC flash | FIT hash/signature metadata, OpenBMC/MegaRAC markers, CRC-valid U-Boot environments, JFFS2 recovery |
| Extracted Linux filesystems | Inventory, startup intent, trust-bearing binaries, crypto material, string evidence |
| ELF binaries | Imports, exports, handler tables, stripped-code sinks, decompilation, source-to-sink taint |
| Bare-metal and MCU images | Vector tables, memory maps, peripheral hints, flash-write authority, boot handoff evidence |
| Edge AI artifacts | MAGIK/JZDL, TFLite, ONNX, Qualcomm DLC, and visible inference runtimes |
| Android applications | APK inventory, discovery leads, locality, capability chains, handoff boundaries |
| Source repositories | Invariant queries, patch guidance, nearby variant searches |
Evidence, not verdicts
FAT reports observations: offsets, counts, hashes, confidence, validation state, provenance, and next probes. A structurally valid key is not proof of runtime use; a startup entry is not proof of reachability; an emulation validator proves only what it checked during that run. Read How to read FAT output before treating a finding as a conclusion.
Project and license
FAT is developed by adi0x90 and maintained under Attify. Version 2.x is source available under FSL-1.1-ALv2, converting to Apache-2.0 two years after each release. See Security before processing untrusted images or exposing an emulated service.
Quick start
This page takes you from installation to a first evidence-backed investigation. It uses a firmware image named firmware.bin; substitute your own file.
1. Install
Pick one path:
- Release archive (recommended): download the bundle for your OS/CPU from FAT Releases, verify the adjacent
.sha256, and keep the executable andshare/directory together. - Cargo:
cargo binstall firmware-analysis-toolkit, orcargo install --locked firmware-analysis-toolkitto build from source. Cargo installs only the executable.
Cargo installations need the matching runtime data:
fat data install --release
Verify the installation:
fat --version
fat data verify
fat doctor
fat doctor reports external tools and backend readiness. Install only what your workflow needs; see Installation.
2. Identify before you extract
fat ./firmware.bin
fat ./firmware.bin --details
fat ./firmware.bin --json > identify.json
The compact report shows identity and structure. --details adds supporting tables; --json emits the full identify-report/v1 model. Identification is read-only and does not execute firmware.
Branch on what you find:
| Observation | Next step |
|---|---|
| Linux filesystem or SquashFS/JFFS2/UBIFS signatures | Create a project and extract |
| Raw Cortex-M vector table | fat inspect mcu --file firmware.bin --details |
| BMC flash layout, FIT, U-Boot environment | fat inspect bmc --file firmware.bin --details |
| ESP-IDF partition table | fat inspect headers --file firmware.bin |
| Update envelope or trust-path evidence | fat inspect update --file firmware.bin --rootfs ./rootfs |
3. Create a project and extract
fat new ./firmware.bin
fat extract .fat-projects/firmware
fat new creates a project under .fat-projects/ and records the source identity. fat extract recursively unpacks containers and filesystems, then records per-artifact outcomes in work/extraction-manifest.json.
For firmware with case-distinct filenames, put the project on case-sensitive storage:
fat new ./firmware.bin --projects-dir /path/to/case-sensitive/projects
fat extract /path/to/case-sensitive/projects/firmware --extractor native
--extractor native uses only built-in decoders; the default auto keeps external fallback when native recovery is incomplete. Read Extracting firmware for formats, limits, and recovery states.
4. Analyze the extracted filesystem
fat analyze .fat-projects/firmware
fat tree --rootfs .fat-projects/firmware/extracted --profile inventory --summary
fat search --rootfs .fat-projects/firmware/extracted --profile credentials -I --context 2
fat startup-map --rootfs .fat-projects/firmware/extracted
fat crypto-census --rootfs .fat-projects/firmware/extracted
analyze derives project signals and findings. The filesystem commands then answer concrete questions: what starts at boot, which binaries hold credentials or keys, and which paths govern updates.
5. Triage a binary
fat r2-triage --file .fat-projects/firmware/extracted/usr/sbin/httpd --json
fat sink-discovery --file .fat-projects/firmware/extracted/usr/sbin/httpd --json > sinks.json
fat taint --file .fat-projects/firmware/extracted/www/cgi-bin/diag.cgi --summary
For a stripped binary, feed the sink candidates into taint and turn the resulting addresses into runtime hooks:
fat taint --file ./usr/sbin/httpd --sink-candidates sinks.json --json > taint.json
fat instrument-hooks --from-sinks sinks.json --output hooks.yaml
See Binary triage and decompilation and Taint analysis.
6. Emulate only when the evidence supports it
fat preflight .fat-projects/firmware
fat emulate --project .fat-projects/firmware
fat emulate --project .fat-projects/firmware --status
fat emulate --project .fat-projects/firmware --stop
preflight ranks backends and checks host readiness. Emulation executes untrusted vendor code; review Security first, and use a disposable lab environment. Supported BMC images use explicit hash-pinned profiles — see Emulating BMC firmware.
Where to go next
- How to read FAT output — what each result does and does not prove.
- Command reference — every command grouped by task.
- Architecture — workspace crates and extension points.
- CI and automation — JSON, SARIF, and exit gates.
Installation details
The minimal quick start (clone, build, install) lives in the FAT documentation. This page is the full installation reference: installer options, external tools, and optional components.
Release downloads
Choose a bundle for your operating system and CPU from FAT Releases.
Binary bundles contain fat (fat.exe on Windows), the matching share/fat runtime data, and dependency license notices.
Choose the target matching your machine:
| System | CPU | Target |
|---|---|---|
| macOS | Apple Silicon | aarch64-apple-darwin |
| macOS | Intel | x86_64-apple-darwin |
| Linux | x86-64 | x86_64-unknown-linux-gnu |
| Linux | ARM64 | aarch64-unknown-linux-gnu |
| Windows | x86-64 | x86_64-pc-windows-msvc |
Linux x86-64 requires glibc 2.35 or newer; Linux ARM64 requires glibc 2.39 or newer. The archives are tested on Ubuntu 22.04 (x86-64), Ubuntu 24.04 (ARM64), and Fedora 42 (both CPUs).
Verify the archive against its adjacent .sha256 file, extract it, and keep the executable and share directory together:
# Substitute the target from the release's asset list.
shasum -a 256 -c firmware-analysis-toolkit-TARGET.tar.gz.sha256
tar -xzf firmware-analysis-toolkit-TARGET.tar.gz
cd firmware-analysis-toolkit-TARGET
./fat --version
./fat data verify
./fat doctor
export PATH="$PWD:$PATH"
On Windows, use Get-FileHash to compare the ZIP’s SHA-256 with its .sha256 file, extract with Expand-Archive, and run .\fat.exe data verify from the extracted directory.
The Windows binary supports native analysis commands; workflows using Linux filesystem semantics or external Unix tools should run under WSL with the Linux build.
Cargo installations
FAT is published on crates.io as firmware-analysis-toolkit.
cargo install and cargo binstall install only the fat executable; neither provides share/fat.
With cargo-binstall available, the prebuilt archive for this platform is fetched instead of compiling:
cargo binstall firmware-analysis-toolkit
Compiling from source needs Rust 1.91 or newer and a C compiler:
cargo install --locked firmware-analysis-toolkit
Then install the runtime data for the installed version:
fat data install --release
fat data verify
fat doctor
--release downloads fat-data-<version>.zip and its .sha256 from the GitHub release, verifies the digest and the manifest, and activates the data.
To install from a downloaded archive instead (offline or pinned installs):
version="$(fat --version | awk '{print $2}')"
base="https://github.com/attify/firmware-analysis-toolkit/releases/download/v$version"
curl -fLO "$base/fat-data-$version.zip" -fLO "$base/fat-data-$version.zip.sha256"
[ "$(cat "fat-data-$version.zip.sha256")" = "$(shasum -a 256 "fat-data-$version.zip" | cut -d' ' -f1)" ]
fat data install --archive "./fat-data-$version.zip"
Use sha256sum in place of shasum -a 256 on Linux.
Installed data lands in the platform user data root (~/Library/Application Support/FAT on macOS, $XDG_DATA_HOME/fat or ~/.local/share/fat on Linux, %LOCALAPPDATA%\FAT on Windows) and is discovered automatically; set FAT_DATA_DIR to use an unversioned tree instead.
Without the bundle, identification, inspection, carving, and analysis work, while kernel recipes, bootloader profiles, emulation, and Android helpers report a missing runtime resource.
The source installer below installs both the executable and its runtime data.
Upgrading from FAT 1.x
FAT 2 is a Rust CLI with a new installation and project workflow.
Install it in a separate directory, run fat doctor, and create a project with fat new ./firmware.bin.
Use the fat commands in the quick start; the FAT 1.x setup.sh, fat.py, and fat.config instructions apply to the older release.
Keep existing FAT 1.x workspaces until you have recreated the projects you need in FAT 2.
Arch Linux and Omarchy
Use a regular account with sudo access. The host package setup was validated on Omarchy 4.0.4 (x86-64), using an 8 GB VM and two build jobs. A clean Arch installation was not separately tested.
Install FAT and the default extraction engine
Install the prerequisites with a full system upgrade, then initialize Rust. If you already installed Rust through rustup, omit rustup from the package list below:
sudo pacman -Syu --needed git rustup python
rustup default stable
rustc --version # must be 1.91 or newer
The installer requires Rust and Python to be present; --install-system-deps does not bootstrap them.
Clone FAT, or use your existing checkout, and run the installer as your regular user:
git clone https://github.com/attify/firmware-analysis-toolkit.git
cd firmware-analysis-toolkit
./scripts/install.sh --install-system-deps --jobs 2
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
This installs FAT, its runtime data, and pinned binwalk-ng 4.0.0 (executable: binwalk). Existing installations follow the Binwalk migration policy. Use --jobs 1 if the build runs short of memory. Add the PATH export to your shell’s startup file to keep it in future sessions.
The installer uses Arch packages when /etc/os-release identifies Arch/Manjaro directly or an otherwise unrecognized distribution declares arch in ID_LIKE, as Omarchy does. Explicitly supported distribution IDs take precedence.
7zip is the current Arch package name; the installer’s p7zip request resolves through its compatibility alias on the tested host.
Verify the installed CLI and data:
fat --version
fat data verify
fat doctor --strict
The installer verifies ZIP and SquashFS extraction through Binwalk, plus an LZO round trip. To repeat that check from the checkout:
python3 scripts/smoke-test-extraction.py --fat "$HOME/.local/bin/fat" \
--expected-binwalk-version 'binwalk-ng 4.0.0' --format-helpers
Add the tools your workflow needs
Each group is optional; the default extraction setup above does not need all of them.
| Workflow | Arch packages or setup |
|---|---|
Binary triage and fat decompile | sudo pacman -S --needed radare2 r2ghidra |
| Ghidra headless analysis and taint normalization | sudo pacman -S --needed ghidra jdk21-openjdk, then export GHIDRA_HOME=/opt/ghidra |
| ARM and MIPS system emulation | sudo pacman -S --needed qemu-system-arm qemu-system-mips |
| User-mode emulation and debugging | sudo pacman -S --needed qemu-user gdb |
| Bootloader terminal sessions | sudo pacman -S --needed tmux |
| Python tool environments | sudo pacman -S --needed python-pip python-pipx |
| Container backends | See the Docker steps below |
| Binary taint analysis | Follow Optional angr setup |
| Joern CPG analysis | Follow the upstream installation guide; put its joern and C/C++ frontend commands on PATH |
r2ghidra supplies the radare2 decompiler plugin used by fat decompile. Installing standalone Ghidra does not install that plugin. The Ghidra package above was tested with JDK 21; follow the package’s Java requirement if a later release changes it.
For Docker, install and start the service:
sudo pacman -S --needed docker
sudo systemctl start docker
sudo docker run --rm hello-world
FAT must also be able to contact Docker as the user running FAT. Configure rootless Docker or your intended Docker access method using the upstream post-installation guide, then verify docker info without sudo. Membership in the docker group grants root-level privileges. Installing Docker or QEMU alone does not configure a FirmAE, Firmadyne, or EMUX backend; fat doctor reports missing bundles and recipes separately.
For native unblob, install the Python application and common extractors:
sudo pacman -S --needed python-pipx erofs-utils lz4 lzop zstd partclone unarchiver android-tools
pipx install unblob
pipx install jefferson
pipx install ubi-reader
unblob --show-external-dependencies
The extraction profile supplies Sasquatch, which unblob can also use. These packages still do not supply every unblob extractor. Treat missing entries in the dependency report as unavailable format support. Follow unblob’s extractor installation instructions for the remaining formats, or use its upstream Docker distribution:
docker pull ghcr.io/onekey-sec/unblob:latest
docker run --rm --network none ghcr.io/onekey-sec/unblob:latest --show-external-dependencies
The container supplied all reported extractors and recovered a test SquashFS file on the validated host. Follow the upstream container usage instructions to mount your input and output directories. This is a separate unblob invocation; it does not add those extractors to the host’s native unblob installation.
fat doctor --strict requires a usable extraction engine. It does not verify every unblob extractor, the angr Python environment, or a successful firmware boot. The synthetic extraction check above tests a real extraction operation.
Installer options
The source installer requires Rust 1.91+ and Python 3. Use --install-system-deps for a fresh installation: it installs the build dependencies and extraction utilities, including 7z, SquashFS tools, and lzop. The extraction profile builds pinned binwalk-ng and Sasquatch in the selected prefix.
./scripts/install.sh --install-system-deps
# CLI and runtime data only, with paths containing spaces:
./scripts/install.sh --profile core --prefix "$HOME/FAT tools" \
--data-dir "$HOME/FAT data"
| Option | Effect |
|---|---|
--profile core|extraction | CLI plus runtime data, optionally with Binwalk (default: extraction) |
--prefix PATH | Install under PATH (default: ~/.local); add its bin directory to your shell’s PATH |
--data-dir PATH | Store data there and link PREFIX/share/fat for automatic discovery; refuse an existing conflicting path |
--jobs N, --native | Choose build concurrency or optimize Rust binaries for this CPU |
--test | Run locked workspace tests before installation |
--dry-run | Print mutating commands without executing them or deleting temporary files |
--skip-extraction-smoke | Explicitly skip the synthetic extraction check |
No FAT_DATA_DIR export is needed for installer-managed custom data. An existing FAT_DATA_DIR environment override still takes precedence; unset it to use the installation’s data. Keep the linked custom directory in place when using FAT.
Binwalk migration
The extraction profile installs binwalk-ng 4.0.0 and Sasquatch sasquatch-v4.5.1-6. The Binwalk command remains binwalk. Rerun the installer to upgrade an existing installation and add the extraction helpers:
./scripts/install.sh --install-system-deps --prefix "$HOME/.local"
export PATH="$HOME/.local/bin:$PATH"
binwalk --version # binwalk-ng 4.0.0
Older Binwalk and Sasquatch executables in PREFIX/bin are replaced; matching managed installations are reused. Tools elsewhere on PATH are preserved. Conflicting executable symlinks are refused; use a separate prefix in that case. Keep PREFIX/bin first on PATH.
Sasquatch is built from a checksum-verified source release, including sasquatch-v4be for big-endian SquashFS v4. lzop is installed through the system package manager with --install-system-deps; without that option, it must already be available. The installer verifies ZIP and SquashFS extraction through Binwalk and an LZO compression/decompression round trip.
Automatic extraction still tries FAT’s native engine first. Other specialized Binwalk formats may need additional tools from the upstream dependency guide.
External tools
FAT orchestrates external tools. Install only those needed for your workflow; fat doctor reports what it finds. For binwalk and unblob, strict mode requires a bounded version probe to succeed, not merely a matching executable name.
| Tool | Needed for | Typical installation |
|---|---|---|
| binwalk | Firmware extraction | ./scripts/install.sh --profile extraction installs pinned binwalk-ng 4.0.0 |
| unblob | Alternative extraction | pipx install unblob, plus its external extractors |
| debugfs | ext filesystem extraction and ext2 repair | brew install e2fsprogs or apt install e2fsprogs |
| radare2 | Binary triage and symbol resolution | brew install radare2 or apt install radare2 |
| r2ghidra | fat decompile | Install the radare2 plugin; Arch: pacman -S radare2 r2ghidra |
| Ghidra | Headless analysis and taint normalization | Install from ghidra-sre.org and set GHIDRA_HOME |
| Joern | CPG proof stage | Install from joern.io |
| QEMU | System-mode emulation | brew install qemu or apt install qemu-system |
| Docker | Containerized emulation backends | Follow the Docker installation guide |
| GDB | Debugger integration | gdb or gdb-multiarch, with support for the target architecture |
| tmux | Bootloader emulation sessions | pacman -S tmux, apt install tmux, or brew install tmux |
| Python 3 | Discovery runners | apt install python3 |
| Python 3.10+ and angr | Optional binary taint engine | Isolated environment in Optional angr setup |
Optional angr setup
Python alone does not install angr. Following the upstream installation guidance, create an isolated environment with Python 3.10 or newer:
python3 -m venv "$HOME/.local/share/fat-angr-venv"
"$HOME/.local/share/fat-angr-venv/bin/python" -m pip install angr pyyaml
export FAT_PYTHON="$HOME/.local/share/fat-angr-venv/bin/python"
"$FAT_PYTHON" -c 'import angr, yaml; print(angr.__version__)'
Keep FAT_PYTHON set in shells running FAT. On Debian/Ubuntu, install python3-venv if environment creation is unavailable. fat doctor --strict checks extraction-engine readiness; it does not validate the optional angr environment. The import command above checks that environment without running firmware analysis.
For angr releases that provide the optional Unicorn extra, install it in the same environment if you need native execution acceleration:
"$FAT_PYTHON" -m pip install 'angr[unicorn]'
This resolved the optional Unicorn loading warning with angr 10.0.0 on the tested Omarchy host. Normal SSH login shells and non-interactive SSH commands can load different startup files; export FAT_PYTHON explicitly in scripts or one-shot SSH commands instead of assuming an interactive shell configuration was loaded.
macOS ext2 builder image
FAT_EXT2_BUILDER_IMAGE may point to an operator-provided image pinned by digest. FAT does not pull that image or install packages at runtime. The builder disables networking, mounts firmware source read-only, enables no-new-privileges, and uses five narrow capabilities.
Runtime Data
FAT keeps architecture-independent profiles, schemas, and helper resources in a versioned data tree. Release bundles place it at share/fat beside the executable prefix.
Cargo and cargo binstall installations place only the executable, so they install the data explicitly:
fat data install --release
fat data status
fat data verify
fat data list
--release fetches fat-data-<version>.zip and its .sha256 from the GitHub release for the running executable, verifies the digest and every manifest entry, and activates the version.
--archive <path> installs a local data directory or ZIP instead, for offline or pinned setups.
fat data status reports which origin supplied the active tree: an explicit path, FAT_DATA_DIR (environment), executable-relative bundled share/fat, the managed user root, or a marked development checkout. FAT_DATA_DIR may point directly at an unversioned reviewed data tree.
The managed user-data root instead uses active.json; FAT verifies that referenced version and its manifest before it is considered ready.
An empty managed root with no active record is reported as missing.
A present malformed active record, or one that points to missing, incompatible, or unverifiable data, is reported as structured broken status (including origin/path fields in JSON), never as ready.
Release maintainers build the downloadable ZIP from the reviewed source files:
python3 scripts/build-runtime-data-bundle.py --check
release_version="$(awk -F'\"' '/^version = / { print $2; exit }' Cargo.toml)"
python3 scripts/build-runtime-data-bundle.py \
--output "dist/fat-data-$release_version.zip"
The bundle contains example bootloader profiles, kernel metadata and configuration files, Android runtime helpers, setup READMEs, and license notices. Its manifest pins every file by SHA-256 and declares compatibility with the accompanying FAT version. Linux kernels, U-Boot images, the kernel builder image, APKs, and Android instrumentation runners are separate prerequisites.
The packaged READMEs explain each group’s purpose and setup:
profiles/bootloader/README.md: adapting example environment and QEMU values; the templates do not establish support for specific products.profiles/kernels/README.md: kernel selection and build resources, including how to build and check a candidate local builder from a source checkout.scripts/discovery/android/README.md: Python, ADB, device, APK, and instrumentation-runner prerequisites and execution effects.
The kernel builder record’s localhost/... reference names a local image, not a download. The exact pinned image must be present before the offline kernel build can run. Container rebuilds require a digest comparison; a clean source checkout by itself does not supply a verified builder.
Download the data ZIP for your executable version from FAT Releases.
Asset URLs use this pattern, with VERSION replaced by the release version:
https://github.com/attify/firmware-analysis-toolkit/releases/download/vVERSION/fat-data-VERSION.zip
https://github.com/attify/firmware-analysis-toolkit/releases/download/vVERSION/fat-data-VERSION.zip.sha256
fat data install --release verifies the adjacent .sha256 asset before installing; when installing an archive by hand, verify it first. Installation preflights the ZIP and rejects oversized archives or central directories, path traversal, symlinks, duplicate or undeclared payloads, more than 1,024 entries, manifests over 1 MiB, and expanded output over 32 MiB. Streamed bytes are bounded independently of declared sizes, and no partially verified version is activated.
Resolution order is: command-level path, FAT_DATA_DIR, executable-relative <exe_dir>/share/fat, executable-relative <exe_dir>/../share/fat, platform user data, then a marked development checkout (debug builds only).
Within a managed root, a verified active version takes precedence over stale direct files.
Normal commands do not access the network. SHA-256 verification detects file changes but does not by itself authenticate a publisher; release signing is a separate launch gate.
First contact with an unknown image
Start read-only. identify classifies evidence in a file or directory without executing it and recommends the next command.
fat ./firmware.bin
fat identify --file ./firmware.bin --details
fat identify --file ./firmware.bin --json > identify.json
fat ./firmware.bin is shorthand for fat identify --file ./firmware.bin. --details expands the same evidence into supporting tables; it does not change the analysis. --json emits identify-report/v1 with the full findings and diagnostics.
Read the overview
The default report is deliberately short: matched identity, image measurements, and useful structure. Empty sections and absent features are omitted. In particular:
- Container or filesystem signatures point to extraction. ZIP, TAR, gzip, SquashFS, CramFS, and JFFS2 are recognized natively.
- Vector-table candidates point to a raw MCU image. Family strings corroborate a mapping only when the SRAM and executable ranges are compatible.
- ESP-IDF partition tables are reported with file offsets kept separate from partition flash addresses.
- BMC markers, FIT metadata, and U-Boot environments are independent evidence classes; none proves boot policy by itself.
- High-entropy or repeated regions are measurements. Repetition alone does not establish encryption.
Unresolved mappings and rejected candidates remain in JSON diagnostics. Do not treat an empty overview as proof that a feature is absent.
Choose the next command
| What you have | Command |
|---|---|
| A full flash dump or update image | fat inspect headers --file firmware.bin and fat inspect layout --file firmware.bin |
| A raw Cortex-M image | fat inspect mcu --file firmware.bin --details |
| A BMC SPI flash image | fat inspect bmc --file flash.mtd --details |
| A filesystem or container | fat new firmware.bin && fat extract .fat-projects/firmware |
| An update envelope plus an extracted rootfs | fat inspect update --file firmware.bin --rootfs ./rootfs |
| Two versions of an image | fat diff firmware --help or fat inspect update --reference older.bin ... |
For raw MCU images, --base and --family override inference when you have external evidence:
fat inspect mcu --file firmware.bin --base 0x08000000 --family STM32H7 --details
Inspect structure before carving
inspect headers and inspect layout expose format-level evidence without publishing a filesystem:
fat inspect headers --file firmware.bin --json
fat inspect layout --file firmware.bin --json
For ESP-IDF images, the scan finds plaintext partition tables at arbitrary offsets, validates entry framing and optional MD5, and accepts legacy tables. Partition offsets are flash addresses, not automatically file offsets. FAT does not infer the dump’s flash base or claim that referenced payloads are present. See ESP-IDF partition tables.
Preserve the input identity
BMC and MCU inspection reports record the actual input size and SHA-256. Keep that identity with your notes and extracted artifacts. When you move to a project, fat new records the source fingerprint so later sessions, findings, and runtime observations stay attached to the same image.
Next: Extracting firmware.
Extracting firmware
Extraction turns a firmware image into published files plus a manifest that explains every recognized branch. FAT’s native pipeline is deterministic and does not execute recovered programs.
Projects first
fat new ./firmware.bin
fat extract .fat-projects/firmware
A project records the source identity and owns extraction, analysis, sessions, and runtime state. Use --name to override the derived slug and --projects-dir to place the project elsewhere.
Use case-sensitive storage when firmware contains names such as libip6t_HL.so and libip6t_hl.so. On macOS, create a case-sensitive APFS volume or disk image:
fat new ./firmware.bin --projects-dir /Volumes/FAT/projects
fat extract /Volumes/FAT/projects/firmware
Choose an engine
fat extract .fat-projects/firmware --extractor auto --json > extraction.json
fat extract .fat-projects/firmware --extractor native
fat extract .fat-projects/firmware --extractor all
| Engine | Behavior |
|---|---|
auto (default) | Native first, with external fallback when native recovery is incomplete |
native | Built-in decoders only; never invokes external fallback |
binwalk | External binwalk-ng only |
unblob | External unblob only |
all | Runs every engine without skipping |
--force reruns extraction and overwrites existing artifacts. --extract-timeout SECS bounds a stalled external engine; 0 disables the timeout. The default is FAT_EXTRACT_TIMEOUT or 1800 seconds.
Read the manifest, not just the directory
The extraction manifest is work/extraction-manifest.json. Its important fields are:
recovery_status:rootfs_recovered,files_only, orpartial;artifacts: per-artifact lineage, decoder, output path, counts, timing, and failure reason;kernel_paths: kernel candidates, which are not inferred from directory names.
work/native-artifacts.json preserves native outcomes when the command cannot produce a final manifest. A successful exit and a directory full of files do not establish complete rootfs recovery; inspect unresolved branches in artifacts.
Gzip members are published under artifact-ID/format directories such as work/extractions/native/0004-gzip. The directory name identifies the artifact and compression format, not a kernel role.
Native format support
| Format | Support |
|---|---|
| ZIP, TAR, gzip | Recursive container extraction |
| SquashFS 2/3/4 | Both byte orders; zlib, LZMA, and XZ codecs |
| CramFS | Bounded native decoder |
| JFFS2 | CRC-validated nodes, inode versions, dirent deletions, both byte orders |
| JFFS2 fragments | Uncompressed, copy, zero-filled, and zlib |
Unsupported codecs, incomplete files, and exceeded limits remain explicit unresolved outcomes. SquashFS special device entries are counted and omitted; ownership, timestamps, and xattrs are not restored. TAR hard links and sparse entries are unsupported.
JFFS2 discovery joins nodes across erased gaps of at most 64 KiB. It does not infer partition boundaries, ECC/OOB layouts, or missing fragments. Filenames and symlink targets currently require UTF-8.
Limits
Default native limits are:
| Resource | Limit |
|---|---|
| Input | 512 MiB |
| Single output file | 256 MiB |
| Cumulative output, including symlink targets | 1 GiB |
| Output entries | 262,144 |
| Artifacts | 4,096 |
| Container depth | 8 |
| Path components | 64 |
| Shared metadata/fragment cache | 16 MiB |
Carve a known region
When you already know the offset and size, skip full extraction:
fat carve --file firmware.bin --offset 0x200000 --size 0x100000 --output part.bin
fat carve --file firmware.bin --offset 0x200000 --format squashfs --output fs.sqsh
fat extract-payload --file firmware.bin --offset 0x40 --format gzip
carve extracts a byte range or a format-sized object; extract-payload extracts a payload fragment at a known offset. Both accept --project to resolve the primary firmware image from a project.
Next: Filesystem analysis.
Filesystem analysis
After extraction, work from the recovered rootfs. FAT’s filesystem commands share one evidence model, so an inventory hit, a startup entry, and a trust-path label can be followed into binary and runtime analysis.
Set a shell variable to keep examples readable:
rootfs=.fat-projects/firmware/extracted
Inventory
fat ls --rootfs "$rootfs" --profile inventory --json
fat tree --rootfs "$rootfs" --profile inventory --summary
fat graph export --rootfs "$rootfs" --profile inventory --format json > inventory.json
inventory is the neutral graph profile: directories, files, kinds, SHA-256 hashes, and rabin2 import/export edges. It adds no research-specific labels. Use it as the baseline before applying a lens such as update-authority.
Strings and cross-references
fat search --rootfs "$rootfs" --profile credentials -I --context 2
fat search --rootfs "$rootfs" --profile urls --json
fat search --rootfs "$rootfs" --all-files --profile sinks
fat xref-search --rootfs "$rootfs" --help
By default search inspects ELF binaries under discovered filesystem candidates. Add --all-files for scripts and configuration, -I for case-insensitive matching, and --context N for nearby strings. Built-in profiles include credentials, urls, crypto, sinks, and debug. JSON uses search-report/v2.
xref-search resolves pointer or code references to the strings you found, which is usually the fastest route from a credential or URL to the binary that uses it.
Startup intent
fat startup-map --rootfs "$rootfs" --profile cloud-tls
fat startup-map --rootfs "$rootfs" --json
startup-map resolves init scripts, service definitions, and startup metadata to concrete binaries, then attaches profile evidence such as strings, imports, and linked libraries. Use it to choose the next target. Startup intent does not prove runtime reachability or exploitability.
Trust paths and update authority
fat trust-map --rootfs "$rootfs"
fat trust-boundary --rootfs "$rootfs"
fat graph export --rootfs "$rootfs" --profile update-authority --output update-graph.json
fat labels explain --rootfs "$rootfs" --profile update-authority --path /sbin/updater --json
update-authority is an optional lens that adds label assignments, rollups, update/decrypt path evidence, bounded assessments, negative evidence, and symbol metadata. Names such as UpdateCandidate and AuthorityVerdict are compatibility schema names for evidence groups, not final judgments.
Crypto material
fat crypto-census --rootfs "$rootfs"
fat crypto --file "$rootfs/usr/sbin/httpd" --json
fat crypto-extract --file "$rootfs/usr/sbin/httpd" --json
crypto-census finds reused artifacts across the filesystem and shows whether they appear on a governing update path. crypto-extract reports embedded keys, certificates, and blobs with offsets, confidence, validation state, and trust-path context. A valid key length or PEM header says something about bytes; confirm runtime use through disassembly or instrumentation.
Edge AI and Android
fat edge-ai scan --rootfs "$rootfs"
fat edge-ai scan --rootfs "$rootfs" --format magik,tflite --json
fat android inventory --apk app.apk
fat android discover --apk app.apk --json
See Edge AI and Android artifacts for formats and interpretation.
From filesystem evidence to runtime
The usual chain is:
searchorstartup-mapidentifies a binary and a reason to inspect it.r2-triage,sink-discovery, andtaintestablish candidate data flow.preflightandemulatetest the runtime hypothesis.instrument-hooks,trace-ingest, andprobe evaluatecompare runtime events with the static chain.
Each step retains its own evidence boundary; a runtime observation does not retroactively prove the static model.
Binary triage and decompilation
FAT’s binary workflow ranks audit targets, finds sinks and dispatch tables, decompiles selected functions, and feeds addresses into taint and runtime instrumentation.
Triage first
fat r2-triage --file ./usr/sbin/httpd --json
fat r2-triage --file ./usr/sbin/httpd --full
r2-triage profiles an ELF with radare2 and ranks functions by cyclomatic complexity and security-relevant signals. For raw blobs, supply the mapping:
fat r2-triage --file STM32.bin --arch cortex-m --base 0x08000000 --json
Sinks and handlers
fat sink-discovery --file ./usr/sbin/httpd --json > sinks.json
fat handler-table --file ./usr/sbin/httpd --json > handlers.json
fat identify-launcher --file ./usr/sbin/httpd --json
fat inspect-handoff --file ./usr/sbin/httpd --json
sink-discovery matches imports and symbols against sink profiles (command execution, config reads/writes, input sources, string overflow), resolves PLT stubs, and handles MIPS imp. symbols. Use --rootfs with a shell-target profile for scripts. handler-table finds URL or command dispatch tables. identify-launcher and inspect-handoff detect thin launchers and point at the downstream artifact that implements the behavior.
ELF symbols
fat inspect symbols --file ./usr/sbin/httpd --sort size --reverse
fat inspect symbols --file ./usr/sbin/httpd --in-flash --json
fat inspect symbols --file ./usr/sbin/httpd --names-file names.txt --preview 16 --demangle
fat inspect symbols --file ./old/httpd --file ./new/httpd --diff --json
inspect symbols reads .symtab/.dynsym by st_shndx, not by virtual-address guesses. It supports exact-name, substring, and regex selection; size/type/region filters; table, CSV, and JSON output; bounded byte previews; demangling; and two-file diffs. --in-flash includes read-only and executable sections. JSON uses elf-symbols/v2; diffs use elf-symbol-diff/v1.
Decompile one function
fat decompile --file ./usr/sbin/httpd --function 0x440b3c
fat decompile --file ./usr/sbin/httpd --function 0x440b3c \
--script names.r2 --output ./decompiled/ --json
decompile runs r2/r2ghidra on one function. --script files are applied after analysis and before pdg, so afn, afvn, and CC commands change the emitted pseudocode. Scripts are repeatable and remain the reviewable source of truth for names. Keep them next to the binary.
For raw firmware, add --arch, --base, and optionally --family:
fat decompile --file STM32.bin --function 0x080002ac \
--arch cortex-m --base 0x08000000
Stripped-binary workflow
fat r2-triage --file ./usr/sbin/httpd --json
fat sink-discovery --file ./usr/sbin/httpd --json > sinks.json
fat handler-table --file ./usr/sbin/httpd --json > handlers.json
fat taint --file ./usr/sbin/httpd --sink-candidates sinks.json --json > taint.json
fat instrument-hooks --from-sinks sinks.json --output hooks.yaml
fat emulate --project .fat-projects/firmware --instrument hooks.yaml
instrument-hooks turns sink or taint addresses into a QEMU hook configuration. After the run, trace-ingest normalizes the hook JSONL and probe evaluate checks whether a marker propagated through the static chain.
Next: Taint analysis.
Taint analysis
FAT traces source-to-sink flow in ELF binaries and shell scripts. The output is a set of findings with provenance, not a proof of exploitability.
Binary taint
fat taint --file ./www/cgi-bin/diag.cgi --summary
fat taint --file ./www/cgi-bin/diag.cgi --json > taint.json
fat taint --file ./usr/sbin/httpd --sink-candidates sinks.json --json > taint.json
fat taint-query --file ./www/cgi-bin/diag.cgi
taint uses the core source/sink models and any operator-supplied profile. taint-query asks a narrower path question against the same analysis. --sink-candidates consumes the output of sink-discovery, which is the usual route for stripped binaries.
Cross-binary state
fat taint-cross --rootfs ./rootfs
fat taint-cross --rootfs ./rootfs \
--source-profile ./my-target-models.yaml \
--state-profile ./my-target-state.yaml
taint-cross stitches flows through shared state. It ships no catalog of which function reads or writes a device’s configuration API:
--source-profilesupplies binary source/sink models, merged with the core models.--state-profilemaps read, write, and flush names into shared-state families.
Without --state-profile, taint-cross assigns no read/write roles and emits no cross-binary findings; JSON is []. A state profile alone does not teach the binary analyzer how an unfamiliar function carries data. Both flags take file paths, and an invalid selected file is an error.
--json and --as-taint-json preserve identity in model_provenance and state_model_provenance. External identities include the declared name, selected path, and SHA-256 of the loaded file.
Shell taint
fat taint --lang shell --file ./app/init/wifi.sh --summary
fat taint --lang shell --rootfs ./extracted-rootfs --json
fat taint --lang shell --rootfs ./extracted-rootfs \
--source-profile ./my-target-shell.yaml --severity high
Shell analysis parses scripts with tree-sitter-bash and walks assignments forward, so a chain such as $(cat /configs/...) → $var → sed -i "s/.../$var/g" is reported as one flow. Findings serialize to the same TaintFinding JSON as binary taint.
The always-loaded shell profile contains only constructs that hold for any POSIX script: positional parameters, read, cat/head/tail, RFC 3875 CGI variables, and documented uci get, fw_printenv, and getprop reads. It asserts nothing about a device’s filesystem. A read of /configs/... is Secondary on the strength of the read alone.
Use --source-profile to declare target-specific sources. A path-prefix source declares a mount attacker-writable, promotes reads under it to Primary, and makes the finding cite the mount by name.
Shell taint is deliberately unsound: shell is too dynamic to prove reachability. Every finding is a Candidate at WEAK strength, and only flows with a named source are reported. For sink hits without provenance, use fat sink-discovery --rootfs.
Interpret findings
model_provenanceandstate_model_provenancetell you exactly which models produced a result.- A named source is evidence of an input path, not proof that an attacker controls it.
- A sink candidate is a place to look, not a vulnerability verdict.
- Runtime confirmation is a separate step: Binary triage shows how to turn findings into hooks and compare traces.
MCU and bare-metal images
FAT analyzes raw Cortex-M and other bare-metal images without assuming a load address or a vendor SDK. Identification, vector evidence, family evidence, and code mapping are independent, so an unresolved mapping stays visible instead of being guessed away.
Identify and inspect
fat identify --file firmware.bin
fat inspect mcu --file firmware.bin
fat inspect mcu --file firmware.bin --details
fat inspect mcu --file firmware.bin --json > mcu.json
identify gives a short identity/image overview. inspect mcu groups evidence into image mapping, startup, interrupts, and hardware. --details expands the same groups with reference tables; JSON is unchanged by presentation flags.
Override inference only when you have external evidence:
fat inspect mcu --file firmware.bin --base 0x08000000 --family STM32H7 --details
Image mapping
ImageLayoutReport.vector_address maps the selected vector table’s file offset to memory. Exact whole-image periods and uniform regions are reported as measurements; repetition is not attributed to encryption.
A family pack can corroborate compatible SRAM and executable ranges, but family-pack strings alone do not establish identity. Rejected candidates and unresolved mappings remain in JSON.
Startup and interrupts
Fast and detailed inspection share mcu::scan_vector_table. Counts describe populated pointers, not enabled IRQs or default-handler roles. Core exceptions, external IRQs, reserved slots, and unpopulated slots are distinguished; a shared target does not imply an interrupt-driven execution model.
The startup section reports the initial stack pointer, reset handler, and populated vectors with their file offsets and mapped addresses.
Code evidence
mcu_code follows supported Thumb control flow from mapped vector seeds with explicit budgets. It reports:
- candidate functions;
- literal and string references;
- local constant-derived accesses.
mcu_registers attaches declarative family-pack register names to that evidence. Literal address references remain separate from actual reads/writes. Unknown profiles retain raw addresses; register aliases and part conditions stay unresolved unless supported.
Hardware surfaces
fat inspect peripheral-map --file firmware.bin --json
fat inspect isr-state --file firmware.bin --json
fat inspect svd-rank --help
peripheral-map reports family-backed peripheral and register surfaces. isr-state reports interrupt-boundary shared-state candidates. svd-rank ranks SVD-derived register surfaces when you supply the appropriate inputs.
What this does not prove
- A vector table does not prove that the image boots on a particular board.
- A register name does not prove a peripheral exists or is used at runtime.
- A literal MMIO address is not an observed access until supported control flow reaches it.
- Static code mapping does not establish timing, interrupt enablement, or hardware behavior.
For raw-binary decompilation, pass the same mapping to r2-triage or decompile:
fat r2-triage --file firmware.bin --arch cortex-m --base 0x08000000 --json
fat decompile --file firmware.bin --function 0x080002ac --arch cortex-m --base 0x08000000
ESP-IDF partition tables
identify and inspect headers discover plaintext ESP-IDF partition tables in flash dumps, merged images, and standalone table binaries. No ESP-IDF installation or Python script is needed.
fat identify firmware.bin
fat inspect headers --file firmware.bin
fat inspect headers --file firmware.bin --json
fat inspect layout --file firmware.bin
What the scan validates
The scan finds tables at arbitrary file offsets and checks:
- entry framing and alignment;
- ranges and non-overlap;
- unique labels;
- MD5 when present.
Legacy tables without MD5 are accepted. Reports retain numeric types, subtypes, and all flag bits, including unrecognized values. JSON includes rejected-candidate diagnostics. inspect layout locates the table bytes themselves.
Offsets are flash addresses
Partition offsets are flash addresses. They are not automatically offsets in the input file: a cropped dump or standalone table may have a different origin. FAT does not infer the flash base, claim that referenced payloads are present, or decode NVS values.
Encrypted tables need decrypted input. Application-only images may contain no table.
The format follows Espressif’s partition-table documentation.
Edge AI and Android artifacts
Edge AI models
fat edge-ai scan discovers four model families and reports library filename hints:
| Format | Evidence collected |
|---|---|
| MAGIK/JZDL | MAGIK headers, input shapes, layer counts, and variants |
| TFLite | FlatBuffer files, embedded arrays, and ELF data |
| ONNX | ModelProto files |
| Qualcomm DLC | DLC candidates and metadata strings |
fat edge-ai scan --rootfs ./rootfs
fat edge-ai scan --rootfs ./rootfs --format magik,tflite --json
fat edge-ai scan --rootfs ./rootfs --format dlc --json > edge-ai-report.json
JSON uses schema_version: edge-ai-scan/v1 and stores format-specific details under findings[].metadata.
Library filename hints require the four-byte ELF magic and use artifact_kind: filename-match, matched_pattern, and evidence. They do not establish a runtime identity or model format; their metadata omits runtime and format. A model artifact does not prove that the model executes.
Android packages
fat android analyzes APK structure and, when given a semantic bundle or JADX tree, discovery leads and capability chains.
fat android inventory --apk app.apk
fat android inventory --apk app.apk --splits split-config.arm64_v8a.apk --json
fat android discover --apk app.apk --json
fat android locality --apk app.apk --json
fat android explain --semantic-bundle app.semantic.json
inventory reports manifest surface and split metadata. discover emits family-scoped leads; --jadx-root can synthesize a semantic bundle from a JADX decompiled tree, and --semantic-bundle-out saves it. locality classifies app and bundled logic. explain summarizes a semantic bundle.
Query capability chains between an entry and a sink:
fat android chains --apk app.apk --semantic-bundle app.semantic.json \
--entry bluetooth --sink main.lua --json
Chains prefer strong semantic edges such as runtime role clusters, explicit control surfaces, and narrow subsystems. Broad runtime overlap alone is not enough: informational endpoints and weak runtime-only connections are rejected as no-path.
Android runtime helpers live in the runtime-data bundle. See Runtime data for installation and prerequisites.
Emulation and rehosting
Emulation executes untrusted vendor code. Review Security first, use a disposable lab, and do not expose an emulated service to a network you do not control.
Preflight
fat preflight .fat-projects/firmware
fat preflight --signal arch:mips --signal web:cgi --json
preflight ranks emulator backends and reports host readiness from project signals or manual --signal values. It does not start firmware.
Start, inspect, stop
fat emulate --project .fat-projects/firmware
fat emulate --project .fat-projects/firmware --status
fat emulate --project .fat-projects/firmware --stop
emulate starts the selected runtime, records the session and run, and reports allocated endpoints. --status refreshes the current runtime state; --stop terminates the owned process. Stopped or failed runs retain historical observations but do not advertise current attachable surfaces.
Rehosting packs
A rehosting pack is YAML containing device-specific knowledge: the QEMU machine, init repairs, paths to materialize, network mode, and readiness validators.
fat rehost profiles validate ./my-packs/example-camera.yaml
fat rehost match .fat-projects/firmware --packs-dir ./my-packs
fat emulate --project .fat-projects/firmware --pack example/camera
fat emulate --project .fat-projects/firmware --experimental-rehosting
Local packs are discovered from --packs-dir arguments in order, then directories in the colon-separated FAT_REHOSTING_PACKS. With neither source, no local pack is discovered. Unsupported partition roles and init repairs fail closed in the pack capability report; network declarations remain degraded when the backend cannot prove fidelity.
FAT also embeds explicit, hash-pinned BMC profiles. They require --pack <id> and are listed by fat rehost profiles list. See Emulating BMC firmware.
Debug and observe
fat debug surfaces --project .fat-projects/firmware --json
fat debug shell --project .fat-projects/firmware
fat debug monitor --project .fat-projects/firmware --command 'info status'
fat debug gdb --project .fat-projects/firmware --command 'info registers'
fat observe --help
debug surfaces lists current attachable endpoints. debug shell attaches to the serial console; it does not supply credentials. debug monitor speaks to the QEMU monitor. debug gdb connects to the whole-system QEMU stub. observe inspects runtime processes, services, networking, shells, maps, and monitors.
BMC-specific userspace debugging is covered in BMC session and process debugging.
Instrumentation and traces
fat instrument-hooks --file ./usr/sbin/httpd --output hooks.yaml
fat emulate --project .fat-projects/firmware --instrument hooks.yaml
fat trace-ingest --project .fat-projects/firmware --trace hooks.jsonl --json
fat probe evaluate --taint taint.json --trace hooks.jsonl --marker FAT_MARKER
instrument-hooks builds a QEMU hook configuration from a binary, sink report, or taint findings. trace-ingest normalizes hook JSONL into a runtime capture artifact. probe evaluate compares the trace with static taint findings; it does not start emulation or inject traffic.
Fidelity boundaries
An emulation validator proves only what that validator checked during that run on that backend. A booted userspace does not establish physical sensor fidelity, secure boot, update-signature enforcement, or hardware behavior. Keep the source image hash, profile, adaptations, and observations together when comparing runs.
Source invariants and patch verification
FAT can query security invariants against source repositories, derive patch guidance, search for nearby variants, and attach runtime confirmation to a derived finding.
Invariant query
fat invariant query \
--fixture tests/fixtures/query/source/invariant-permission \
--rule 'Every privileged override method must call enforcePermission()'
--fixture points at a source tree. --rule states the invariant in natural language. Use this to check a property across a codebase rather than grepping for one spelling of it.
Patch guidance and variant search
fat patch check --help
patch check derives patch guidance from a fix and searches for nearby variants that may need the same treatment. It is the bridge from “this bug was fixed here” to “where else does this pattern live?”
Chain query
fat chain query --help
chain query assembles multi-step propagation paths from evidence already in the project: source, transforms, state, and sink. Use it after binary or cross-binary taint has produced the underlying findings.
Runtime confirmation
fat verify --help
verify attaches runtime confirmation to a derived finding. It records what was checked; it does not turn a static candidate into a universal proof.
Signature relation
fat signature-fit --help
signature-fit tests whether a byte window fits a public-key signature relation with a supplied key. It is separate from FIT metadata inspection: inspect bmc reports stored signature nodes, while signature-fit tests a specific byte/key relationship.
CI and automation
FAT commands are designed to be scripted: human progress goes to stderr where documented, machine-readable reports go to stdout, and exit status is explicit.
JSON first
Most analysis commands accept --json. Prefer the structured model over parsing terminal text:
fat identify --file firmware.bin --json > identify.json
fat inspect bmc --file flash.mtd --json > bmc.json
fat extract .fat-projects/firmware --json > extraction.json
fat inspect symbols --file ./usr/sbin/httpd --json > symbols.json
Schema versions are part of the CLI contract. See JSON schemas before pinning a parser to a field.
SARIF and exit gates
inspect bmc emits SARIF 2.1.0 with stable rule IDs, descriptions, input SHA-256, and binary byte locations:
fat inspect bmc --file flash.mtd --sarif > findings.sarif
fat inspect bmc --file flash.mtd --sarif --fail-on-warning > findings.sarif
Default inspection exits successfully when analysis completes. --fail-on-warning emits the full report and then exits nonzero when any warning/error finding exists. Invalid arguments, input I/O failures, and fatal analysis errors also exit nonzero. Malformed FDT candidates remain diagnostics in a successfully completed inspection.
Example GitHub Actions steps:
- name: Inspect BMC flash
run: fat inspect bmc --file flash.mtd --sarif --fail-on-warning > findings.sarif
- name: Upload SARIF
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: findings.sarif
Metadata observations are not automatically vulnerability verdicts; choose your CI policy explicitly.
External campaign replays
fat experiment external records bounded work performed by an external engine such as AFL++ or Fuzzware. It does not add a fuzzing engine or claim device fidelity.
fat experiment external validate \
--file external-campaign.json \
--root /path/to/campaign \
--json
fat experiment external run \
--project /path/to/fat-project \
--file external-campaign.json \
--root /path/to/campaign \
--case minimized-crash \
--json
An external-campaign/v1 manifest pins the engine, setup artifacts, evidence, one exact input and argv per case, accepted exit codes, and an idempotent cleanup command. FAT substitutes the verified input path and launches argv directly, without a shell. The run creates a session and replay run containing the input, manifest, logs, result, and cleanup outcome.
A replay succeeds only when its exit code is declared and cleanup passes. See External campaign evidence for the full contract.
Practical rules
- Keep firmware, keys, and private fixtures outside Git.
- Pin the FAT version and runtime-data version in CI; runtime data declares compatibility with the executable version.
- Use
fat doctor --strictto gate a runner on core prerequisites, andfat data verifyto check the active data tree. - Normal commands do not access the network.
fat data install --releaseis the explicit network path. --detailschanges presentation only. Never use it to infer a different analysis result.
Inspecting BMC firmware
fat inspect bmc inspects a raw flash image without executing firmware or contacting a controller. It combines FAT’s native layout analysis with FIT authentication metadata, located platform strings, and CRC-validated U-Boot environments.
BMC inspection and native JFFS2 recovery were added after v2.0.1. If you have that release installed, build master using the source-build instructions.
fat inspect bmc --file flash.mtd
fat inspect bmc --file flash.mtd --details
fat inspect bmc --file flash.mtd --json > inspection.json
fat inspect bmc --file flash.mtd --sarif > findings.sarif
fat inspect bmc --file flash.mtd --sarif --fail-on-warning > findings.sarif
JSON uses bmc-inspection/v1. Shared FIT evidence and parser diagnostics also appear in fat inspect headers --file flash.mtd --json. Every report records the actual input size and SHA256. --details only expands text presentation; it does not change analysis, JSON, or SARIF. Inputs are limited to 512 MiB.
FIT metadata
The report shows FIT offsets, default configuration, component hashes, image and configuration signature nodes, configuration image references, and any /signature key metadata in embedded device trees. The declared default configuration is not an observation of the device’s selected boot path.
BOOT-FIT-HASH-ONLY: a completely interpreted FIT contains hashes for all image nodes and has no image or configuration signature nodes. This describes the FIT metadata; it does not describe an outer signed package or a controller’s boot policy.BOOT-FIT-SIGNATURE-METADATA: signature nodes exist. Their presence does not establish cryptographic validity or enforcement.- Control-FDT
requiredproperties are displayed as stored key policy. The report does not prove that the running bootloader uses that device tree.
Configuration signatures are considered alongside image signatures: an image with hashes can be authenticated through a signed configuration. The parser handles both hash@1/signature@1 and hash-1/signature-1 names. Malformed metadata and analysis budgets are recorded as diagnostics; incomplete blobs cannot generate hash-only findings.
The existing fat signature-fit command tests an RSA-PSS/SHA256 byte relationship with a supplied key. It is a separate operation from FIT metadata inspection.
Stored environments
Automatic discovery checks 4 KiB-aligned offsets within the first 64 MiB for total region sizes of 4, 8, 16, 32, 64, 128 and 256 KiB. Both ordinary and redundant headers and both CRC byte orders are checked. The CRC covers the full data area, excluding the CRC and optional redundant-copy flag. The JSON records search bounds and any truncation.
For a known region, provide its offset and total stored size, including the header. Decimal and hexadecimal values are accepted; explicit regions may be unaligned and up to 1 MiB.
fat inspect bmc --file flash.mtd --env-offset 0x60000 --env-size 0x20000 --details
Recovered variables retain byte offsets, region size, CRC validity and redundant-copy flags. Flags are not used to select the active copy. A supplied region that has no valid environment is reported in JSON diagnostics. Invalid or out-of-bounds arguments fail the command.
Raw strings versus validated environments
fat analyze <project> records assignments found in firmware strings under raw_env_hints in analysis/bootloader.json. fat bootloader inspect <project> labels them raw bootloader assignment hints (CRC not checked). Strings such as bootcmd=bootfmh, verify=yes, or sig_check=%s can be defaults or diagnostic templates. They do not generate boot-policy findings or supply environment values to emulation.
fat inspect bmc --file <firmware> --json separately reports CRC-validated regions in environment_scan.environments, with offsets, sizes, stored CRCs, and redundancy flags. An empty result means no valid region was found within the reported search bounds. CRC validity does not establish which copy is active or what hardware enforces.
Existing snapshots still load. Their env_variables remain available for imported emulation settings; the inspector labels these as imported/legacy values with CRC not checked. Rerun fat analyze to replace an older raw-string-derived snapshot with the separated hint model.
Platform and trust markers
OpenBMC/MegaRAC strings and ASPEED compatible strings are independently located evidence. Generic fwmap, sig_table, and AdaptiveModules markers do not establish a vulnerable parser, a reachable update path, or a specific CVE. Raw-string matches are labeled as markers, including their offsets.
PEM headers are also markers: a private-key header generates a qualified warning; public-key and certificate headers are informational. The scanner does not validate a complete key from a header alone or scan inside compressed data. Use FAT extraction and rootfs analysis for embedded files.
CI output
SARIF 2.1.0 includes stable rule IDs, rule descriptions, the input SHA256, and binary byte locations. Default inspection exits successfully when analysis completes. --fail-on-warning emits the full report and then exits nonzero when any warning/error finding exists. Invalid arguments, input I/O failures, and fatal analysis errors also exit nonzero. Malformed FDT candidates remain diagnostics in a successfully completed inspection. CI policy is explicit: metadata observations are not automatically vulnerability verdicts.
Extracting filesystems
Inspection reads the raw image; it does not extract its filesystems. Create a project on case-sensitive storage and run native extraction separately:
fat new ./flash.mtd --name bmc --projects-dir /path/to/case-sensitive/projects
fat extract /path/to/case-sensitive/projects/bmc --extractor native --json > extraction.json
Gzip members are published in artifact-ID/format directories such as work/extractions/native/0004-gzip, with the original safe member name retained. A gzip directory does not classify its payload as a kernel. Read kernel_paths in the extraction manifest for kernel candidates and artifacts for source/parent relationships and actual output paths. Cached projects retain their existing directories until extraction is rerun with --force.
--extractor native uses only FAT’s built-in extraction path. Omit it to use auto, which retains external fallback when native recovery is incomplete. The JSON recovery_status summarizes recovery; artifacts records individual successes, unsupported formats, and failures. A previous extraction is reused unless --force is supplied; --force overwrites existing extraction artifacts.
Use a case-sensitive output filesystem for extraction: these OEM images can contain distinct names such as libip6t_HL.so and libip6t_hl.so. Inspect per-artifact extraction outcomes; successful command completion and recovered auxiliary files do not establish complete rootfs recovery. Raw identity strings also require context: the tested Supermicro X12 image contains openbmc-linux-gcc in a compiler string while its extracted os-release identifies Supermicro BMC.
Native extraction reconstructs JFFS2 files before scanning their contents for nested gzip streams. It supports both byte orders and uncompressed, zero-filled, copy, and zlib fragments. Header, inode, data, and filename CRCs are checked; versions and deletions are applied before publishing the staged tree. JSON artifact records preserve filesystem-to-file lineage. Private temporary copies allow recursive inspection without changing restrictive firmware permissions in the published tree. Unsupported codecs or node types, incomplete ranges, and exceeded limits remain unresolved.
JFFS2 discovery joins nodes across erased gaps of at most 64 KiB. It does not infer flash partition boundaries, ECC/OOB layouts, or missing fragments. Filenames and symlink targets currently require UTF-8; xattr, summary, and other unsupported node types are reported explicitly. Larger gaps can separate a filesystem into unresolved regions. Unreachable live directory entries remain unresolved.
The format and trust semantics follow U-Boot’s FIT signature documentation.
Validation fixtures
Hermetic tests synthesize FITs with hash metadata, image/configuration signatures, malformed structures, and valid/corrupt environment CRCs. Real-image validation should record the source URL, SHA256, command and tool version separately. Firmware binaries are not committed to the repository. OpenBMC TiogaPass and Romulus examples validate those image families. The 2026-10-18 OEM validation additionally exercises Gigabyte, ASRock, and ASUS MegaRAC/SP-X firmware, Supermicro X11/X12 images, and a Lenovo XCC comparison image. Coverage is tied to the listed input hashes and features; it does not establish proprietary update-signature verification or controller boot enforcement.
Run the inspected image
Supported images can use BMC emulation profiles for full-flash or explicit vendor-kernel boot, current Redfish checks, and serial/monitor/GDB debugging. Inspection findings alone do not select a board or authorize an adaptation.
Emulating BMC firmware
FAT can boot supported ASPEED images using an explicit, hash-pinned rehosting profile. The native runtime provides private flash staging, loopback HTTPS forwarding, serial capture, a QEMU monitor, GDB, and stop/status handling. These features were added after v2.0.1 and require a build that includes BMC emulation profiles.
See the real-image validation report for the tested images, service responses, debugger checks and remaining compatibility limits.
Boot modes
| Mode | Executed firmware | Adaptations |
|---|---|---|
| Full flash | Original bootloader, kernel and filesystems on a QEMU board | Private flash copy and ephemeral QEMU snapshot writes |
| Vendor kernel | Original SHA-256-checked FIT kernel, DTB and optional initramfs; original flash filesystems | Bypasses SPL/U-Boot; explicit boot arguments and optional DTB node disabling |
Both modes require an exact input SHA-256 and explicit board/flash geometry. Neither imports raw bootloader string hints. FIT payload hashes check integrity; they do not authenticate firmware or demonstrate hardware boot enforcement.
Start a session
Install qemu-system-arm with ASPEED board support and curl. QEMU 11.0.2 was used for the recorded runs. GDB is optional for debugging; interactive console/monitor attach requires netcat with Unix socket support. Use case-sensitive storage for extraction on macOS.
fat new ./obmc-phosphor-image-romulus.static.mtd --name romulus
fat extract .fat-projects/romulus --extractor native
fat analyze .fat-projects/romulus
fat rehost profiles list
fat rehost profiles show bmc-romulus --json
fat emulate --project .fat-projects/romulus --pack bmc-romulus
fat emulate --project .fat-projects/romulus --status
FAT prints the allocated HTTPS, GDB and Unix socket endpoints. --status performs a fresh, bounded HTTPS probe of /redfish/v1/, requiring HTTP 200 and a JSON ServiceRoot. Once that succeeds, it also records the unauthenticated /redfish/v1/Managers status. Plain-text 401 bodies are supported. A running QEMU process or an open forwarded socket alone does not validate Redfish readiness. Startup can take several minutes.
The probe ignores curl configuration, credentials and proxies, does not follow redirects, and accepts the firmware’s self-signed TLS certificate only at the recorded loopback endpoint. Certificate verification is explicitly reported as false. A 401 records denial for this request, not a complete authentication audit.
For the supported ASUS HPM image, use the same project workflow with --pack bmc-asus-bhs-1.20.02. It selects the original Z14PN kernel/DTB and disables /ahb/apb/hace@1e6d0000: the tested QEMU HACE implementation lacks the cipher operation needed by this firmware. This change is recorded in the boot manifest. Sensor, I2C and host-device errors remain visible.
BMC profiles select the native qemu-direct system runtime. Do not pass --port, --kernel-class, generic partition repairs, or another backend. Each emulated MAC uses a distinct restricted user-network subnet; only the profile’s management MAC forwards HTTPS to loopback. No guest outbound network access is enabled.
Profiles and input identities
Embedded profiles require explicit --pack selection. fat rehost match continues to search operator-supplied directories; it does not automatically apply embedded BMC adaptations.
| Profile | Image | Mode | Input SHA-256 |
|---|---|---|---|
bmc-romulus | OpenBMC Romulus static MTD, 32 MiB | Full flash | 7d4f776b5e1728abc1624fb698149b50425dd4efd8e2df8b711046f8649c0461 |
bmc-romulus-vendor-kernel | Same Romulus image | Vendor kernel + original initramfs | Same hash as above |
bmc-tiogapass | OpenBMC TiogaPass static MTD, 32 MiB | Full flash | 36395de059fcd98f316c3d4399b3110befaa176406afa00d1f84292f3933393e |
bmc-asus-bhs-1.20.02 | ASUS ESC8000-E12 BHS_Gen_1.20.02.hpm | Vendor kernel; HACE disabled | 20954d5d143552ba68be44902d3de17828d88d8f2eb5e86cd2a6584fd75f3a81 |
bmc-aspeed-ast2500-v11.04 | ASPEED v11.04 AST2500 default Linux 6.12 static MTD, 32 MiB | Full flash | a6befbd5b957a7662516b2795b05c3d9176a18eb4caeeb6e059c6efdeaef4e69 |
The ASPEED image comes from the official v11.04 release, asset ast2500-default-612-obmc.tar.gz (archive SHA-256 29986e9ecfa7527f00db78f3bf2f7385964cda106a1b68db5295bdc7bb6397b0). Select its obmc-phosphor-image-ast2500-default-612.static.mtd member, not the compressed archive, as the project input. Firmware binaries and extracted filesystems are not distributed with FAT.
Debug and stop
fat debug surfaces --project .fat-projects/romulus --json
fat debug monitor --project .fat-projects/romulus --command 'info status'
fat debug gdb --project .fat-projects/romulus --command 'info registers'
fat debug gdb --project .fat-projects/romulus --command 'x/8i $pc'
fat debug shell --project .fat-projects/romulus
fat emulate --project .fat-projects/romulus --stop
The shell command attaches to the serial console for interactive login; it does not supply credentials or execute --command over an unauthenticated console. GDB connects to the whole-system QEMU stub. Register and instruction inspection work without symbols; source debugging requires a matching symbol-bearing ELF. This is separate from attaching a userspace gdbserver to a particular daemon.
Use fat debug process and fat debug redfish-session for a bounded userspace attachment and a controlled session/role experiment. These require explicit lab setup and disposable accounts; the existing boot profiles do not enable SSH access or change credentials.
For a controlled readiness check, fat debug monitor --command stop pauses the guest; --status should then report Redfish not ready. Resume with fat debug monitor --command cont and check again. The QEMU process remains running during this test. Stopped/failed runs retain historical observations but no longer advertise current attachable debug surfaces.
Per-run staging under work/rehosting/ contains:
bmc-boot-manifest.json: source hash, profile, runtime version, command, asset hashes, boot-chain bypass and DTB changes.flash.bin: the private flash region; QEMU snapshot changes are discarded on stop.kernel.bin,original.dtb,boot.dtb, and optionalinitrd.binfor vendor-kernel mode.serial.log,qemu-devices.log, stdout and stderr logs.
Runtime outputs also contain bmc-service-state.json with the latest timestamped HTTP observation and debug command transcripts. Keep these with the source image identity when comparing runs.
Add another BMC image
Copy a profile from crates/fat_cli/assets/bmc, or export fat rehost profiles show <id> --json and use its pack object as a local YAML/JSON profile. Set its own ID, exact source digest, flash offset/size and a compatible QEMU ASPEED board. Machine names and versions alone do not establish compatibility.
Start with full flash. If a direct boot experiment is needed, specify FIT-relative kernel, DTB and optional initrd node names plus explicit boot arguments in vendor_kernel. fit_offset is relative to the carved flash, while flash_offset is relative to the original input. This version supports inline, uncompressed FIT payload declarations with SHA-256 hashes, not external FIT data or automatic decompression. Declare modified_fixture: true for vendor-kernel boot, including when its original DTB is unchanged. Missing nodes, corrupt hashes and out-of-range regions fail before QEMU starts.
BMC readiness currently supports exactly the redfish-service HTTP validator on port 443 at /redfish/v1/. Other custom validators are rejected rather than silently ignored. Use the serial and debugger evidence to investigate images without Redfish support.
fat rehost profiles validate ./my-bmc.yaml
fat emulate --project .fat-projects/my-bmc --pack ./my-bmc.yaml
Keep an unadapted control when changing device-tree properties. Recovery of web/Redfish services does not establish physical sensor fidelity, host management behavior, update-signature enforcement, or secure boot on hardware.
BMC session and process debugging
These commands work with an already running native BMC session. Start with the BMC emulation workflow. They were added after v2.0.1; build a revision containing them. The Romulus/ASUS validation report records the tested firmware and adaptations.
A controlled Redfish role test
Provision three distinct lab principals in the emulated snapshot: an administrator, an enabled ReadOnly reader, and an enabled ReadOnly target account. Finish any first-login password change for the reader before testing. Use a disposable target: the positive control temporarily sets its Enabled property to false, then restores it to true. FAT does not create accounts or change their passwords.
Store a private fixture outside the repository, with permissions such as chmod 600 credentials.json:
{
"admin": {"username": "labadmin", "password": "ADMIN_PASSWORD"},
"reader": {"username": "fatreader", "password": "READER_PASSWORD"},
"reader_account": "/redfish/v1/AccountService/Accounts/fatreader",
"target_account": "/redfish/v1/AccountService/Accounts/fattarget",
"target_username": "fattarget"
}
Replace account paths with the actual resource IDs. ASUS uses numeric IDs (5 and 6 in the recorded run); names and IDs need not match. The fixture accepts simple usernames and direct account paths, without URLs, query strings or escaped path components.
fat debug redfish-session --project .fat-projects/romulus \
--fixture ./credentials.json --allow-account-mutation --json
The experiment checks these observations in order:
- Administrator and reader session creation return 201 with usable session handles. The reader is enabled, ReadOnly, unlocked and not awaiting a password change.
- Anonymous access to
/redfish/v1/Managersreturns 401; the reader receives a valid collection with 200. - The reader’s PATCH of the other account’s
Enabledproperty returns 403, and the administrator observes unchanged account identity, role and state. - The administrator performs the same PATCH successfully, and a fresh GET confirms
Enabled: false. PATCH uses the current ETag, orIf-Match: *when none was returned. - Reader logout succeeds and reuse of its token returns 401.
- Cleanup restores and verifies the target, deletes created sessions and verifies revocation. Restoration is attempted even when a mutation request loses its response.
A 403 from a password-change gate does not pass this test. The administrator positive control demonstrates that the tested mutation is supported. This covers one cross-account authorization operation and session lifecycle, not every Redfish role or endpoint.
The command returns nonzero if a check or cleanup fails. A lost login response can leave an unknown session handle, so it cannot report cleanup success. Inspect the guest after a cleanup failure; stopping a snapshot session discards its lab changes. Cleanup covers ordinary request failures, not a killed FAT process or host failure.
Requests go only to the selected runtime’s loopback HTTPS endpoint. Self-signed TLS is accepted and reported explicitly; redirects, proxies and curl configuration are excluded. Passwords and tokens use private temporary files rather than command arguments. The saved report contains statuses and selected account-state observations, without credentials, tokens or raw response bodies.
Attach to a userspace daemon
Requirements: a Unix host with ssh and GDB, a compatible guest gdbserver, an explicitly provisioned SSH key, and a guest account with ptrace permission. FAT does not install the debugger, discover passwords, or enable a guest shell. Use the guest PID, not QEMU’s host PID.
fat debug process --project .fat-projects/romulus \
--pid 161 --user root --identity-file ./lab-key \
--gdbserver /tmp/fat-gdbserver \
--sysroot .fat-projects/romulus/extracted --json
Replace PID 161 with the current daemon PID. A matching extracted rootfs avoids transferring executable/library files while the service is stopped. Without --sysroot, GDB reads files from the guest. Stripped binaries still provide registers, process maps and any exported dynamic symbols; source lines require matching debug symbols.
FAT creates a temporary SSH forward on 127.0.0.1 for the selected profile’s management NIC. SSH verifies a newly learned guest host key in an isolated temporary known-hosts file, using only the supplied identity. GDB communicates with gdbserver --once --attach - PID over SSH; there is no guest GDB TCP listener. GDB startup scripts, auto-loading and debuginfod are disabled.
Default commands record inferiors, threads and a bounded backtrace, then detach. Repeat --command to insert commands before detach. For example, start this command and trigger a Redfish login from another terminal while it waits:
fat debug process --project .fat-projects/romulus \
--pid 161 --user root --identity-file ./lab-key \
--gdbserver /tmp/fat-gdbserver --sysroot .fat-projects/romulus/extracted \
--command 'tbreak pam_authenticate' --command continue --command 'bt 8'
For the tested ASUS image, the login breakpoint is PKCS5_PBKDF2_HMAC in libcrypto.so.3, reached from redfishinterface.so in the LuaJIT Redfish daemon. Use entry-breakpoint capture and detach: stepping out with finish disrupted the recorded ASUS request and caused a process replacement. The short entry capture completed login with the same daemon. Symbol names alone do not identify every authentication path.
--timeout bounds the GDB phase, including symbol loading and breakpoint waits (default 120 seconds, maximum 600). Pre/post SSH identity probes have separate 15-second deadlines. Each helper transcript is capped at 8 MiB; overflow fails the command rather than reporting a complete transcript. A timeout kills the local debugger/SSH process group, then checks whether the same guest process resumed and removes the forward. Recovery is reported even though the timed-out command exits nonzero. If resume cannot be confirmed, inspect the serial console or stop the emulated session.
The report compares /proc/PID/stat start time, executable path and SHA-256 before and after attachment. It separately records detach, resumed state and forwarding cleanup. A replacement process does not count as success. The SHA-256 probe supports guest sha256sum or openssl dgst -sha256.
Both commands register uniquely named JSON artifacts with FAT’s selected run. Process transcripts include output from your GDB commands: avoid credential or memory dumps in evidence intended for publication. Keep firmware, keys and private fixtures outside Git. fat debug gdb remains the separate whole-system QEMU debugger.
How to read FAT output
FAT reports hits, evidence, categories, counts, offsets, confidence, validation state, provenance, and next probes. These terms describe what FAT observed.
Some graph-schema names sound more conclusive than they are. UpdateCandidate, AuthorityVerdict, and update-authority are compatibility names for evidence groups and bounded static assessments. They do not represent a final analytical judgment.
- Startup intent does not prove runtime reachability or exploitability.
- Edge AI findings identify artifacts and likely inference stacks; they do not prove that a model executes.
- A structurally valid key length says something about the bytes, not whether the firmware uses those bytes at runtime.
- An emulation validator proves only what that validator checked during that run on that backend.
fat inspect update --json is the aggregate surface for envelope, trust, and crypto evidence. It embeds the underlying submodels so downstream tools do not need to reconstruct their relationships from prose.
Taint analysis
Binary taint: taint-cross and source-map
Which function writes a device’s shared state and which reads it is a claim about that platform’s config API, so FAT ships no such catalog. Without --state-profile, taint-cross assigns no function a read or write role and produces no cross-binary findings. JSON output is an empty array; the command does not emit a raw symbol inventory.
The two profiles serve different purposes: --source-profile supplies binary source/sink models to the analyzer, merged with the core models; --state-profile maps read, write, and flush names into shared-state families. A state profile alone does not teach the binary analyzer how an unfamiliar function carries data. Both flags take file paths; an invalid selected file is an error. See fat taint-cross --help for the state-profile schema.
Both --json and --as-taint-json preserve the binary models’ identity in model_provenance and the state mappings’ identity in state_model_provenance. External identities include the declared name, selected path, and SHA-256 of the loaded file. Output remains an array of findings, or [] when none exist.
fat source-map --source-profile likewise adds operator-supplied hints to the ISO C core hints. Its JSON report records model_provenance even when no backend candidates match. Source hints describe observed names, not proven flows.
Shell taint: taint --lang shell
Shell is the firmware layer where source-to-sink reachability is cheapest to show. --lang shell parses scripts with tree-sitter-bash and walks assignments forward, so $(cat /configs/...) → $var → sed -i "s/.../$var/g" comes back as one chain instead of an isolated grep hit. Findings serialize to the same TaintFinding JSON as fat taint --json, so anything that already reads taint findings deserializes them unchanged.
fat taint --lang shell --file ./app/init/wifi.sh --summary
fat taint --lang shell --rootfs ./extracted-rootfs --json
fat taint --lang shell --rootfs ./extracted-rootfs --source-profile ./my-target-shell.yaml --severity high
The always-loaded shell profile only carries constructs that hold for any POSIX script: positional parameters, read, cat/head/tail, the RFC 3875 CGI meta-variables, and the documented uci get, fw_printenv and getprop reads. It asserts nothing about any device’s filesystem, so a read of /configs/... is Secondary on the strength of the read alone — the path’s name is not evidence that an attacker can write the file. --source-profile takes a YAML overlay you write; a path-prefix source in it declares a mount attacker-writable, which promotes reads under that mount to Primary and makes the finding cite the mount by name.
Shell taint is deliberately unsound — shell is too dynamic to prove reachability — so every finding lands as a Candidate at WEAK strength and only flows with a named source are reported. For sink hits without provenance, use fat sink-discovery --rootfs.
Edge AI artifacts
Library filename hints require the four-byte ELF magic and use artifact_kind: filename-match, matched_pattern, and evidence. They do not establish a runtime identity or model format; their metadata omits runtime and format. The repository contains deterministic synthetic fixtures; it does not redistribute private model corpora.
Startup intent
Use fat startup-map to choose the next target to inspect, not as runtime proof.
Architecture
The workspace contains thirteen crates. fat_cli is the only binary crate; the others are libraries.
fat_cli
├── fat_core shared models and SQLite persistence
├── fat_extract recursive native extraction and fallback orchestration
├── fat_analyze analyzer engine and registry
├── fat_emulate emulation planning and session orchestration
│ ├── fat_backend backend abstraction and registry
│ └── fat_family signal-based device-family classification
├── fat_bootloader bootloader profiles and runtime operations
├── fat_query typed evidence graph and query adapters
├── fat_taint firmware-wide taint analysis
├── fat_package release and runtime-data packaging
├── fat_plugin_api plugin contracts
└── fat_plugin_host plugin discovery and dispatch
The main extension points are:
Analyzerinfat_analyze, registered withAnalysisEngine;Backendinfat_backend, ranked by architecture and family affinity;- family traits in
fat_family, scored from observed firmware signals; and - the evidence IR in
fat_query, shared by static, runtime, and source adapters.
For build, test, and contribution workflow, see Development and Contributing.
Extraction
fat_extract::pipeline runs a deterministic queue of container members and embedded regions. Archive handlers unwrap ZIP, TAR, and gzip. SquashFS and CramFS handlers produce terminal trees; JFFS2 reconstructs regular files and queues private copies for recursive inspection. Those copies preserve access even when firmware directory permissions prevent traversal, and failed decodes remove them immediately. Published filesystem contents retain their original layout rather than gaining analysis-generated files. A single signature scanner skips successfully decoded spans.
output::OutputTree owns path validation, cumulative output accounting, private staging, mode preservation, and deferred symlinks. Publication happens only after the decoder finishes. SquashFS header, inode, compression, and cached metadata readers are separate modules. CramFS reuses its bounded decoder. New formats can reuse the writer and return child paths for further inspection or a terminal tree.
Artifact records retain their source, parent, source-relative offset, decoder, output, counts, timing, and failure reason. Failed children preserve successful siblings. Rootfs content evidence and unresolved branches determine whether fallback extraction continues. The manifest adds artifacts and recovery_status without removing earlier fields.
Default native limits are 512 MiB per input, 256 MiB per file, 1 GiB cumulative output including symlink targets, 262,144 output entries, 4,096 artifacts, eight container levels, and 64 path components. Metadata and fragment caches share a 16 MiB cap. Filesystem decoders never execute recovered programs.
Supported SquashFS codecs are zlib, LZMA, and XZ. Other codecs produce explicit unsupported outcomes. Special device entries are counted and omitted; ownership, timestamps, and extended attributes are not restored. TAR hard links and sparse entries are currently unsupported. Case-distinct filenames require case-sensitive output storage; collisions fail the tree instead of overwriting a file.
JFFS2 validates header, inode, data, and filename CRCs, applies inode versions and directory-entry deletions, and supports both byte orders with uncompressed, copy, zero-filled, and zlib fragments. Unsupported nodes/codecs and incomplete reconstruction remain unresolved. See JFFS2 extraction limits.
BMC inspection
fat_analyze::bmc combines layout, located markers, FIT metadata from fat_analyze::fit, and CRC-validated environments from fat_analyze::boot_env. fat_core owns the serializable evidence; fat_cli::bmc_cmd renders text, JSON, and SARIF from that model. FIT analysis reuses the bounded FDT reader in firmware_formats and also appears in generic header inspection. Signature metadata, cryptographic verification, and hardware enforcement remain separate evidence classes; --details changes presentation only.
Capabilities in depth
Usage details for selected capabilities. What each output does and does not prove is covered in How to read FAT output.
BMC firmware
fat inspect bmc --file flash.mtd reports raw layout, FIT authentication metadata, located platform markers, and CRC-valid U-Boot environments. It supports detailed text, JSON, SARIF, and an optional warning exit gate. Native extraction reconstructs JFFS2 files before inspecting their compressed contents. See Inspecting BMC firmware for the workflow, supported formats, search bounds, and validation evidence.
Graph export
inventory is the neutral graph profile. It emits directories, files, file kinds, SHA-256 hashes, and rabin2 import and export edges without adding research-specific labels.
fat graph export --rootfs ./rootfs --profile inventory --format json > inventory.json
fat ls --rootfs ./rootfs --profile inventory --json
fat tree --rootfs ./rootfs --profile inventory --summary --json
update-authority is an optional lens for update-trust research. It adds label assignments, rollups, update and decrypt path evidence, bounded assessment nodes, negative evidence, and symbol metadata.
fat graph export --rootfs ./rootfs --profile update-authority --output update-graph.json
fat label scan --rootfs ./rootfs --profile update-authority --emit json > update-graph.json
fat labels explain --rootfs ./rootfs --profile update-authority --path /sbin/updater --json
String search
fat search scans printable firmware strings. By default it inspects ELF binaries under discovered filesystem candidates. Use --all-files for scripts and configuration, -I for case-insensitive matching, --context N for nearby strings, and --profile credentials|urls|crypto|sinks|debug for common security searches. JSON output uses search-report/v2.
Crypto artifacts
fat crypto-census finds reused crypto artifacts across a filesystem and shows whether they appear on a governing update path. fat crypto-extract reports embedded artifacts with offsets, confidence, validation state, and trust-path context. Confirm runtime use through disassembly or instrumentation.
Edge AI artifacts
fat edge-ai scan discovers four model families and reports library filename hints:
Use fat edge-ai --help or fat edge-ai scan --help for the full command reference.
| Format | Evidence collected |
|---|---|
| MAGIK/JZDL | MAGIK headers, input shapes, layer counts, and variants |
| TFLite | FlatBuffer files, embedded arrays, and ELF data |
| ONNX | ModelProto files |
| Qualcomm DLC | DLC candidates and metadata strings |
fat edge-ai scan --rootfs ./rootfs
fat edge-ai scan --rootfs ./rootfs --format magik,tflite --json
fat edge-ai scan --rootfs ./rootfs --format dlc --json > edge-ai-report.json
JSON output uses schema_version: edge-ai-scan/v1 and stores format-specific details under findings[].metadata.
Startup intent
fat startup-map resolves startup metadata to concrete binaries and attaches profile evidence such as strings, imports, and linked libraries.
Rehosting packs
A rehosting pack is a YAML file containing device-specific knowledge needed to emulate a firmware image: the QEMU machine, init repairs, paths to materialize, network mode, and readiness validators.
FAT embeds explicit, hash-pinned BMC boot profiles, listed by fat rehost profiles list. General device-specific packs remain operator-supplied. Local packs are discovered from:
- any
--packs-dir <dir>passed tofat rehost match, in the order given; then - directories in the colon-separated
FAT_REHOSTING_PACKSenvironment variable.
With neither directory source set, no local pack is discovered. Embedded BMC profiles require an explicit --pack ID. fat rehost match reports which of your packs match an extracted firmware image.
fat rehost profiles validate ./my-packs/example-camera.yaml
fat rehost match .fat-projects/firmware --packs-dir ./my-packs
fat emulate --project .fat-projects/firmware --pack example/camera
fat emulate --project .fat-projects/firmware --experimental-rehosting
Unsupported partition roles and init repairs fail closed in the pack capability report. Network declarations remain degraded when the selected backend cannot prove their fidelity.
External campaign evidence
fat experiment external records bounded work performed by an external
execution engine. It does not add a FAT fuzzing engine or claim that the
external runtime matches a deployed device.
Use this path when a campaign already has its own tested AFL++, Fuzzware, or similar runner and the repeated need is to pin setup files, select one exact input, replay it, retain output, and prove cleanup.
Manifest contract
An external-campaign/v1 manifest contains:
- the external engine name, version, revision, and execution substrate;
- a short
proof_scopethat states the evidence boundary; - SHA-256 pins for setup artifacts and retained evidence;
- one or more cases with an exact input, argv vector, timeout, and accepted exit codes; and
- an idempotent cleanup argv vector with its own timeout.
Artifact paths are relative to --root and cannot contain parent traversal.
The replay argv must contain {input} exactly once as a complete argument.
FAT substitutes the verified input path and launches the argv vector directly,
without a shell.
Validate a prepared evidence tree before execution:
fat experiment external validate \
--file external-campaign.json \
--root /path/to/campaign \
--json
Run one case inside an existing FAT project:
fat experiment external run \
--project /path/to/fat-project \
--file external-campaign.json \
--root /path/to/campaign \
--case minimized-crash \
--json
The run creates a FAT session and replay run. It records the exact input, manifest, declared evidence, stdout, stderr, and a result document containing the materialized argv, exit code, timeout state, and cleanup result.
The runner always attempts cleanup after the replay command returns, fails, cannot start, or reaches its timeout. A replay is successful only when its exit code is declared by the selected case and cleanup passes. Engine-specific wrappers remain responsible for interpreting their own crash markers and returning a stable exit code; pin those wrappers as setup artifacts.
This contract deliberately stops at external process execution and evidence accounting. It does not provide corpus mutation, coverage collection, peripheral modeling, process debugging, or network delivery.
Command reference
fat -h lists every command grouped by task, starting with identify and doctor. fat --help adds common workflows and examples. Every subcommand also has its own --help output and examples. Help uses color in a terminal and stays plain when piped; FAT_COLOR=always forces color and FAT_COLOR=never disables it.
Projects and extraction
| Command | Purpose |
|---|---|
new, list, info, delete | Manage project workspaces under .fat-projects/ |
identify | Classify evidence in an unknown file or directory |
extract | Recursively unpack firmware and record filesystem recovery and per-artifact outcomes |
extract-payload, carve | Extract a known byte range or format-sized object |
analyze | Derive project signals, findings, and the bootloader snapshot |
doctor | Report external-tool and backend readiness |
data, kernel | Install and verify runtime data and maintained kernels |
fat extract firmware.zip --extractor native --json uses the built-in container and filesystem decoders. The default auto selection retains fallback extraction when native recovery is incomplete. recovery_status is rootfs_recovered, files_only, or partial; the artifacts array explains each recognized branch. work/native-artifacts.json also preserves native outcomes when the command cannot produce a final manifest.
Native JFFS2 extraction validates CRCs and reconstructs file versions and fragments before inspecting nested gzip streams. Unsupported codecs and incomplete files remain unresolved. Explicit --extractor native does not invoke external fallback; see the BMC extraction workflow for an example and supported formats.
For firmware with case-distinct names, create the project on a case-sensitive volume: fat new firmware.zip --projects-dir /path/to/case-sensitive/projects, then extract that project. On macOS, use a case-sensitive APFS volume or disk image. Existing project and extractor-selection arguments remain available.
Firmware structure and classification
| Command | Purpose |
|---|---|
inspect | Inspect headers, layout, carved artifacts, BMC flash, or bare-metal metadata |
inspect bmc | Report FIT authentication metadata, located platform markers, and CRC-valid U-Boot environments from raw flash |
inspect update, inspect envelope | Build update-envelope and trust-path evidence |
detect-encryption, compare | Measure opaque wrappers and compare envelope boundaries |
diff role, diff firmware | Compare binaries by role or projects across filesystem, configuration, and binary layers |
bootloader | Inspect bootloader images, environments, handoff, and sessions |
fat inspect bmc --file flash.mtd --details expands the text report. Use --json or --sarif for structured output and --fail-on-warning to emit the report before returning a failing status for warning/error findings. Both --env-offset and --env-size are required for an explicit environment region. See BMC inspection for search bounds and the distinction between signature metadata and boot enforcement.
ESP-IDF partition tables
identify and inspect headers discover plaintext ESP-IDF partition tables in
flash dumps, merged images, and standalone table binaries. The scan validates
framing, alignment, ranges, labels, and MD5 when present, and accepts legacy
tables without MD5. Partition offsets are flash addresses, not automatically
file offsets. See ESP-IDF partition tables for the full
workflow and limits.
Filesystem evidence
| Command | Purpose |
|---|---|
ls, tree | Inventory-oriented filesystem views with optional evidence-backed labels |
search, xref-search | Search printable strings and resolve pointer or code references |
source-map, startup-map | Map inputs to consumers and startup metadata to binaries |
trust-map, trust-boundary | Identify governing update paths and trust boundaries |
crypto-census, crypto, crypto-extract | Locate reused crypto material and embedded keys, certificates, or blobs |
edge-ai | Discover Edge AI models and library filename hints |
android | Analyze APK inventory, discovery leads, locality, and capability chains |
Binary analysis
| Command | Purpose |
|---|---|
r2-triage | Profile a binary with radare2 and rank audit targets |
sink-discovery, handler-table | Find sink candidates and URL or command dispatch tables |
identify-launcher, inspect-handoff | Detect thin launchers and inspect downstream implementation artifacts |
decompile | Decompile one function with r2ghidra, applying r2 rename/comment scripts |
taint, taint-query, taint-cross | Trace data flow, ask precise path questions, and stitch cross-binary state |
taint --lang shell | Trace source-to-sink flows through shell scripts with a tree-sitter-bash AST |
sdk-trace, bundle-reality, runtime-plane | Inspect dependencies and compare runtime metadata with filesystem reality |
Invariants, chains, and verification
| Command | Purpose |
|---|---|
invariant query | Query security invariants against source repositories |
patch check | Derive patch guidance and search for nearby variants |
chain query | Assemble multi-step propagation paths from evidence |
verify | Attach runtime confirmation to a derived finding |
signature-fit | Test whether a byte window fits a public-key signature relation |
Emulation and runtime
| Command | Purpose |
|---|---|
preflight | Rank emulator backends and host readiness |
emulate | Start, inspect, or stop a firmware runtime |
rehost, experiment, rehosting-trace | Match, validate, and explain rehosting recipes and experiments; record pinned external campaign replays |
debug, observe | Inspect runtime processes, services, networking, shells, maps, monitors, and GDB surfaces |
instrument-hooks, trace-ingest, probe | Configure QEMU hooks, ingest traces, and compare runtime events with static findings |
discover, hsm | Produce family-scoped leads and query derived state-machine models |
benchmark | Score and report analysis and emulation benchmarks |
fat experiment external validate checks the pinned setup, replay input,
retained evidence, and cleanup contract for a campaign owned by another engine.
fat experiment external run executes one bounded replay and stores its input,
logs, result, and cleanup outcome in a FAT project. See
External campaign evidence.
Graph and label views
| Command | Purpose |
|---|---|
graph export | Export analysis facts as reusable JSON graph data |
label scan, labels explain | Build label evidence and explain why a path carries a label |
BMC emulation
fat rehost profiles list lists embedded BMC profiles. Use fat emulate --project <project> --pack <id-or-yaml>, then --status to probe Redfish and --stop to terminate the owned QEMU process. fat debug shell, monitor, and gdb attach to the recorded serial socket, monitor socket, and debugger port. See BMC emulation for full-flash/vendor-kernel modes, image hashes and fidelity limits.
Environment variables
These variables are the documented operator-facing controls. Backend-development and test variables exist in the source, but they are not a stable interface.
| Variable | Purpose |
|---|---|
FAT_DATA_DIR | Use an unversioned, reviewed runtime-data tree directly. Takes precedence over bundled and managed data. |
FAT_COLOR | always forces ANSI color; never disables it. Help and reports stay plain when piped. |
FAT_PYTHON | Python interpreter for optional Python-backed workflows, including an isolated angr environment. |
FAT_EXTRACT_TIMEOUT | Default external-extraction timeout in seconds. --extract-timeout overrides it; 0 disables the timeout. |
FAT_REHOSTING_PACKS | Colon-separated directories searched for local rehosting packs after --packs-dir. |
FAT_EXT2_BUILDER_IMAGE | Operator-provided, digest-pinned image used for the macOS ext2 builder. FAT does not pull it. |
GHIDRA_HOME | Ghidra installation used by headless analysis and taint normalization. |
Runtime-data resolution
FAT_DATA_DIR is one input to runtime-data discovery. The full resolution order is:
- command-level path;
FAT_DATA_DIR;- executable-relative
<exe_dir>/share/fat; - executable-relative
<exe_dir>/../share/fat; - platform user data;
- a marked development checkout (debug builds only).
fat data status reports which origin supplied the active tree. See Runtime data.
Python and angr
FAT_PYTHON should point at an isolated environment with the optional dependencies installed:
python3 -m venv "$HOME/.local/share/fat-angr-venv"
"$HOME/.local/share/fat-angr-venv/bin/python" -m pip install angr pyyaml
export FAT_PYTHON="$HOME/.local/share/fat-angr-venv/bin/python"
fat doctor --strict checks core prerequisites; it does not validate the optional angr environment.
Rehosting packs
FAT_REHOSTING_PACKS uses the platform path separator (: on Unix). Directories are searched in order after any --packs-dir arguments. Embedded BMC profiles are not discovered this way; they require explicit --pack selection.
JSON schemas
Structured output carries a schema_version (or an equivalent manifest version). Treat these identifiers as the compatibility contract: a breaking change to documented JSON is a major-version change under the release policy.
Identification, structure, and update analysis
| Surface | Schema |
|---|---|
identify --json | identify-report/v1 |
inspect update --json | inspect-update-report/v1 |
inspect envelope --json | envelope-analysis/v1 |
| Trust-path analysis | trust-path-analysis/v1 |
inspect bmc --json | bmc-inspection/v1 |
| ESP-IDF partition evidence | Embedded in the identify/header models; rejected candidates remain in diagnostics |
Filesystem and artifact analysis
| Surface | Schema |
|---|---|
search --json | search-report/v2 |
startup-map --json | startup-map/v1 |
crypto --json | crypto-artifact-analysis/v1 |
crypto-census --json | crypto-reuse-cluster/v1 |
crypto-extract --json | crypto-key-artifact-export/v1 |
edge-ai scan --json | edge-ai-scan/v1 |
inspect symbols --json | elf-symbols/v2 |
inspect symbols --diff --json | elf-symbol-diff/v1 |
MCU analysis
| Surface | Schema |
|---|---|
inspect mcu --json | mcu-inspection/v1 |
inspect peripheral-map --json | mcu-peripheral-surface/v1 |
inspect isr-state --json | mcu-isr-state/v1 |
inspect svd-rank --json | svd-rank/v1 |
Runtime, debugging, and experiments
| Surface | Schema |
|---|---|
debug redfish-session --json | bmc-session/v1 |
debug process --json | bmc-process/v1 |
experiment ... --json | experiment-command/v1 |
experiment external ... --json | external-campaign-command/v1 |
| External campaign manifest | external-campaign/v1 |
decompile --json | fat-decompile-raw/v1 |
signature-fit --json | signature-fit/v2 |
| Signature-fit artifact export | signature-fit-artifacts/v2 |
bootloader handoff --json | bootloader-handoff/v1 |
kernel ... --json | kernel-command/v1 |
Reading the version field
- A schema version identifies the shape of one report, not the FAT release. The executable version and runtime-data version are separate.
- Presentation flags (
--details,--width, color) do not change the JSON model. - Diagnostics are part of the model. Rejected candidates and unresolved branches are intentionally retained rather than suppressed.
- Runtime-data manifests use their own
data_versionand per-file SHA-256 pins. See Runtime data.
Glossary
Artifact — A recognized unit produced or consumed during analysis: a container member, carved region, extracted file, or analysis output. Artifact records retain source, parent, offset, decoder, output, and outcome.
Backend — An emulation implementation behind fat_backend, ranked by architecture and family affinity. Examples include native QEMU and containerized adapters.
BMC — Baseboard management controller. FAT inspects BMC flash offline and can boot supported images with explicit profiles.
Candidate — A result that meets a detector’s conditions but has not been promoted to a stronger claim. Shell taint findings are always candidates.
Confidence / strength — Qualitative labels attached to evidence. FAT does not convert them into invented numeric scores.
DTB — Device tree blob. In vendor-kernel BMC boot, FAT records every adaptation made to the original DTB.
Evidence — An observation with provenance: an offset, hash, string, structural field, or runtime event. Evidence is what FAT reports; conclusions are the analyst’s responsibility.
Family pack — Declarative vendor data in fat_family: address ranges, identity markers, reserved slots, core attribution, and register definitions.
FAT — Firmware Analysis Toolkit. Also the name of the fat executable.
FDT — Flattened Device Tree. FIT metadata is read with the shared bounded FDT reader.
Finding — A structured observation with a rule ID, severity, evidence, and location. Findings are not automatically vulnerability verdicts.
FIT — Flattened Image Tree, U-Boot’s image format. FAT reports component hashes and image/configuration signature metadata; it does not verify cryptographic validity or hardware enforcement.
Model provenance — The declared name, path, and SHA-256 of an operator-supplied source or state profile. It identifies exactly which models produced a taint result.
Project — A FAT workspace created by fat new, containing the source identity, extraction outputs, analysis, sessions, and runtime records.
Rehosting pack — YAML describing the device-specific QEMU machine, init repairs, materialized paths, network mode, and readiness validators needed to emulate an image.
Recovery status — Extraction summary: rootfs_recovered, files_only, or partial. It is derived from rootfs content evidence and unresolved branches, not from directory names.
Runtime data — Versioned, architecture-independent profiles, schemas, and helper resources in share/fat, installed with fat data install.
SARIF — Static Analysis Results Interchange Format. inspect bmc --sarif emits SARIF 2.1.0 with stable rule IDs and byte locations.
Signal — A classification input such as arch:mips or web:cgi, used by preflight and family matching.
Source profile / state profile — Operator-supplied YAML for taint. Source profiles add source/sink models; state profiles map read/write/flush names into shared-state families.
Trust path — Evidence about which components can influence update, decrypt, or configuration decisions. It is a bounded static assessment, not a final authority verdict.
Validator — A readiness check run against an emulated service. A validator proves only what it checked during that run on that backend.
Security Policy
FAT is a security-research tool. If you discover a vulnerability in FAT itself (not in firmware you are analyzing with it), we appreciate a responsible disclosure.
Reporting a vulnerability
- Do not open a public GitHub issue for security problems.
- Use GitHub’s private vulnerability reporting (“Report a vulnerability” under the repository’s Security tab), or email the maintainers at support@attify.com.
- Please include a description, affected version/commit, and reproduction steps.
We aim to acknowledge reports within a few business days and will keep you updated on remediation progress.
Scope
This policy covers the FAT codebase in this repository. Findings that FAT produces about third-party firmware are the responsibility of the reporter to disclose to the relevant vendor under that vendor’s own policy.
Contributing to FAT
Thanks for taking a look. Firmware analysis is fiddly and under-tooled, so if you have a device FAT handles badly, a profile that’s wrong, or a rough edge that annoyed you, we’d like to hear about it.
About the license, up front
FAT 2.0 is under the Functional Source License, a non-compete license that becomes Apache-2.0 two years after each version ships. So it isn’t open source today, but it will be.
What that means day to day: use FAT however you like, including at work and on paid engagements. Fork it, modify it, publish what you find with it. The one thing you can’t do is build a competing product or service out of it while the restriction is still live — if that’s what you have in mind, talk to us and we’ll work something out.
We went this way because Attify is a small company and FAT is a real product rather than a side project. It felt better than keeping it closed.
Getting set up
FAT is a Rust workspace. You need Rust 1.91 or newer via rustup; rust-toolchain.toml pins the channel and the rustfmt/clippy components. The external tools list shows what FAT can orchestrate, and fat doctor tells you what’s actually installed on your machine.
All workspace crates use the Rust 2024 edition and Cargo resolver 3.
The formatter retains the existing style independently of the language edition.
Tests that need environment variables or a different working directory should configure an isolated child process with tests/support/subprocess.rs.
cargo build # build everything
cargo test # run the full test suite
cargo test -p fat-toolkit-core # test a single crate
cargo test --test test_preflight -- test_preflight_from_signals
Some integration tests spawn the fat binary and use host tools like mke2fs (e2fsprogs) and timeout (coreutils). On macOS, install GNU coreutils if you want those to run locally.
Most suites under tests/integration/ are hermetic. Anything needing a live emulation backend, an external target, or a proprietary artifact is individually ignored or gated, so cargo test --workspace should pass on a normal machine.
Before you open a PR
Run the same checks the acceptance gate does:
cargo fmt --all --check
cargo clippy --workspace --all-targets # must be clean; warnings are errors
cargo test --workspace
cargo test -p firmware-analysis-toolkit --test test_kernel_profile_consistency
python3 scripts/build-runtime-data-bundle.py --check
python3 -m unittest discover -s tests/release -p 'test_install*.py'
Documentation is an mdBook built from docs/ and published to GitHub Pages.
docs/SUMMARY.md defines the navigation; add new pages there.
Preview with mdbook serve and open http://localhost:3000.
Fence code blocks with a language (bash, json, yaml, text) so mdBook applies syntax highlighting.
Before opening a documentation PR, run mdbook build and python3 scripts/check-doc-links.py to catch broken chapters, links, and anchors.
The clippy policy lives in the root Cargo.toml under [workspace.lints]. A handful of design-level lints are allowed there; everything else has to pass.
What’s most useful to work on
The highest-value contributions are usually data rather than code:
- Bootloader profiles (
profiles/bootloader/*.json) — if you’ve torn down a device and know its U-Boot quirks, that’s exactly the thing. - Family signals — the heuristics in
fat_familythat map firmware traits onto device families. - Backend adapter documentation (
backends/) — how a given emulation backend behaves in practice, including where it fails. - Plugin interfaces —
fat_plugin_apiis the surface for building on FAT without touching the core.
For profile changes, include a small example or a validation result so we can check it against something real.
Two asks. Don’t upload vendor firmware images, extracted filesystems, or anything else you don’t have the right to redistribute — point at where you got it instead. And if a change includes code you didn’t write, or your employer owns your work, mention it in the PR; it’s much easier to sort out before review than after.
Pull requests
Keep them focused and reference the issue they close (Closes #NN). Match the style of the code around you, and add or update tests when behavior changes.
If it changes user-facing behavior, add a line under Unreleased in CHANGELOG.md.
Use Conventional Commit PR titles: feat: for compatible additions, fix: for fixes, and ! for breaking changes, such as feat(cli)!: rename an option.
These feed release-note drafts; maintainers review the version and user-facing wording before publication.
See RELEASING.md for the release workflow.
If it changes the workspace layout, a key abstraction, or the CLI surface, update AGENTS.md — it’s the shared instruction file for coding agents, and CLAUDE.md is just a one-line import of it.
If you’re planning something large, open an issue first so we can talk it through before you spend the time on it.
Security issues
Please don’t open a public issue for a vulnerability. SECURITY.md has the disclosure process.
Participation in this project is governed by our Code of Conduct.
Development
cargo build
cargo test --workspace --locked
cargo test -p fat-toolkit-core
cargo test -p firmware-analysis-toolkit --test test_cli_bootstrap
Integration tests live in tests/integration/ and use temporary directories for filesystem isolation.
Toolchain requirements, the PR checklist, and the acceptance-gate commands are in Contributing. See Architecture for the crate layout and extension points, and the Code of Conduct before submitting a change.
Documentation
The documentation site is an mdBook built from docs/:
mdbook serve
Open http://localhost:3000. docs/SUMMARY.md defines the navigation; add new pages there. Run mdbook build and python3 scripts/check-doc-links.py before opening a documentation PR.
Releasing FAT
FAT releases are created on request from tested commits on master.
Use cargo-release for shared version updates, git-cliff for release-note drafts, cargo-dist for platform archives and release automation, and GitHub CLI for maintainer actions.
The GitHub release is the download page; the README badge and latest-release link follow it automatically.
Version and timing
| Kind | Example | Use |
|---|---|---|
| Major | 2.4.3 → 3.0.0 | Breaking changes to documented commands, JSON, configuration, or plugin interfaces |
| Minor | 2.4.3 → 2.5.0 | Compatible features |
| Patch | 2.4.3 → 2.4.4 | Compatible fixes |
| Preview | 2.5.0-alpha.1, 2.5.0-rc.1 | Testing before a regular release |
Use one product tag, vMAJOR.MINOR.PATCH, and the release title FAT MAJOR.MINOR.PATCH.
All workspace crates and the accompanying runtime data use that version.
Runtime-data bundles declare compatibility with the exact executable version they accompany.
Review accumulated changes roughly every two weeks; release when there is a useful tested update, and ship urgent fixes as needed.
Regular releases are marked Latest; previews are prereleases.
“Prepare the next FAT release” means a reviewed version update and draft release. “Publish the next FAT minor release from master” includes publishing after the checks below pass.
Tools
Install the tested maintainer tools, or use their official prebuilt binaries:
cargo install cargo-release --version 1.1.6 --locked
cargo install git-cliff --version 2.14.2 --locked
cargo install cargo-about --version 0.8.2 --locked
cargo install cargo-dist --version 0.33.0 --locked
gh auth status
GitHub CLI (gh) is installed separately through its installation guide.
All workspace crates are publishable; the GitHub release remains the source of the binary archives and the runtime-data bundle, and Publish to crates.io covers the registry step.
Registry publishing uses a crates.io token from cargo login locally, or the CARGO_REGISTRY_TOKEN secret through the Publish to crates.io workflow.
Prepare a version
Start in a clean, dedicated worktree based on current origin/master.
For the first regular release use release_version=2.0.0; subsequently choose the next SemVer version.
release_version=2.0.0
release_tag="v$release_version"
cargo release version "$release_version" --workspace
cargo release version "$release_version" --workspace --execute --no-confirm
cargo release replace --workspace --execute --no-confirm
python3 scripts/build-runtime-data-bundle.py --check
The first command previews the changes.
The execute steps update Cargo manifests, dependency requirements, the lockfile, runtime-data metadata, citation metadata, runtime-data asset names in dist-workspace.toml, and the README’s pinned source-install command.
README source-install instructions stay on the regular release when preparing a preview.
Review the diff before committing it.
Release notes
The first regular release uses the curated introduction in release-notes/v2.0.0.md. It describes the product, highlights, installation, and migration from FAT 1.x. It is the baseline for subsequent release notes.
release_notes=release-notes/v2.0.0.md
For later releases, generate a draft from the previous published FAT tag:
previous_tag=v2.0.0
mkdir -p release-notes
release_notes="release-notes/$release_tag.md"
git cliff "$previous_tag..HEAD" --tag "$release_tag" --output "$release_notes"
cliff.toml groups features, fixes, performance improvements, and other changes.
It recognizes FAT SemVer tags and excludes historical QEMU tags.
Nonconventional commits remain visible for review; routine documentation, test, CI, style, and release-maintenance commits are omitted unless breaking.
Review the generated notes, preserve useful entries already under Unreleased, and add the finalized release section to CHANGELOG.md while retaining its history.
Keep the notes focused on user-visible changes, including migration instructions for breaking changes.
Include an absolute link to the tagged installation guide so the notes can also serve as the binary bundle’s README.
Commit the version, notes, and changelog through a release PR.
Validate the release PR
Run the checks from CONTRIBUTING.md:
cargo fmt --all --check
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked -- --test-threads=1
python3 -m unittest discover -s tests/release -p 'test_*.py'
python3 scripts/build-runtime-data-bundle.py --check
dist generate --check
dist plan
The Release workflow builds portable archives on native GitHub runners for macOS Apple Silicon and Intel, Linux x86-64 and ARM64, and Windows x86-64.
Linux x86-64 uses Ubuntu 22.04 (glibc 2.35); ARM64 uses Ubuntu 24.04 (glibc 2.39).
Both Linux archives are also tested on Fedora 42.
Each archive contains the executable, matching share/fat runtime data, release notes, and dependency license notices.
Compression libraries are built from their bundled sources to avoid dependencies on runner-specific Homebrew or Linux packages.
Pull requests build and test the archives without publishing them. The smoke checks extract each archive into a fresh directory, verify its checksum, run the executable, verify the bundled data, and exercise identification and MCU inspection with a synthetic input. The Linux and macOS jobs also run the source installer’s regression tests, including pinned-provider upgrades and extraction verification. They also inspect native shared-library dependencies on macOS and Linux. The workflow stops before publication if any build or smoke check fails.
dist-workspace.toml is the source of truth for the generated .github/workflows/release.yml.
Change the configuration or reusable setup/smoke workflow, then run dist generate; do not hand-edit the generated workflow.
Release builds use the compiler pinned in rust-toolchain.toml; the minimum supported source-build compiler is Rust 1.91.
For a local archive build:
python3 scripts/prepare-release-resources.py
bash scripts/generate-third-party-licenses.sh target/release-resources/third-party-licenses.json
LZMA_API_STATIC=1 BZIP2_NO_PKG_CONFIG=1 dist build --artifacts=local --target TARGET
python3 scripts/smoke-release.py target/distrib/firmware-analysis-toolkit-TARGET.tar.gz --version "$release_version"
Replace TARGET with the host’s Rust target triple and use .zip on Windows.
The archive contains fat or fat.exe alongside share, so keep them together after extraction.
Archives use the package name and target triple; the enclosing GitHub release tag identifies their version.
The separately installable runtime-data archive retains the name fat-data-VERSION.zip.
Merge, tag, and publish
Merge the release PR after its validation and platform checks pass.
Use a clean checkout of the exact merged commit on origin/master, and verify the workspace version matches the intended tag.
Create the product tag on that commit:
release_tag="v$release_version"
cargo release tag -p firmware-analysis-toolkit
cargo release tag -p firmware-analysis-toolkit --execute --no-confirm
git push origin "refs/tags/$release_tag"
Create a draft with the reviewed release notes:
gh release create "$release_tag" --verify-tag --draft \
--title "FAT $release_version" --notes-file "$release_notes"
If a draft already exists, update its notes and target commit instead of creating another. Remove obsolete assets from that draft before the first cargo-dist run. Never replace assets or move tags belonging to a published version.
Publication is an explicit workflow dispatch; pushing a tag alone does not publish:
gh workflow run release.yml --ref "$release_tag" -f tag="$release_tag"
The workflow rebuilds and tests the tagged code, uploads the archives and checksums to the draft, and publishes it only after every platform passes.
A dry run uses -f tag=dry-run and leaves releases untouched.
For a regular release, confirm it is marked Latest:
gh release edit "$release_tag" --prerelease=false --latest
For a preview, use --prerelease=true --latest=false instead.
Verify the published tag, release notes, asset list, and checksums by downloading the release assets.
The GitHub sidebar and README badge follow the latest regular release.
Publish to crates.io
crates.io is a second distribution channel; the GitHub release remains the source of the binary archives and the runtime-data bundle.
Publish the workspace crates from the release tag only after the GitHub release and its fat-data-VERSION.zip asset exist, because the data bundle pins the exact executable version.
cargo login # once; the workflow uses the CARGO_REGISTRY_TOKEN secret
release_version=2.1.0
git switch --detach "v$release_version"
bash scripts/publish-crates.sh --dry-run
bash scripts/publish-crates.sh
The script publishes in dependency order, skips versions already visible in the index, and waits for each crate before publishing its dependents. crates.io throttles new crate names to one every ten minutes after a burst of five, so the first publish of the workspace takes roughly eighty minutes; later releases are version updates and complete in one run. A run that stops partway resumes from the same tag with the same command.
Verify the release:
cargo install --locked firmware-analysis-toolkit --version "$release_version" --root /tmp/fat-crates
/tmp/fat-crates/bin/fat data install --release
Only fat-toolkit-plugin-api is a supported library API; the other fat-toolkit-* crates are published because the CLI depends on them and may change between minor releases.
A published version cannot be deleted: yank the whole set with cargo yank and publish a patch, and never yank a single crate while its dependents are published.
FAT licensing
FAT 2.0’s first-party code, profiles, backend adapter documentation, and runtime data use FSL-1.1-ALv2, except for the components listed below. This page explains the arrangement; the actual license text controls.
Use and contributions
Internal commercial use, permitted modifications and forks, and contributions are welcome. FSL restricts one thing: a Competing Use, which the license defines as making FAT available to others in a commercial product or service that substitutes for FAT, substitutes for something Attify already offers using FAT, or provides substantially similar functionality. Everything else is a Permitted Purpose. Because the restriction turns on making FAT available to others, using FAT to do your own work — including work you are paid for — is not a Competing Use. FSL does not require you to publish your modifications.
What you can do without asking us
| Scenario | Permitted |
|---|---|
| Running FAT on your own firmware, internally | Yes — explicitly a Permitted Purpose |
| A consultant running FAT during a paid client assessment and delivering the findings | Yes — you are using FAT to perform a service, not making FAT available to your client |
| Publishing research, tutorials, or analysis output produced with FAT | Yes — the output is not the Software |
| Modifying FAT and running your fork internally | Yes |
Scripts, pipelines, and internal automation that call the fat CLI | Yes |
| Redistributing FAT, modified or not, for a Permitted Purpose | Yes — keep the license text and the copyright notices |
| Selling a product or hosted service that includes FAT or reproduces substantially similar functionality | Needs permission |
| Using the FAT or Attify names on a fork, or presenting it as an official release | Needs permission — a trademark matter, separate from the license |
A free download attached to a commercial service is not automatically outside the restriction; what matters is whether the overall offering competes. Note that the restriction reaches only commercial products and services, so a genuinely non-commercial fork with similar functionality is a Permitted Purpose.
Attify may negotiate commercial terms, including fees or revenue share, or choose not to grant an exception. No royalty or revenue share arises automatically from FSL. These arrangements cannot override third-party rights. Contact Attify through https://www.attify.com/ for commercial licensing.
Each version becomes additionally available under Apache-2.0 two years after Attify first makes it available. Public commits can start this period before a package or release is published. Release notes should record the first-available date and the corresponding Apache-2.0 date, without postponing an earlier date. See the FSL FAQ for examples. Before conversion, describe FAT as source available, not OSI-approved open source.
Component exceptions
scripts/fat-hook-plugin.cis a separate optional component under GPL-2.0-or-later. See LICENSES/GPL-2.0-or-later.txt. Its QEMU API headers and linked dependencies keep their own terms. FSL and commercial permissions from Attify do not replace those obligations. FAT releases must not include a compiled hook or QEMU binary without a separate distribution/compliance review. Repository separation or loading a plugin dynamically does not itself decide compatibility.- Third-party dependencies, adapted files, and assets keep their existing terms and notices. Consult THIRD_PARTY_NOTICES.md and each file’s attribution. The generated Rust license report is an inventory, not proof that all native code and external artifacts have been cleared.
CODE_OF_CONDUCT.mdadapts Contributor Covenant 2.1 under CC BY 4.0.- License documents retain their respective authors’ terms.
FAT 1.x transition
FAT 2.0 is a rewrite published under new terms.
The previously published FAT 1.x history remains MIT.
The publication procedure preserves the last v1 commit on v1.x and v1.0-final, then adds the reviewed v2 snapshot as a new commit on a branch descended from v1.
These references must be created before publication; this document does not assert that the migration has already happened.
The first public v2 release notes must link to that transition commit and the preserved v1 tag. Previously granted MIT permissions are not revoked. Preserve any other pre-existing grants to recipients as well.
Contribution and trademark policy
Profiles under profiles/, adapter documentation under backends/, and plugin interfaces remain public contribution surfaces.
Start with a focused PR and include a small example or validation result.
Never submit vendor firmware, extracted filesystems, or third-party material without the necessary rights.
See CONTRIBUTING.md for how to get started.
The software license does not grant general rights to Attify branding. Do not imply that a fork is an official Attify release or endorsed by Attify. Accurate attribution remains appropriate. This policy does not claim registered marks or prohibit otherwise lawful descriptive use.
Third-Party Notices
FAT source code is distributed under the repository license. Rust and Python
dependencies remain subject to the licenses declared by their respective
projects. The locked Rust dependency graph is checked against about.toml by
scripts/generate-third-party-licenses.sh. Every binary release bundle must
include the generated third-party-licenses.json, which contains the detected
license expressions, copyright notices, and license texts.
The public source tree intentionally does not redistribute firmware images, Linux kernel binaries, U-Boot binaries, proprietary model files, or extracted device filesystems. Configuration records may identify external tools or asset classes, but they do not grant a right to obtain or redistribute those assets.
Users are responsible for acquiring external analysis targets and emulation assets lawfully and for complying with their licenses. SHA-256 verification establishes file identity only; it does not establish publisher authenticity or legal permission.
The optional external-asset verifier recognizes two Linux kernel files observed
in a local FirmAE installation by SHA-256. FirmAE ignores its binaries/
directory, so FAT has not established their source revision, license, build
configuration, or corresponding-source completeness. They are never included
in FAT source, data bundles, crates, or release archives. Redistribution must
remain disabled until those obligations are independently resolved.
Optional QEMU hook
scripts/fat-hook-plugin.c is separately licensed GPL-2.0-or-later; see LICENSES/GPL-2.0-or-later.txt.
QEMU plugin API headers must be checked at the exact supported QEMU revision.
Do not assume a permissive header exception.
Build and redistribution review must include QEMU/GLib terms, source, notices and any combined-work obligations.
No compiled QEMU hook or QEMU executable belongs in an ordinary FAT release bundle.
Historical FAT 1.x QEMU downloads are a separate distribution record. Replacing the source tree does not remove release-body attachments or resolve obligations from earlier binary distribution. A written source offer is one GPLv2 compliance route, not an automatic requirement for every distribution. Attify must review what was actually distributed and which source/offer route applied.
Code of Conduct
Our pledge
We as members, contributors, and maintainers pledge to make participation in our project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
Our standards
Examples of behavior that contributes to a positive environment:
- Being respectful of differing viewpoints and experiences
- Giving and gracefully accepting constructive feedback
- Focusing on what is best for the community
Examples of unacceptable behavior:
- Harassment, insulting or derogatory comments, and personal attacks
- Publishing others’ private information without explicit permission
- Other conduct which could reasonably be considered inappropriate
Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the maintainers at support@attify.com. All complaints will be reviewed and investigated promptly and fairly.
This Code of Conduct is adapted from the Contributor Covenant, version 2.1.
The adapted text is available under CC BY 4.0. See the upstream version.
Changelog
[Unreleased]
Added
-
Native ESP-IDF partition-table discovery in
identify,inspect headers, andinspect layout, including custom table locations, optional MD5 validation, legacy tables, and separate file offsets and flash addresses. -
inspect symbolslists ELF symbols with byte sizes, section and region filters, batched name input, bounded hex previews, demangling, text/CSV/JSON output, and two-file symbol diffs.
[2.1.0]
See the release notes for installation and upgrade instructions.
Added
-
fat data install --releasedownloads thefat-data-<version>.zipand.sha256assets for the running executable, verifies them, and activates the data, so acargo installorcargo binstallsetup needs one follow-up command.--archivestill installs a local directory or ZIP for offline or pinned installs. -
decompile --scriptapplies repeatable r2 rename/comment scripts after analysis and beforepdg, soafn,afvn, andCCnames reach the emitted pseudocode. Missing scripts and failed script lines report their path and line. -
experiment external validatechecks pinned external campaign setup, replay inputs, evidence, timeouts, and cleanup declarations.experiment external runexecutes one exact argv replay and stores its input, logs, outcome, and cleanup result in the existing FAT session and artifact model. -
debug redfish-sessiontests session creation, ReadOnly cross-account denial, an administrator positive control, target restoration and token revocation on an emulated BMC.debug processattaches userspace GDB over an owned temporary SSH forward and records process identity, detach and cleanup results. -
Hash-pinned BMC profiles for native full-flash and vendor-kernel boot, including verified FIT kernel/DTB/initramfs assets, explicit DTB adaptations, private snapshot flash, and fresh loopback Redfish readiness observations.
-
inspect bmcreports raw flash layout, FIT authentication metadata, located BMC markers, and CRC-validated U-Boot environments with text, JSON, and SARIF output.
Changed
- Expanded BMC inspection and native JFFS2 guidance in the command help and documentation, including extraction outcomes, case-sensitive storage, and source-build availability.
- Replaced Binwalk with binwalk-ng 4.0.0 in the source installer, including upgrades of existing installations.
- Added automatic installation of Sasquatch and lzop for SquashFS and LZO extraction.
- Raised the minimum supported Rust version to 1.91.
- Installation documentation now leads with the prebuilt release archives and
cargo binstall;cargo installis documented as the source-build path, and the CLI carriescargo binstallmetadata so the matching cargo-dist archive is fetched instead of compiling. - FAT publishes to crates.io as
firmware-analysis-toolkit, socargo installandcargo binstall firmware-analysis-toolkitinstall the CLI; thefat-toolkit-*crates are published as its dependencies.scripts/publish-crates.shpublishes them in dependency order, and thePublish to crates.ioworkflow exposes it as a maintainer dispatch.
Fixed
-
decompilereports r2ghidra’s install hint as an error instead of writing it to the raw C output as if it were pseudocode. -
Native debug commands attach to recorded Unix serial/monitor sockets; inactive runs no longer advertise historical validated surfaces as current.
-
Gzip outputs use artifact-ID/format directories (for example,
0004-gzip) instead of implying that every compressed payload is a kernel. -
Raw bootloader assignments are reported as
raw_env_hints, separately from imported environment values and CRC-validated BMC environments. Raw strings no longer generate boot-policy findings or seed emulation settings. -
Native JFFS2 extraction reconstructs fragmented and versioned files before decoding embedded gzip streams, preserving CRC checks and per-artifact failures.
[2.0.1]
See the release notes for installation and retry instructions.
Added
- Native recursive ZIP, TAR, and gzip extraction with SquashFS 2/3/4 decoding, including both byte orders and legacy LZMA block layouts.
- Extraction manifests include per-artifact lineage, decoder outcomes, limits, and recovery status.
- An Arch Linux and Omarchy installation guide with tested prerequisites, optional tools, and extraction verification steps.
Fixed
- Carved images and empty output directories no longer stop rootfs recovery attempts.
- Healthy bootloader tmux sessions are reused on tmux versions that sanitize control characters in display formats.
- Binwalk runs that exit without scanning any files are retried up to twice within the original timeout, preserving failed attempts and reporting a failure if scanning never starts.
- Automatic native dependency installation recognizes Omarchy and other distributions declaring
ID_LIKE=arch, while preserving explicitly supported distribution recipes.
[2.0.0]
First regular release of the Rust-based FAT CLI. See the release notes for capabilities, installation, and migration from FAT 1.x.
Added
- A shared Rust CLI for firmware identification, extraction, binary and filesystem analysis, and emulation workflows.
- Versioned runtime-data bundles with installation and integrity verification.
- Portable archives with bundled runtime data for macOS Apple Silicon and Intel, Linux x86-64 and ARM64, and Windows x86-64.
- A maintainer release workflow using
cargo-release,git-cliff,cargo-dist, and GitHub CLI, with synchronized versions and release links in the README. identifyandinspect mcushow compact overviews by default.--detailsexpands related findings into grouped reference tables; JSON stays unchanged.inspect mcureports bounded Thumb code and function candidates, referenced strings, recovered initialization descriptors, and decoded MMIO accesses. Literal address references remain separate from reads/writes. LPC13xx and Cortex-M3 register names carry documentation sources, alias conditions, and profile-selection provenance; unsupported control flow remains unresolved.
Fixed
- Identification and MCU tables have outer borders and row separators. MCU hardware tables label register addresses and operations explicitly.
- Report tables use a shared renderer; Unicode borders and section dividers remain visible when ANSI colors are disabled.
- MCU terminal output omits the security-controls summary table.
- MCU register descriptions retain chip and DLAB conditions without repetitive proof disclaimers; register metadata uses direct descriptions of observations.
- Default identification and MCU inspection reports omit unmatched sections, absent-feature rows, and explanatory notes/limits footers, keeping matched findings and measurements prominent. JSON diagnostics are unchanged.
identifyandinspect mcushare readable terminal reports with semantic colors, grouped evidence, wrapping tables, and narrow-terminal layouts. Confidence labels no longer display invented percentages; identity rows group repeated text while retaining every offset. Plain text and JSON remain usable without color, and analysis results are unchanged.- Fast and detailed MCU reports share vector bounds and populated-handler counts, distinguishing core exceptions, external IRQs, reserved slots, and unpopulated slots. Shared targets no longer imply default handlers or an interrupt-driven execution model. Vendor address/identity rules live in family profiles, and wide conditional Thumb branches use the correct encoding.
- MCU identification retains vector evidence independently of family and load address, recognizes LPC13xx boot ROM mappings, and reports ASCII/UTF-16LE identity evidence with offsets.
identifyandinspect mcushare this assessment; explicit bases participate in startup addressing. - Repeated image copies and uniform fill are measured separately. Repeated blocks alone no longer imply ECB encryption or trigger encryption gates. Known containers are selected by format signatures rather than entropy; UTPK recognition requires its fixed-position TEA marker as well as its magic.
FAT 2.1.0
FAT 2.1.0 adds external campaign evidence, scriptable decompilation, and Cargo installation paths, alongside BMC inspection and native JFFS2 recovery.
Install
Prebuilt archives remain the default: download the archive for your operating system and CPU, verify its adjacent SHA-256 checksum, and keep the executable and share directory together.
Cargo is now a supported path:
cargo binstall firmware-analysis-toolkit
cargo install --locked firmware-analysis-toolkit
fat data install --release
fat doctor
cargo install compiles the dependency tree and needs Rust 1.91 or newer plus a C compiler.
Both Cargo paths install only the fat executable, so fat data install --release downloads and verifies the runtime-data bundle for the installed version.
The CLI carries cargo binstall metadata for these archives, so the prebuilt path does not compile anything.
On Arch Linux or Omarchy, the source installer still handles system packages and optional tools.
External campaign evidence
fat experiment external records bounded work performed by an external engine.
The manifest pins setup artifacts and retained evidence by SHA-256, each case names one exact input, argv vector, timeout, and accepted exit codes, and cleanup is declared and executed with its own timeout.
validate checks the whole contract before execution, and run stores the input, logs, outcome, and cleanup result in the existing FAT session and artifact model so the replay can be audited later.
Decompilation scripts
fat decompile --script applies repeatable r2 scripts after analysis and before pdg, so afn, afvn, and CC renames and comments reach the emitted pseudocode.
Script failures report the script path and line, and r2ghidra’s install hint is reported as an error instead of being written as pseudocode.
BMC and firmware extraction
inspect bmcreports raw flash layout, FIT authentication metadata, located BMC markers, and CRC-validated U-Boot environments with text, JSON, and SARIF output.- Hash-pinned BMC profiles cover native full-flash and vendor-kernel boot, with verified FIT kernel, DTB, and initramfs assets, explicit DTB adaptations, private snapshot flash, and fresh loopback Redfish readiness observations.
debug redfish-sessiontests session creation, ReadOnly cross-account denial, an administrator positive control, target restoration, and token revocation on an emulated BMC.debug processattaches userspace GDB over an owned temporary SSH forward and records process identity, detach, and cleanup results.- Native JFFS2 reconstruction validates node and data CRCs, applies inode versions and dirent deletions, and preserves per-artifact failures.
- Gzip outputs use artifact-ID/format directories instead of implying a kernel role, and raw bootloader assignments stay separate from validated environments and emulation inputs.
Tooling
- The source installer uses binwalk-ng 4.0.0, installs Sasquatch and lzop, and the minimum supported Rust version is 1.91.
- FAT is published on crates.io as
firmware-analysis-toolkit; thefat-toolkit-*crates are its dependencies and onlyfat-toolkit-plugin-apiis a supported library API.
Upgrade from 2.0.1
Install the fat-data-2.1.0.zip bundle that accompanies this release; fat data install --release selects it automatically for a 2.1.0 executable.
Existing FAT 2.0.1 projects continue to load.
Full details are in the changelog and the installation guide.
FAT 2.0.1
FAT 2.0.1 fixes extraction failures in nested firmware archives and older SquashFS images, and improves installation on Omarchy and Arch-based systems. If your firmware stopped at extraction in 2.0.0 or FAT 1.x, this is the version to try again.
Firmware extraction
- Native extraction follows ZIP, TAR, and gzip containers into embedded filesystems, including SquashFS 2, 3, and 4 with either byte order and zlib, LZMA, and XZ decoding. Legacy LZMA block layouts are supported too.
- Carved images and empty directories no longer stop rootfs recovery attempts. Automatic extraction keeps fallback available when native recovery is incomplete.
- Extraction manifests record each artifact’s source, decoder outcome, limits, and recovery status, so you can see which parts succeeded and which still need attention.
Verification for #108 recovered root filesystems from all 11 tested firmware inputs, including the RAX30 image from #88, TL-WR940N from #58, and the attachment from #70. Across those inputs, 21,351 regular files and symlinks matched the reference extractions with no differences. Guest boot and network services still need separate testing for the open emulation reports.
Firmware containing names that differ only by case needs a case-sensitive output volume. On macOS, use a case-sensitive APFS volume or disk image. FAT reports a partial result on a filename collision instead of overwriting files.
Installer and tool fixes
- The installer recognizes Omarchy and other distributions that declare
ID_LIKE=arch. The Arch and Omarchy guide covers prerequisites and extraction checks. - Binwalk attempts that exit without scanning a file are retried up to twice within the original timeout. If scanning never starts, FAT reports the failure and preserves the failed attempts.
- Existing healthy bootloader tmux sessions are reused with newer tmux versions that sanitize control characters in display formats.
These fixes were merged in #107.
Install and retry
Download the archive for your operating system and CPU, verify its adjacent SHA-256 checksum, and extract it. Keep the executable and share directory together; the runtime data must match FAT 2.0.1.
./fat --version
./fat data verify
./fat doctor
./fat extract ./firmware.bin --json
On Windows, use .\fat.exe instead of ./fat. For scripts, inspect recovery_status and rootfs: files_only and partial results can still exit successfully, so an exit code of zero alone does not confirm rootfs recovery.
Archives are available for macOS Apple Silicon and Intel, Linux x86-64 and ARM64, and Windows x86-64. Linux x86-64 requires glibc 2.35 or newer; Linux ARM64 requires glibc 2.39 or newer.
See the installation guide for source builds, runtime-data installation, and external tools. When following up on an issue, include the firmware version or download URL, its SHA-256, fat --version, and the new output so the result can be reproduced.
FAT 2.0.0
FAT 2.0 is the first regular release of the Rust-based Firmware Analysis Toolkit.
It brings firmware identification, extraction, binary and filesystem analysis, and emulation workflows into the fat command-line interface.
Highlights
- Identify unknown firmware: recognize containers, compressed data, raw MCU images, and repeated regions before choosing an analysis workflow.
- Inspect Cortex-M firmware: recover vector tables, address mappings, startup paths, referenced strings, and decoded peripheral accesses, with profile-backed device-family information.
- Explore binaries and filesystems: inspect ELF files, trace data flow, map startup behavior, and search extracted firmware.
- Work through a firmware project: create a project, extract its files, analyze it, and prepare QEMU-based emulation with explicit backend prerequisites.
- Read focused reports: compact summaries, semantic colors, bordered tables,
--detailsfor supporting tables, and JSON for structured output. - Install versioned runtime data: ship the matching profiles and helper resources with the executable and verify their contents with
fat data verify.
Installation
Download the archive matching your operating system and CPU:
| System | CPUs | Format |
|---|---|---|
| macOS | Apple Silicon, Intel | .tar.gz |
| Linux, including Fedora | x86-64, ARM64 | .tar.gz |
| Windows | x86-64 | .zip |
Verify it against its adjacent .sha256 file and extract it.
Keep the executable and share directory together, then run:
./fat --version
./fat data verify
./fat doctor
./fat identify ./firmware.bin
On Windows, use .\fat.exe instead of ./fat.
Linux x86-64 requires glibc 2.35 or newer; Linux ARM64 requires glibc 2.39 or newer.
Linux bundles are tested on Ubuntu and Fedora 42.
The release also provides a runtime-data ZIP for Cargo installations and tagged source archives. See the installation guide for source installation and external analysis tools.
Upgrading from FAT 1.x
FAT 2 uses a new Rust CLI and project workflow.
Install it separately from FAT 1.x and follow the current installation guide; the older setup.sh, fat.py, and fat.config instructions apply to FAT 1.x.
Keep existing FAT 1.x workspaces and recreate the projects you need with fat new ./firmware.bin.
License
FAT 2.0 is source available under FSL-1.1-ALv2. Third-party components retain their own licenses, included with the binary bundles.
See the changelog for detailed changes.
Offline BMC OEM validation — 2026-10-18
Scope and result
The existing fat inspect bmc implementation was exercised against six local
OEM firmware artifacts. Three images have corroborating MegaRAC/SP-X evidence:
Gigabyte MZ32-AR0 12.61.39, ASRock B650D4U 7.02.00, and ASUS ESC8000-E12 1.20.02.
Their freshly extracted usr/local/bin/flasher executables contain
MegaRAC Firmware Upgrade Utility, and their filesystem trees contain
spx_restservice and associated SP-X libraries. Both executables were checked
byte for byte with independent extraction methods.
This closes the absence of representative MegaRAC artifact testing for the implemented offline inspection and filesystem extraction features. It does not establish complete support for every OEM container, proprietary signature verification, device-selected boot paths, or hardware enforcement. No firmware was executed or flashed, and no controller was contacted. Hardware testing was explicitly excluded by the user for this run.
The initial baseline used unchanged FAT source. A follow-up investigation identified missing JFFS2 reconstruction behind the three MegaRAC partial results; the native extraction fix and fresh results are recorded below. Supermicro X11 rootfs recovery remains unresolved.
Initial baseline build identity
- Implementation commit:
3fe6b6922f40bee12f1d05343e3d2aa5e68d091b. - Implementation branch:
bmc/firmware-inspection, based on FAT 2.0.1. - Executed binary: the existing
fat-bmc-inspection/fat/target/debug/fat. - Binary SHA256:
8ebaf4dd176c772a76f6fe2e4d5b4e52929c0502947955f24fe92b60f383be75. - Validation worktree:
bmc-megarac-validation/fat. - Validation branch:
fix/bmc-megarac-validation, based on that exact commit. - Host: macOS. Extraction was repeated on a newly created case-sensitive APFS disk image when the host output filesystem could not represent the firmware filenames.
Initial baseline results
Filesystem counts below are regular files inside recovered CramFS/SquashFS
trees, independently counted. They exclude symlinks, directories, and separately
decompressed gzip artifacts. partial is the actual aggregate extraction status,
even when both filesystem trees recovered.
| Artifact | FIT metadata | Recovered filesystem regions | Regular files | Aggregate extraction status | Warning-gate exit |
|---|---|---|---|---|---|
| Gigabyte MZ32-AR0 12.61.39 | No FIT detected | CramFS at 0x560000 and 0x2fd0000 | 3,853 | partial: six additional gzip candidates failed | 0 |
| ASRock B650D4U 7.02.00 | FIT at 0x26a0040; two SHA256 image hashes; no signature nodes | SquashFS at 0x510000 and 0x2af0000 | 2,599 | partial: six additional gzip candidates failed | 1 |
| ASUS ESC8000-E12 1.20.02 HPM package | FIT at 0x27d00e5; six SHA256 image hashes; no signature nodes | SquashFS at 0x4100a5 and 0x2c800a5 | 3,291 | partial: three additional gzip candidates failed | 1 |
| Supermicro X12SPW 01.07.22 | FIT at 0x1d00000; four SHA256 image hashes; no signature nodes | SquashFS at 0x140000 and 0x2100000 | 1,254 | rootfs_recovered | 1 |
| Supermicro X11 01.74.13 | No FIT detected | No rootfs recovered; gzip/kernel artifacts only | — | partial | 0 |
| Lenovo SR630 XCC 10.40 comparison image | No FIT detected | SquashFS at 0x95be00 | 11,322 | rootfs_recovered | 0 |
All six images produced valid JSON and SARIF reports. The five Gigabyte, ASRock, ASUS, and Supermicro images also completed both text modes. Lenovo was checked in JSON, SARIF, and warning-gated SARIF. These are 28 inspection invocations with the expected exit statuses. Each warning-gated SARIF document was identical to its ordinary SARIF document and passed the SARIF 2.1.0 schema.
No CRC-valid U-Boot environment was found by the configured automatic search in these six inputs. That search checks 4 KiB alignment and the documented candidate sizes within the first 64 MiB. It does not establish the absence of stored environments or report a live boot policy.
Independent checks
- Each tested input matched the corresponding member of its existing local ZIP or UXZ archive by SHA256. Archive acquisition URLs were preserved from prior local records where available; no fresh vendor download was made in this run. The ASRock acquisition URL and the X11 inner-archive URL are not recorded.
fdtgettraversed each carved FIT independently: 9 nodes for ASRock, 25 for ASUS, and 13 for X12. All three contained zero signature-prefixed nodes.- The image
dataproperties were read withfdtget; Python independently recomputed all 12 SHA256 digests. Each matched both the stored FIT value and FAT’s metadata report. This validates component integrity for these files; it does not authenticate a signing identity.fdtget -t rappends one output newline, which the checker removes without stripping payload bytes. - Gigabyte’s
flasherandspx_restservicewere independently recovered by traversing CramFS inodes and decompressing their blocks with Python zlib. Both matched FAT’s output byte for byte. ASRock’s and ASUS’s equivalent files matchedunsquashfs -catoutput. Supermicro X12’setc/os-releaseand Lenovo’sbin/RF_Rootalso matched independentunsquashfsoutput. - Every reported raw marker’s bytes and offset were checked against the input. Input size/SHA256, SARIF result count, and warning-gate policy were checked against the JSON evidence.
Input identities
| Artifact filename | Bytes | SHA256 |
|---|---|---|
126139.bin | 66,060,552 | 43817b0f37c7bf98922b8120dec3755e872f1cb4df0cdeede4ebbf9ab742f5a9 |
B650D4U_7.02.00.ima | 67,109,128 | db2b83bd106b9aa65255e242e64e89ddce65fe82f37ffda537c987f67a969083 |
BHS_Gen_1.20.02.hpm | 67,109,115 | 20954d5d143552ba68be44902d3de17828d88d8f2eb5e86cd2a6584fd75f3a81 |
BMC_X12AST2600-ROT-5201MS_20260430_01.07.22_STDsph.bin | 49,020,928 | 6cc0241424d15f39d68326eadce18e168eea7a74e382ca1a3c7d43cc1b2a8799 |
BMC_X11AST2500-4101MS_20230802_01.74.13_STDsp.bin | 33,554,432 | 38bf1fd2ebd7bf0a384c0fa6ea668c8300ea5ff347590799fb8da13f7cdf2b7d |
xcc_cdi3b8d-10.40.upd | 144,410,624 | 173da196faf0fa516a4fae1b66ed9b53fd23378fa269d19531ed5909620fefea |
Interpretation and remaining limits
- The ASRock, ASUS, and X12 FIT findings describe embedded FITs. In particular,
X12 includes
sigtable@1andoptee@1images; hashes and asig_tablemarker do not interpret the proprietary table or establish outer authentication. - ASUS offsets are relative to the complete HPM package. FAT found embedded structures through scanning; this run does not establish HPM record parsing, component selection, wrapper-checksum validation, or update acceptance.
- X12’s raw
OpenBMCevidence is the compiler stringopenbmc-linux-gccat0x72c9b. Its extractedos-releaseidentifiesSupermicro BMC. Multiple ASPEED compatible strings also describe code support, not a measured SoC. - An exit status of zero means inspection completed without a warning finding under the selected policy. X11 has no FIT finding and no recovered rootfs; its zero warning-gate exit is not a security verdict.
- The baseline preserved additional gzip failures. The follow-up independently reconstructed all 15 streams from JFFS2 nodes and identified them as valid fragmented files; see the native JFFS2 results below.
- Case-insensitive macOS output failed for real case-distinct filenames. The
case-sensitive reruns recovered all listed filesystem regions. Gigabyte’s
CramFS collision originally surfaced as
File exists; SquashFS reported the case-sensitive-volume requirement explicitly. - ASRock stores
etc/defconfig/crontabswith mode0644. Counting its child required temporarily adding the owner directory-search bit to the extracted copy; its original mode was restored. Original firmware bytes were untouched. - Lenovo extraction skipped 210 special files, as recorded by FAT. No special devices were created and no extracted executable was run.
- Supermicro X11 rootfs recovery and its representation remain unresolved. This run does not attribute that failure to encryption without evidence.
- The baseline did not rerun Cargo tests because its FAT source and binary were unchanged. The implementation follow-up uses a new build and regression tests, recorded separately below.
Native JFFS2 follow-up
The 15 failing gzip candidates were valid files fragmented across JFFS2 inode nodes. Treating bytes after the first fragment as one contiguous gzip stream fed filesystem metadata into the decompressor. Independent reconstruction validated the JFFS2 header, inode, and payload CRCs and recovered all 15 complete streams, including their gzip checksums.
The fix adds native JFFS2 reconstruction to the existing recursive pipeline.
It applies inode versions, truncations, and directory-entry deletions; supports
both byte orders and none/copy/zero/zlib fragments; and publishes through
OutputTree. Reconstructed files enter the recursive queue with their original
paths and filesystem parent IDs. Private temporary snapshots allow inspection
of files under restrictive firmware permissions without changing the published
modes. This also resolves ASRock’s two unreadable crontabs/sysadmin paths.
The node layout is documented in the Linux JFFS2 format header. The implementation retains bounded work and staged publication. Bad CRCs, unsupported codecs or node types, missing fragment ranges, unreachable live directory entries, and exceeded limits remain unresolved.
Fresh native-only extraction on the same case-sensitive volume produced:
| Image | JFFS2 region offsets | JFFS2 regular files | Previously failing gzip streams recovered | Aggregate status | Unresolved artifacts |
|---|---|---|---|---|---|
| Gigabyte | 0x60000, 0x260000, 0x2f50000 | 184 | 6 | rootfs_recovered | 0 |
| ASRock | 0x110000, 0x310000 | 194 | 6 | rootfs_recovered | 0 |
| ASUS HPM | 0x2100a5, 0x30a00a5 | 100 | 3 | rootfs_recovered | 0 |
These counts cover seven JFFS2 regions and 478 regular files, including redundant copies; the second ASUS region contains only directories. All 15 reconstructed gzip files and their decompressed contents matched an independent Python reassembly byte for byte. All 16,418 existing CramFS/SquashFS file-content and symlink-target entries matched the baseline. Firmware inputs were unchanged.
The follow-up binary was built in bmc-megarac-validation/fat from commit
3fe6b69 plus the local JFFS2 patch on fix/bmc-megarac-validation.
Its SHA256 is 47fcb69d6410dcd21456a7a2e7baeadc328292c19b84ff4364cc5d12e7802447.
The saved source-patch SHA256 is
0fdda769fd7a9febe7954bc1158a5d64bc62cdd82151e10a93495f801c77d2c5.
Sixteen synthetic JFFS2 regression tests cover fragmented gzip, both byte orders, versions and truncations, deletion, obsolete/duplicate nodes, erased gaps, CRC failures, unsupported compression, decompression bounds, missing ranges, path traversal, depth/size limits, symlinks, and restrictive permissions.
Fresh verification passed: 2,055 workspace tests, zero failures, one ignored;
Clippy with -D warnings; formatting; four kernel-profile consistency tests;
and the runtime-data bundle check (33 files). The focused extraction suite
passed 90 tests with one ignored, including the 16 new JFFS2 regressions.
The new private evidence directory is .tmp/jffs2-fix/: source.patch,
source-sha256.json, FINAL-CHECKS.json, fragment-proof.json, real-image-results.json,
independent-checks.json, command logs, and the reproducible validate_real.py
and check_real.py scripts. fat-validated preserves the exact executable
used for the real-image checks. The case-sensitive disk image retains both the
baseline projects and jffs2-final-projects. This follow-up reran the three
MegaRAC images; the other corpus rows above remain baseline observations.
PR review and upstream integration
Review of the BMC parsers and CLI found no blocking correctness issue. Scoped checks passed 36 parser/model tests and seven CLI tests. FIT and environment probes rejected terminal-control payloads before text rendering.
The extraction review identified and fixed temporary snapshot retention after failed JFFS2 attempts. A regression fixture reconstructs one file, then fails on an unsupported codec; the test requires both the unpublished output and private copies to be removed. A guard now retains copies only after successful staged publication. The symlink fixture and assertions are Unix-specific; directory and depth checks still run on other platforms.
The branch incorporates upstream 28c8a40 (installer migration and Rust 1.91
minimum). Merge 1506a11 preserves those changes and the BMC/JFFS2 changelog
entries. The three MegaRAC extraction and independent-comparison runs were
repeated at that merge: all three remain rootfs_recovered, with zero unresolved
artifacts, all 15 gzip streams recovered, and all 16,418 baseline entries
unchanged. The pinned rerun binary SHA256 is
498b12597b3d00444b2b24c18f98727f07778e4fa1e7d181e582f0ce674ad6e6.
Private review and rerun evidence is in .tmp/pr-review/, including command
logs, REVIEW.md, and the real/ results. The disk image also retains
pr-review-projects.
Final preflight passed formatting, workspace Clippy with warnings denied,
2,056 Rust tests (one ignored), all four kernel-profile consistency tests,
runtime-data bundle verification, all 39 installer tests, and diff whitespace
checks. The final source also explicitly discards the retained temporary path
returned by TempDir::keep; this satisfies Clippy without changing the tested
snapshot lifetime.
Reproduction and local evidence
Use the archived baseline binary to reproduce the initial results, or build
merged commit d024d01 (PR #113) for the corrected extraction. Use
an input matching the hash table. The ordinary, detailed, and structured reports consume the same
analysis:
fat inspect bmc --file "$image"
fat inspect bmc --file "$image" --details
fat inspect bmc --file "$image" --json > inspection.json
fat inspect bmc --file "$image" --sarif > findings.sarif
fat inspect bmc --file "$image" --sarif --fail-on-warning > gated.sarif
# projects_dir must be on a case-sensitive filesystem for these OEM roots.
fat new "$image" --name "$name" --projects-dir "$projects_dir"
fat extract "$projects_dir/$name" --extractor native --json > extraction.json
The validation worktree was removed after merging. The maintainers retain the
original reports, pinned binaries, disk image, and Git history in a private
archive with a SHA256 manifest and verification script. Historical .tmp/
paths in this report describe the original runs, not files shipped with FAT.
Public reproduction uses the source commit and input hashes above; vendor
firmware and extracted filesystems are not included in the repository. The
archived evidence includes:
baseline-manifest.json,package-provenance.json,formats-manifest.json.- Per-image JSON, text, detailed, SARIF, stderr, command/exit records, and native extraction manifests, including the original case-insensitive failures.
independent-fit-checks.jsonandindependent-extraction-checks.json.baseline.py,formats.py,extract.py,check_fit.py, andcheck_extraction.py, with the exact local paths and commands used.case-sensitive.asif, preserving the additional extracted projects on a case-sensitive filesystem. Reattach withdiskutil image attach --readOnlyto inspect theFAT-BMC-CaseSensitivevolume.
See BMC inspection usage for search bounds and finding semantics.
BMC emulation validation — 2026-10-19
FAT’s native runtime was exercised with four real firmware images on macOS using QEMU 11.0.2. Each image went through a fresh fat new, native extraction, analysis, profile selection, launch, status probes and cleanup. Extraction projects used case-sensitive APFS storage. Firmware and extracted filesystems remain outside this repository.
Service results
The HTTP columns are actual unauthenticated HTTPS requests through FAT’s allocated loopback forwarding. ServiceRoot success requires a JSON Redfish ServiceRoot, not merely HTTP 200. Self-signed certificates were accepted; certificate trust was not validated.
| Image | Mode / profile | ServiceRoot | Managers | Result |
|---|---|---|---|---|
| OpenBMC Romulus | Full flash / bmc-romulus | 200, valid JSON | 401 | Service reachable |
| OpenBMC Romulus | Original FIT kernel, DTB and initramfs / bmc-romulus-vendor-kernel | 200, valid JSON | 401 | Service reachable; U-Boot bypassed, DTB unchanged |
| ASUS ESC8000-E12 BHS 1.20.02 | Vendor kernel / bmc-asus-bhs-1.20.02 | 200, valid JSON | 401 | Service reachable with HACE disabled |
| ASUS ESC8000-E12 BHS 1.20.02 | Unadapted full-flash control | No response | No response | Boot/service compatibility failure; not a supported full-flash profile |
| OpenBMC TiogaPass | Full flash / bmc-tiogapass | 200, valid JSON | 401 | Service reachable |
| ASPEED v11.04 AST2500, Linux 6.12 | Full flash / bmc-aspeed-ast2500-v11.04 | 200, valid JSON | 401 | Service reachable |
Input hashes and the official ASPEED download are listed in BMC emulation. The ASPEED archive SHA-256 matched its GitHub release asset digest before selecting the static MTD member. These results apply to those exact images and QEMU version.
ASUS adaptations and control
The source HPM SHA-256 is 20954d5d143552ba68be44902d3de17828d88d8f2eb5e86cd2a6584fd75f3a81. The flash region starts at byte 165 and spans 64 MiB. Its SHA-256 is b11136a051e0f91497d565f7f36869cea715559e567688fdc4d8316dd4c0732e.
The vendor-kernel profile extracts kernel@1 and fdt@Z14PN.dtb from the FIT at flash-relative 0x27d0040, verifies their declared SHA-256 hashes, and records:
- Original kernel:
9f9a887b9800aad5bdfced358654d6db5dec7d304c18230395a049d2112ddd91. - Original DTB:
a36c6aa6dffbd3d8b92dbb0ad556fb0fd45c197224a200ec99c6d6b309915bca. - Adapted DTB:
5b625c6ad311608949118b184dbd4167017c97d9d404513e3dba734558a44a91. - One property change:
/ahb/apb/hace@1e6d0000/status,okaytodisabled. - Explicit boot arguments:
root=/dev/mtdblock2 ro ip=none console=ttyS4,115200 rootfstype=squashfs imagebooted=1.
The original kernel and filesystem bytes are retained. Direct boot bypasses SPL/U-Boot. Four NICs use distinct restricted subnets; management HTTPS is forwarded only on loopback. This prevents the duplicate DHCP addressing observed when all NICs used the same user-network subnet.
The full-flash control retains the original bootloader and DTB. Its serial log shows an initial root-mount panic (unknown-block(0,0)) followed by a watchdog restart. QEMU reports aspeed_hace_write: Crypt commands not implemented. The restarted guest logs UDSIfcTask blocked for more than 122 seconds, with a backtrace through wait_for_completion, crypto_helper_dev_cipher_encrypt and crypto_helper_dev_ioctl, followed by a hung-task panic at guest uptime 244 seconds. Redfish did not answer the recorded probes. This agrees with the missing cipher implementation in QEMU’s ASPEED HACE model. The root-mount failure and HACE limitation are separate observations; disabling HACE is not a fix for full-flash boot selection.
Debugging and readiness checks
FAT’s recorded QEMU monitor returned VM status: running for all four images. GDB register reads worked on Romulus, ASUS and TiogaPass, and instruction disassembly worked on ASUS and ASPEED. The ASUS serial attach displayed a login prompt without supplying credentials. These are whole-system debug surfaces; userspace daemon symbols and authenticated management operations were not tested.
Pausing Romulus with fat debug monitor --command stop kept QEMU alive while FAT’s next status probe changed Redfish to not ready. Resuming with cont restored the 200/401 observations. This checks that readiness tracks current guest responses rather than a cached successful probe or a listening host port.
All validation sessions were stopped through FAT. Source and staged asset hashes were checked after execution, allocated TCP listeners closed, and stopped sessions exposed no current debug surfaces. Per-run manifests, serial/device logs, HTTP bodies/headers, debug transcripts and cleanup records were retained outside Git.
Automated verification and limits
- Workspace tests: 2,072 passed, one ignored, zero failed.
- Formatting, strict workspace Clippy, kernel-profile consistency and runtime-data validation passed.
- Installer tests: 39 passed.
- Synthetic regression tests cover malformed profiles/FDTs, FIT digest failures, exact DTB changes, staging failures, canonical validators, non-JSON 401 responses, Unix monitor exchange and inactive debug surfaces.
This validates emulated service reachability and debug access. Sensor readings, host interfaces, authenticated management operations, firmware updates and hardware boot enforcement remain unvalidated. ASUS still logs missing sensor/I2C/host-device behavior. A 401 on Managers establishes denial for that request only. See adding another BMC image for the supported profile contract and its FIT limitations.
Romulus and ASUS session/role validation — 2026-10-19
Fresh projects were created, natively extracted, analyzed and booted from the two images below. The final FAT commands then ran a complete Redfish session/role experiment while a separate FAT process-debugging command captured an authentication entry breakpoint and detached. Both completed successfully with unchanged daemon identity. Commands and fixture format are in BMC session and process debugging.
Inputs and lab changes
| Target | Input SHA-256 | Boot profile |
|---|---|---|
| OpenBMC Romulus static MTD | 7d4f776b5e1728abc1624fb698149b50425dd4efd8e2df8b711046f8649c0461 | bmc-romulus: full flash |
ASUS ESC8000-E12 BHS_Gen_1.20.02.hpm | 20954d5d143552ba68be44902d3de17828d88d8f2eb5e86cd2a6584fd75f3a81 | bmc-asus-bhs-1.20.02: vendor kernel, U-Boot bypass, HACE disabled |
The host was macOS with case-sensitive APFS extraction storage and QEMU 11.0.2. A static ARM EABI5 soft-float gdbserver was built from GNU GDB 13.2 source and copied into each guest’s /tmp. GDB used matching extracted executables/libraries. Neither image supplied full daemon debug symbols.
Lab setup used authenticated console/Redfish access and ephemeral QEMU snapshot writes. It provisioned an SSH key and disposable fatreader/fattarget ReadOnly accounts. ASUS required the administrator’s first-login password change and the reader’s password-change completion. Its non-console defshell refused SSH commands; the lab explicitly changed the sysadmin shell to /bin/sh in /conf/passwd. These changes were not added to FAT’s boot profiles and do not establish that an unmodified ASUS image exposes a usable SSH shell.
Final HTTP observations
The target account started enabled. A fresh administrator GET checked state after each attempted mutation.
| Check | Romulus | ASUS |
|---|---|---|
| Administrator / reader session creation | 201 / 201 | 201 / 201 |
| Anonymous Managers GET | 401 | 401 |
| ReadOnly Managers GET | 200 | 200 |
ReadOnly PATCH of other account Enabled: false | 403 | 403 |
| Target still enabled after denied PATCH | true | true |
| Administrator performs same PATCH | 200 | 204 |
| Target disabled after administrator PATCH | false | false |
| Reader session DELETE | 200 | 204 |
| Deleted token reused on Managers | 401 | 401 |
| Target restoration and fresh GET | 200; enabled | 204; enabled |
| Administrator session DELETE / token reuse | 200 / 401 | 204 / 401 |
All 17 checks per target passed, including cleanup. An earlier ASUS attempt encountered its password-change gate; it was retained as a setup failure and was not counted as authorization evidence. The final test completed that setup and exercised a usable ReadOnly session before the denied PATCH.
Process observations and controls
| Target | Daemon | Authentication breakpoint | Final outcome |
|---|---|---|---|
| Romulus | bmcweb, PID 161 | pam_authenticate in libpam.so.0 | Breakpoint hit; 8-frame native trace; detached; login 201; same process resumed |
| ASUS | LuaJIT Redfish server, PID 13065 | PKCS5_PBKDF2_HMAC in libcrypto.so.3, caller in redfishinterface.so | Breakpoint hit; partial native trace; detached; login 201; same process resumed |
The reported PID, start time, executable path and executable SHA-256 matched before and after each attachment. Both PIDs remained unchanged after the complete HTTP experiment. Each temporary SSH forward was confirmed removed. The ASUS native unwind stopped after three frames with GDB’s identical-frame warning; Lua source-level tracing was not established.
Two controls delimit the debugger result:
- On Romulus, an intentionally stalled GDB command exceeded a two-second deadline. FAT returned exit 1 and
timed_out: true; the same guest process resumed and the temporary forward was removed. This establishes recovery for that observed timeout, not every possible guest/debugger failure. - On ASUS, exploratory
finishcommands after the password-derivation breakpoint produced HTTP 501 and process replacement. The entry-breakpoint/backtrace/detach sequence subsequently returned 201 without replacement. The cause of the step-out disruption remains unresolved; this report does not infer a watchdog trigger or a firmware vulnerability from it.
These observations cover one ReadOnly cross-account mutation, usable authenticated reads, session revocation and native authentication-entry tracing in the adapted emulated guests. They do not establish all role mappings, concurrent-session behavior, password-reset invalidation, Lua-level authorization flow, physical device behavior or hardware boot enforcement.
Evidence
The local evidence archive bmc-session-debug-20261019 contains input identities, fresh extraction/boot logs, build records, final session and process JSON reports, the timeout control and the failed exploratory ASUS traces. The final artifacts are <target>/final-session.json, <target>/final-process.json, romulus/timeout-process.json and final-runtime-summary.json. Reports are also registered with the corresponding FAT runs. Credentials, SSH keys, vendor firmware and extracted filesystems are kept outside Git.
After validation, both disposable accounts were deleted and GET returned 404 on each image. Both QEMU sessions were stopped and their HTTPS, GDB and setup SSH ports were confirmed closed. Original inputs, staged inputs and every staged boot asset retained their recorded SHA-256 digests.
Regression coverage includes unauthorized mutation, stale-token acceptance, password-change gates, lost responses after mutation, unknown session handles, unsafe resource paths, PID reuse, forward ownership, debugger deadlines, oversized transcripts and GDB sysroot handling. The documented commands require explicit lab credentials and account-mutation opt-in; no credentials or debugger payloads are bundled with FAT.
Validation passed: 2,085 workspace tests (one ignored), strict workspace Clippy, formatting, four kernel-profile consistency tests, runtime-data verification and 39 installer tests. Documentation links and the two command help pages were checked. A separate read-only code review found no remaining correctness blockers after cleanup and transcript-limit fixes.