Evidence Collection and Chain of Custody
Learn forensically sound evidence collection, hashing, and maintaining chain of custody.
Evidence Collection and Chain of Custody is a free Cyber Security Academy lesson on CoddyKit — lesson 2 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.
Why Evidence Matters
Digital evidence collected during incident response may be used in legal proceedings, HR actions, or regulatory reviews. Evidence must be collected, preserved, and documented following proper procedures to maintain its admissibility and integrity.
Types of Digital Evidence
Evidence categories:
- Volatile: RAM contents, running processes, network connections — lost on reboot
- Non-volatile: disk images, log files, database records
- Network: packet captures, NetFlow records
- Application: access logs, audit logs, emails
Volatile Evidence First
Collect volatile data before powering off a system:
# Memory dump (Linux):
dd if=/dev/mem of=/external/memory.raw
# Or use LiME kernel module for accurate acquisition
# Running processes:
ps aux > /external/processes.txt
netstat -anp > /external/connections.txt
lsof > /external/open_files.txtDisk Imaging
Create a forensic image (bit-for-bit copy) of storage media. Use write blockers to prevent any modification of the original. Verify with hash:
dd if=/dev/sda of=/external/disk.img bs=4M
sha256sum /dev/sda > /external/disk.sha256
sha256sum /external/disk.img
# Hashes must match — proves image integrityWrite Blockers
A write blocker is a hardware or software device that prevents any writes to the evidence media during imaging. Without a write blocker, the imaging process itself might modify access timestamps or other metadata, contaminating the evidence.
Chain of Custody
The chain of custody documents every person who handled evidence, when, and why. It includes:
- Evidence identifier and description
- Date/time of collection
- Collected by (name, signature)
- Storage location
- Transfer records (who received it, when)
Evidence Preservation
Preserving evidence:
- Store originals in sealed, labeled evidence bags
- Work only on verified copies
- Store in secure, access-controlled locations
- Document hash values for integrity verification
- Never work from the original evidence media
Log Preservation
Logs are often the most valuable evidence. Preserve:
# Copy system logs before rotation:
cp -r /var/log /external/logs_$(date +%Y%m%d)
# Export from SIEM: export events for affected timeframe
# Preserve firewall logs, DHCP logs, DNS query logs
# Note: logs may be deleted by attacker — check SIEM for gapsLegal Hold
When litigation or regulatory investigation is anticipated, issue a legal hold — a directive to preserve all potentially relevant records. This suspends normal data retention schedules. Failure to preserve can result in spoliation charges.
Forensic Tools
Common forensic tools:
- Autopsy/Sleuth Kit — disk forensics
- Volatility — memory analysis
- Wireshark — packet capture analysis
- FTK Imager — disk imaging
- SIFT Workstation — Ubuntu-based forensic distro
Mobile Device Evidence
Mobile devices require specialized handling: enable airplane mode to prevent remote wipe, place in a Faraday bag to block signals. Use mobile forensics tools (Cellebrite, Oxygen Forensic) that understand mobile file systems and app data structures.
Quick Check: Evidence Collection
Why must volatile memory (RAM) be collected before other evidence types?
Lesson Recap
Evidence collection must follow proper procedures to be admissible. Collect volatile data (RAM, processes, connections) first — it disappears on reboot. Use write blockers for disk imaging. Maintain chain of custody documentation. Hash everything to prove integrity. Legal hold suspends data deletion. Work only on verified copies, never originals.
Frequently asked questions
Is the “Evidence Collection and Chain of Custody” lesson free?
Yes — the full text of “Evidence Collection 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 “Evidence Collection and Chain of Custody”?
Learn forensically sound evidence collection, hashing, and maintaining chain of custody. 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 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Evidence Collection 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
- The IR Lifecycle: Prepare, Identify, Contain
- Evidence Collection and Chain of Custody
- Eradication, Recovery, and Lessons Learned
- Writing an Incident Report