Security · Digital Forensics
Hash Verification
Cheat sheet · https://pcornel.dk/topic.php?topic=4984
Answer
Hash verification computes a cryptographic hash, such as SHA-256, of evidence at acquisition and again later. Matching hashes prove the image or file has not changed.
Remember
- Hash evidence at collection and again before use.
- Use SHA-256.
- A mismatch means the evidence changed or is corrupt.
First checks
sha256sum <image>— hashsha256sum -c evidence.sha256— verify laterGet-FileHash <file> -Algorithm SHA256— Windows
Commands
sha256sum -c checksums.txt- Operational command for Verify file checksums against a manifest. Focus fields: file path and OK/FAILED checksum result.
Verify in this order
acquisition hash → later verification → match
Where it usually breaks
First mismatch in signal/report → evidence preservation → scoping/analysis → containment → eradication → recovery → validation/lessons learned; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4984