Forensics isn't random poking around a hard drive. Every serious investigation follows the same process, so the results can be trusted by your manager, a client or a court.
The four phases
NIST's guide SP 800-86 breaks forensic work into four phases:
1. Collection. Identify where evidence might be (laptop, server, phone, cloud logs) and acquire it without changing it.
2. Examination. Process the raw data: recover deleted files, parse logs, extract artifacts.
3. Analysis. Connect the dots. Who did what, when and how?
4. Reporting. Explain the findings clearly, with proof, so someone else can check them.
The golden rule across all four: work on copies, never on the original.
Order of volatility
Some evidence disappears the moment a machine is switched off, so you collect the most fragile data first. This is called the order of volatility (from RFC 3227):
| Collect first to last | Example | How long it survives |
|---|---|---|
| CPU registers and cache | — | Nanoseconds |
| RAM, running processes, network connections | Malware living only in memory | Until shutdown |
| Temporary files and swap | /tmp, pagefile | Until reboot or cleanup |
| Disk | Files, logs, registry | Months to years |
| Remote logs and backups | SIEM, cloud logs | Depends on retention |
Tip: Pulling the plug on a running machine destroys RAM, along with any fileless malware, open connections and encryption keys. If the system is still on, capture memory first.
Live response: what to grab from a running system
Before a Linux system is shut down, an investigator typically records:
date -u # current time in UTC
w # who is logged in right now
ps auxf # running processes as a tree
sudo ss -tunap # network connections and listening ports
ip a # network interfaces and IPs
sudo lsof -nP | head -50 # files opened by processes
On Windows, the rough equivalents are tasklist /v, netstat -ano, query user and ipconfig /all.
Save every output to an external USB drive or a network share, not to the suspect disk.
Golden rules
- Write down everything you do, with the time in UTC.
- Touch the evidence as little as possible.
- Run trusted tools from your own USB, not the suspect machine's programs. An attacker may have replaced them.
- If you're not sure, stop and ask. A mistake during collection can't be undone.
Good forensics is less about clever tools and more about discipline: the right order, the right copy and a written record of every step.