iac.htora.dev · security templates

Home/For responders/Verifying collected evidence

Verifying collected evidence

Evidence is only useful if you can show it is what was collected. evidence-verify recomputes the SHA-256 of every file in a folder of downloaded evidence and compares it with the hash recorded beside the file at capture time.

1Capturedthe responder hashes each record as it writes it2Storedin the locked evidence bucket, file and hash side by side3Downloadedto the analysis machine4Verifiedevery hash recomputed, and a report kept
Run it on the analysis machine after each download, and keep the report with the case notes.

What it checks

The evidence templates write a .sha256 file next to each record they store: the instance record, the capture manifest, and the memory image. evidence-verify reports every file as one of these.

ResultMeans
okThe file matches the hash recorded when it was captured
mismatchThe file changed after it was hashed. Do not rely on it until that is explained
missingA hash names a file that is not in the folder, usually an incomplete download
bad-sidecarA .sha256 file has no readable hash, or names a different file
unhashedA file with no recorded hash, such as a capture log. Listed with its current hash; -strict makes it a failure

It exits 0 when every hashed file matches, 1 when anything above fails or no hashed file is found, and 2 when it cannot read the folder. That makes it usable in a script or a pipeline as well as by hand.

Run it

aws s3 sync s3://<evidence-bucket>/incidents/<id>/ ./evidence/incidents/<id>/
aws s3 sync s3://<evidence-bucket>/memory/<id>/ ./evidence/memory/<id>/
evidence-verify -json verify-report.json ./evidence

On Google Cloud, gcloud storage cp -r gs://<evidence-bucket>/incidents/<id> ./evidence/ downloads the same layout. The JSON report records every file, both hashes, the result, the time, and the version of the tool, which is what a later reader needs to trust the check.

Download

Built by this site's pipeline from the verify folder of the repository, with Go's standard library and nothing else. Check the file you download against SHA256SUMS before running it.

The source is on GitHub, with tests for every result above. go build in that folder produces the same program.

Its limits

  • Bucket settings are out of its reach. Whether Object Lock or a retention policy was in force is a property of the bucket, and the evidence template's verify commands check it.
  • It shows a file is unchanged since it was hashed. What happened at the moment of capture is shown by the capture itself: the snapshot IDs, the audit log of the responder's calls, and the locked bucket.

Registry 0.23.0. Built 2026-11-17.

Made by Habibullah Tora. Source on GitHub. Code under the MIT licence, writing under CC BY 4.0.