#Why this matters
During incident response triage and containment, responders isolate affected hosts to stop an attack. Once an investigation moves toward root-cause analysis, disciplinary action, or legal proceedings, technical findings alone are not enough. Investigators must prove that the digital evidence presented in a report is identical to what existed on the system at the time of the incident and has not been altered, fabricated, or confused with another source.
Even an unintentional change can invalidate key artifacts. Booting a seized laptop or plugging a suspect USB drive directly into a workstation causes the operating system to update timestamps, write mount metadata, or replay filesystem journals. Sound forensic practice prevents those silent edits from the first minute of handling.
#Core principles of digital forensics
NIST SP 800-86 defines four phases in the forensic process: collection, examination, analysis, and reporting. Across every phase, three foundational rules protect the credibility of the work:
- Never analyze original media. Acquire a bit-for-bit image of the original drive, seal the original, and perform all analysis on a verified working copy.
- Preserve repeatability. Record the exact tools, versions, commands, and UTC timestamps used so an independent examiner can repeat the steps and reach the same result.
- Prioritize by volatility. Following IETF RFC 3227, collect fragile data before durable data, because power loss or normal background activity erases volatile state first.
| Priority | Evidence source | Typical lifespan |
|---|---|---|
| 1 (Highest) | CPU registers, cache, and active RAM | Seconds to loss of power |
| 2 | Network connections, routing tables, and process tables | Seconds to minutes |
| 3 | Temporary filesystems and swap space | Minutes to reboot |
| 4 | Persistent disks (SSD, HDD, USB media) | Days to years unless overwritten |
| 5 (Lowest) | Remote logs, SIEM archives, and offline backups | Months to years |
Because solid-state drives perform background garbage collection and TRIM operations while powered on, even persistent storage can lose deleted blocks quickly if left running. Responders capture RAM and live network state first, then acquire or isolate the drive promptly.
#Write-blockers and hash verification
Connecting suspect storage directly to an analysis machine risks immediate contamination. Modern operating systems automatically mount filesystems, update last-access metadata, create hidden indexing folders, or flush dirty filesystem journals.
A hardware write-blocker sits physically between the suspect drive (SATA, NVMe, or USB) and the forensic workstation. It allows read commands through while intercepting and rejecting all write commands at the interface level. When a hardware blocker is unavailable in a lab, responders apply software read-only controls (such as blockdev --setro and read-only mount options) before accessing an image, though hardware blocking remains the standard for physical seized drives.
Once data is acquired, examiners prove bit-for-bit integrity with a SHA-256 cryptographic hash. Legacy algorithms such as MD5 and SHA-1 are vulnerable to practical collision attacks and are not sufficient on their own for modern integrity assurance. If a single bit in a multi-gigabyte disk image changes, its SHA-256 digest changes completely.
$ sha256sum evidence_disk01.raw > evidence_disk01.sha256
$ cat evidence_disk01.sha256
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 evidence_disk01.raw
$ cp evidence_disk01.raw working_copy.raw
$ sha256sum working_copy.raw
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 working_copy.raw
$ sha256sum -c evidence_disk01.sha256
evidence_disk01.raw: OKNotice the workflow: hash immediately at acquisition, store the digest alongside the evidence record, and verify every working copy against that baseline before starting analysis.
#Maintaining the chain of custody
Technical hashing proves what the data contains; the chain of custody proves who controlled it and when. Every physical drive, memory capture, and optical disc receives a unique evidence identifier and a chronological log from collection through archival or disposal.
- Identify & LabelAssign unique ID, photograph ports and serial numbers
- Acquire & HashImage via write-blocker and record SHA-256 digest
- Seal & StorePlace original in tamper-evident bag inside locked vault
- TransferLog date/time (UTC), releasing and receiving custodians, and purpose
- Analyze CopyVerify SHA-256 on working copy before running forensic tools
A complete chain of custody form records at least:
- Case and item ID: Unique reference number plus make, model, capacity, and serial number.
- Acquisition details: Collector name, exact physical or network location, tool used, and baseline SHA-256 hash.
- Transfer entries: Date and time in UTC, printed names and signatures of both the releasing and receiving individuals, and the specific reason for transfer.
#Common mistakes
- Plugging suspect media directly into a live OS: Automounting writes filesystem metadata and alters timestamps before acquisition begins.
- Recording local timestamps without timezone offsets: Mixing local time across responders creates timeline contradictions; always use UTC.
- Relying only on MD5 or skipping post-copy checks: Weak hashes and unverified copies leave silent storage corruption undetected.
- Leaving custody gaps: Passing a drive across a desk or leaving it in an unlocked cabinet without a signed transfer entry breaks the chain of custody.
#Summary
Digital forensics requires preserving original evidence untouched, working only on verified copies, and documenting every step for repeatability. Following RFC 3227's order of volatility ensures ephemeral memory and network state are captured before persistent storage. Combining write-blockers, SHA-256 integrity verification, and a continuous UTC-timestamped chain of custody ensures evidence remains trustworthy from triage through reporting.