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.
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.
| Result | Means |
|---|---|
| ok | The file matches the hash recorded when it was captured |
| mismatch | The file changed after it was hashed. Do not rely on it until that is explained |
| missing | A hash names a file that is not in the folder, usually an incomplete download |
| bad-sidecar | A .sha256 file has no readable hash, or names a different file |
| unhashed | A 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.
| System | File |
|---|---|
| Linux, Intel or AMD | evidence-verify-linux-amd64 |
| Linux, Arm | evidence-verify-linux-arm64 |
| macOS, Apple silicon | evidence-verify-darwin-arm64 |
| macOS, Intel | evidence-verify-darwin-amd64 |
| Windows | evidence-verify-windows-amd64.exe |
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.