Key Takeaways
- Preserve evidence integrity—chain of custody is critical.
- Never work on original evidence—use forensic copies.
- Volatile evidence must be collected first (memory, network).
- Document every action taken during investigation.
- Use validated, write-blocking tools for acquisition.
- Timeline analysis reconstructs events effectively.
Table of Contents
1. Digital Forensics Overview
Digital forensics is the process of identifying, preserving, analyzing, and documenting digital evidence. It applies to criminal investigations, civil litigation, internal corporate investigations, and incident response. The goal is to reconstruct events, identify actors, and present findings that can withstand legal scrutiny.
Key principles include: evidence integrity, chain of custody, documentation, and reproducibility. Every action must be defensible in court.
Order of Volatility
Collect evidence in order of volatility (most volatile first):
1. CPU registers, cache
2. RAM (memory)
3. Network connections, running processes
4. Disk (file system)
5. Backup media, archives
2. Evidence Collection
2.1 Chain of Custody
# Chain of custody documentation:
- Who collected the evidence
- When it was collected
- Where it was collected from
- How it was secured
- Every transfer of custody
- Hash verification at each step
2.2 Collection Best Practices
- Use write blockers for disk acquisition
- Calculate and verify hash values (MD5, SHA256)
- Photograph the scene before touching anything
- Document everything in contemporaneous notes
- Secure evidence in tamper-evident containers
3. Disk Forensics
3.1 Disk Acquisition
# Create forensic image using dd
dd if=/dev/sda of=/evidence/disk.img bs=4096 conv=sync,noerror
# Using dc3dd (with hashing)
dc3dd if=/dev/sda of=/evidence/disk.img hash=sha256 log=/evidence/log.txt
# FTK Imager (Windows GUI)
# Creates E01 (EnCase) format with metadata
3.2 File System Analysis
- Recover deleted files from unallocated space
- Analyze file metadata (timestamps, ownership)
- Examine registry hives (Windows)
- Extract browser history, cache, cookies
- Review log files and event logs
Timestamps Can Be Manipulated
File system timestamps can be modified by attackers. Corroborate with other evidence: log files, network data, registry artifacts. Multiple independent sources increase confidence.
4. Memory Forensics
4.1 Memory Acquisition
# Linux memory dump
dd if=/dev/mem of=/evidence/memory.raw
# Windows using WinPMEM
winpmem.exe memory.raw
# FTK Imager, DumpIt (Windows GUI)
# Volatility 3 analysis
vol -f memory.raw windows.pslist
vol -f memory.raw windows.netscan
vol -f memory.raw windows.malfind
4.2 Memory Analysis Artifacts
- Running processes and command lines
- Network connections
- Injected code and malware
- Encryption keys
- Credentials in memory
- Clipboard contents
5. Network Forensics
5.1 Network Evidence Sources
| Source | Evidence Type |
|---|---|
| PCAP captures | Full packet content |
| NetFlow/IPFIX | Connection metadata |
| Firewall logs | Allow/deny decisions |
| Proxy logs | URL access records |
| DNS logs | Domain lookups |
5.2 Network Analysis
# Wireshark analysis
# Filter for C2 traffic, data exfiltration
# NetworkMiner (automated extraction)
# Extracts files, images, credentials from PCAP
# Zeek (network monitoring)
# Generates structured logs from traffic
6. Timeline Analysis
Timeline analysis correlates events from multiple sources (file system, logs, memory) into a single chronological view, revealing the sequence of attacker actions.
# Plaso/log2timeline
log2timeline.py timeline.plaso /evidence/disk.img
psort.py -o l2tcsv timeline.plaso -w timeline.csv
# Analyze in timeline explorer or spreadsheet
7. Forensics Tools
| Tool | Purpose | Type |
|---|---|---|
| Autopsy | Disk forensics platform | Open Source |
| Volatility | Memory forensics | Open Source |
| FTK Imager | Disk imaging | Free |
| Wireshark | Network analysis | Open Source |
| EnCase | Full forensics suite | Commercial |
| X-Ways | Disk forensics | Commercial |
SANS SIFT Workstation
SIFT is a free forensics distribution with pre-installed tools. It's maintained by SANS and used in their forensics courses. Great for learning and actual investigations.
8. Frequently Asked Questions
Conclusion
Digital forensics requires methodical evidence collection, proper chain of custody, and thorough analysis across disk, memory, and network artifacts. Use validated tools, never work on original evidence, and document everything. Timeline analysis brings disparate evidence together to reconstruct events. Whether for incident response or legal proceedings, forensic rigor is essential.
Continue Learning:
Incident Response
Malware Analysis