defend-audit verify is the auditor’s tool. It takes a signed document from the device, either a daily manifest or an evidence pack’s chain-of-custody.json, and answers three questions:
.tsr file next to it), does it match?defend-audit verify works offline. It needs no contact with the device or any online service: the device’s signing-key ring travels inside every evidence pack (manifest.pubring.json). defend-audit is a self-contained Linux program for x86-64 and arm64, with nothing else to install. Auditors can get it from Awesome-O support.
Where to run it: usually on the auditor’s own Linux machine, against an extracted evidence pack. It also works on the device: open Device → Terminal in the web interface, and run it with
sudo. It ships in the audit package.
defend-audit verify <file> [--pubring PATH] [--skip-files] [--skip-tsr] [--tsa-roots PATH] [--json]
| Option | Default | Effect |
|---|---|---|
<file> |
(required) | A MANIFEST-YYYY-MM-DD.json or a chain-of-custody.json |
--pubring PATH |
the device’s key ring, from audit.conf |
The key ring to check against. Off the device, use the manifest.pubring.json from the evidence pack |
--skip-files |
off | Check the signature only; don’t re-hash the listed files. Faster for spot checks |
--skip-tsr |
off | Skip the trusted-timestamp check, even if a .tsr file exists |
--tsa-roots PATH |
from audit.conf |
The Time-Stamp Authority’s root certificate(s), as PEM, for checking a .tsr |
--json |
off | Print a JSON result for scripts |
$ defend-audit verify manifests/MANIFEST-2026-04-15.json
signature OK (ed25519:<key ID>)
files: 142 listed, 0 mismatched, 0 missing
tsr OK (TSA=CN=www.freetsa.org,OU=Root CA,O=Free TSA at 2026-04-16T00:10:43Z)
<key ID> stands for the signing key’s ID: ed25519: followed by 32 hexadecimal characters. The signature matches the key named in the document’s signature block, every listed file still exists and still hashes to the recorded value, and the trusted timestamp matches. A manifest with no .tsr file shows tsr: no .tsr sibling (Ed25519 signature alone) instead, and still passes.
The document was edited after it was signed.
defend-audit verify: BAD signature (key ed25519:<key ID>)
Exit code 5.
The signature is valid, but a file no longer matches what was recorded. Each changed file is listed on its own MISMATCH line.
signature OK (ed25519:<key ID>)
MISMATCH /var/log/suricata/eve-ids-2026-04-15.json
files: 142 listed, 1 mismatched, 0 missing
Exit code 5.
The signature is valid, but some listed files are not there, for example log files the device has since rotated away. A missing file could not be checked; it is not a mismatch.
signature OK (ed25519:<key ID>)
files: 142 listed, 0 mismatched, 14 missing
Exit code 0. The missing count is for information.
The key ring does not have the key that signed the document. Usually the wrong key ring was used: pass --pubring with the one from the evidence pack.
defend-audit verify: unknown key_id in manifest: ed25519:<key ID>
Exit code 5.
A .tsr file exists but does not match, or its Time-Stamp Authority does not check out against the root certificates. Exit code 6.
| Exit code | Meaning |
|---|---|
0 |
Signature valid; no listed file mismatched; the timestamp (if any) is valid |
1 |
audit.conf could not be read |
2 |
Wrong usage, for example no file given |
3 |
The key ring could not be loaded |
4 |
The document could not be read |
5 |
Bad signature, unknown key, or at least one file mismatched |
6 |
The trusted timestamp (.tsr) failed |
So defend-audit verify --skip-files <file> && echo good works as you’d expect in a script.
An auditor with an evidence pack from defend-audit report does this:
unzip q2-evidence.zip -d q2/
cd q2/
# 1. The chain-of-custody: every file in the pack, signed by the device.
defend-audit verify chain-of-custody.json --pubring manifest.pubring.json
# 2. Each daily manifest's signature.
for m in manifests/MANIFEST-*.json; do
defend-audit verify "$m" --pubring manifest.pubring.json --skip-files
done
Run step 1 inside the folder you extracted the pack into, because the chain-of-custody lists the pack’s files by their place in it. It proves that nothing in the pack was changed or added after the device built it. In step 2, the daily manifests list the device’s own log files by their path on the device. Those files are not in the pack, so off the device use --skip-files, or expect them all to show as missing.
Any non-zero exit code is a finding worth investigating.
The key ring keeps every key the device has ever used, each marked with valid_from and retired_at times. Verifying a document looks up the key that was active when it was signed, not the key active today. So documents signed before a compromise still verify after it, as long as you have a key ring from before the incident. Every evidence pack you have produced contains one.
defend-audit verify-chain checks the live events store on the device. It walks the per-row hash chain of each chained table and recomputes every row’s hash from the row as stored, so it finds an edited or deleted row. The hourly self-check does the same for the newest rows only; this command checks the whole chain. It reads the store read-only, so it is safe to run while the device is collecting.
sudo defend-audit verify-chain [--rows N] [--table NAME] [--json]
| Option | Default | Effect |
|---|---|---|
--rows N |
0 (the whole chain) |
Stop after N rows per table, newest first |
--table NAME |
every chained table | Check one table only |
--json |
off | Print a JSON result for scripts |
For each table, it prints whether the chain verified, how many rows it walked, and where it ended. When everything verifies, it ends with Every chain verified against the row contents as stored. Rows older than the current hash recipe are not re-hashed; a note says so. Those rows are protected by the chain tip in their day’s signed manifest instead (see Compliance Reporting).
Exit code 0 when every chain verified, 10 when a chain failed, 1 if audit.conf could not be read, and 2 for wrong usage.