When a machine is suspected of misbehaving, the first instinct is "reboot it". In forensics that destroys the most perishable evidence. The order of volatility says: collect the most short-lived data first.
From most to least volatile:
- CPU registers and caches, effectively not collectable in practice.
- RAM: running processes, open network connections, loaded modules, decrypted data, keys that live only in memory.
- Network state: connections, ARP and routing tables.
- Running processes and system state (much of this is in the RAM image too).
- Disk: files, deleted-but-not-overwritten data, swap.
- Remote logs and monitoring data.
- Archival media and backups.
Two rules I repeat in every lab:
- Document everything: who touched what, when, with which command. That is the chain of custody. If you cannot explain how a copy was made, it is a story, not evidence.
- Work on copies. Take a bit-for-bit image, hash it (
sha256sum), write the hash down, then analyse the copy and verify the hash again at the end.
Caveat: "capture RAM first" depends on the situation. Sometimes isolating the host from the network matters more. The point is to decide on purpose, not by reflex. This is for your own lab machines and for training images, of course.