0Pricing
Cyber Security Academy · Lesson

Forensic Fundamentals and Chain of Custody

Handling evidence correctly.

Forensic Fundamentals and Chain of Custody is a free Cyber Security Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cyber Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

What Digital Forensics Is

Digital forensics is the disciplined recovery, preservation, and analysis of digital evidence so that findings hold up under scrutiny, including in court.

It is not just data recovery. The defining requirement is defensibility: every action must be documented, repeatable, and unbiased.

  • Identification of relevant evidence sources
  • Preservation without alteration
  • Analysis using validated methods
  • Presentation in clear, reproducible reports

Order of Volatility

When responding to a live incident, collect evidence from the most volatile to least volatile source. Data that disappears fastest must be captured first.

  • CPU registers and cache
  • Routing table, ARP cache, process list, network connections
  • RAM (memory)
  • Temporary file systems
  • Disk
  • Remote logging and archival media

RFC 3227 codifies this principle. Pull the disk image too early and you lose live RAM artifacts forever.

Chain of Custody

The chain of custody is the documented chronological record showing who handled evidence, when, why, and what they did to it.

A single gap can render evidence inadmissible. Every transfer is logged.

  • Who collected and received the item
  • What the item is (serial, hash, description)
  • When each handoff occurred
  • Where it was stored
  • Why custody changed
Custody Log Entry
-----------------
Item ID:    EVD-2024-0042
Description: 1TB SATA SSD, S/N WX21A8
SHA-256:    a3f1...9c2e
Collected:  2024-06-04 09:12 UTC by J. Doe
Received:   2024-06-04 11:30 UTC by Lab Custodian (signature)
Storage:    Evidence locker 3, tamper seal #00871

Hashing for Integrity

Cryptographic hashes prove evidence has not changed. You hash at acquisition and re-hash later; matching values prove integrity.

Use SHA-256 as the modern standard. MD5 and SHA-1 still appear in legacy tools but are collision-weak; many labs record both for cross-verification.

# Hash a source device before imaging
sha256sum /dev/sdb

# Hash the resulting image and compare
sha256sum evidence.dd

# Verify two hashes match exactly
diff <(sha256sum source.dd | awk '{print $1}') \
     <(sha256sum copy.dd   | awk '{print $1}')

Write Blockers

A write blocker sits between the investigator and the evidence drive, permitting reads while physically or logically denying writes. This guarantees the original is never modified during acquisition.

  • Hardware write blockers are inline devices, preferred for court work
  • Software write blockers set the OS to read-only mount

Even mounting a drive normally can update access timestamps, so a blocker is mandatory for original media.

# Linux software read-only mount (still prefer a hardware blocker)
blockdev --setro /dev/sdb
mount -o ro,noexec,noload /dev/sdb1 /mnt/evidence

# Confirm read-only state
blockdev --getro /dev/sdb   # 1 = read-only

Working on Copies, Never Originals

The golden rule: analyze a verified copy, preserve the original. The original goes into evidence storage and is touched as little as possible.

Best practice is to make at least two copies: one working image for analysis and one archival master kept untouched. Both must hash-match the source.

Documentation and Notes

Contemporaneous notes are evidence too. Record actions as you perform them, not from memory afterward.

  • Timestamp every action (use UTC to avoid ambiguity)
  • Photograph the scene and device state
  • Note tool names and versions
  • Record any anomalies or errors

If it is not written down, in court it effectively did not happen.

Legal Authority and Scope

Before touching anything, confirm legal authority: a warrant, consent, internal authorization, or applicable regulation. Exceeding scope can taint the entire case and expose the investigator to liability.

Forensics is bound by jurisdiction. Cross-border data, employee privacy expectations, and data protection law (GDPR, KVKK) all constrain what you may collect and how.

Repeatability and Tool Validation

Findings must be repeatable: another examiner using validated tools on the same evidence should reach the same conclusion.

This is why labs use known-good, version-controlled tools (NIST CFTT-tested where possible) and document tool versions. Custom or unvetted scripts undermine defensibility.

The Forensic Workstation

A dedicated, isolated workstation prevents cross-contamination and accidental network leakage of evidence.

  • Air-gapped or tightly firewalled
  • Sterilized (wiped + verified) target media for images
  • Validated toolset (Autopsy, Sleuth Kit, Volatility, Wireshark)
  • Logged access
# Wipe and verify a target drive before storing an image on it
shred -vzn 1 /dev/sdc          # overwrite once with zeros
sha256sum /dev/sdc            # baseline of sterilized media

Evidence Integrity Over Time

Integrity must be provable not just at acquisition but throughout storage. Re-hash periodically and after every transfer, comparing against the acquisition baseline.

  • Tamper-evident seals on physical media
  • Access-controlled, logged evidence storage
  • Recorded hash at each custody handoff

If a later hash diverges from the original, the evidence is treated as compromised and its findings are challenged.

# Re-verify a stored image against its acquisition baseline
echo 'a3f1...9c2e  evidence.dd' | sha256sum -c -
# evidence.dd: OK   -> integrity intact

Quick Check

Test your understanding of acquisition order.

Recap

You covered the foundations of defensible forensics:

  • Order of volatility drives collection sequence
  • Chain of custody documents every handoff
  • Hashing (SHA-256) proves integrity
  • Write blockers protect originals
  • Always work on verified copies
  • Documentation, legal scope, and repeatability make evidence admissible

Next: turning these principles into actual disk images and artifact recovery.

Frequently asked questions

Is the “Forensic Fundamentals and Chain of Custody” lesson free?

Yes — the full text of “Forensic Fundamentals and Chain of Custody” is free to read here on the web, and the Cyber Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cyber Security Academy course, upgrade to CoddyKit PRO.

What will I learn in “Forensic Fundamentals and Chain of Custody”?

Handling evidence correctly. You practise Cyber Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cyber Security Academy?

No prior experience is required. Cyber Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Forensic Fundamentals and Chain of Custody” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cyber Security Academy lesson?

Yes. Every Cyber Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Forensic Fundamentals and Chain of Custody
  2. Disk Imaging and File System Analysis
  3. Network Forensics with PCAP
  4. Timeline Analysis and Reporting
← Back to Cyber Security Academy