You're standing in front of a compromised Linux server. Before you touch anything, you have to make a choice that shapes the entire investigation: do you collect evidence from the live system, or do you pull the plug and image the disk? This article walks through the trade-offs of both.
Live acquisition means running commands on the running system to capture volatile data. Dead acquisition means powering it down and imaging the drives in a controlled way. Neither is always right — the correct answer depends on what you're trying to prove and what you can risk losing.
ls touches the access
time of a directory. Live acquisition is a trade-off: you collect volatile data that
otherwise disappears, at the cost of altering some evidence.
Evidence disappears at very different rates. RFC 3227 lays out the order in which you should collect, from most to least volatile:
The practical meaning: if you want memory, you must get it while the machine is running. The moment the power is cut, everything above the "temporary files" line is gone forever.
Choose live collection when:
Risks:
ps output).A minimal live-response kit, executed from a mounted read-only USB:
date -u # trusted time from your own env, note offset
mount # what's mounted, and how
cat /proc/net/tcp # TCP connections (better than ss here)
arp -a # ARP cache
ss -tulpn # listening & established sockets
ps auxww # process list
lsof # open files per process
cat /etc/passwd # accounts (tamper-prone, but collect)
history # shell history of the current shell
Choose dead acquisition when:
The workflow:
dd/dcfldd, hash the original and the image.| Factor | Live | Dead |
|---|---|---|
| Memory capture | Possible | Lost |
| Active connections | Visible | Gone |
| Deleted file recovery | Poor (live writes overwrite) | Best |
| Encrypted disk | Only option without keys | Needs keys |
| Evidence integrity | Altered by your actions | Clean |
| Production impact | Minimal | Downtime |
| Court defensibility | Harder to defend | Easier |
If you decide the investigation needs RAM, do it first, before anything else on the system. Common capture methods on Linux:
# 1. /dev/mem or /dev/kmem - raw, often restricted
dd if=/dev/mem of=ram.mem bs=1M
# 2. LiME (Linux Memory Extractor) - kernel module, recommended
insmod lime-<version>.ko "path=/evidence/ram.lime format=lime"
# 3. fmem - driver exposing /dev/fmem
insmod fmem.ko
dd if=/dev/fmem of=ram.dd bs=1M
# verify it's a sane dump
file ram.lime
sha256sum ram.lime
Analyze the dump with Volatility, which knows how to
read LiME format natively and can also handle raw dd dumps given a profile.
← Previous: Introduction to Linux Forensics · Next: Recovering Deleted Files on ext4 →