Forensic Workflow: Basics #1
Preserve everything. Change nothing.
This page covers acquisition: what to collect, in what order, and how to do it without damaging evidence.
1. Principles
- Authority first. Act under a warrant, policy, or written scope. Stop at the edge of it.
- Preserve first, analyse second. Collection decisions cannot be undone.
- Work on copies. Hash the original. Examine the image.
- Minimal footprint. Every action on a live system changes it. Do less. Record all of it.
- Collect by volatility. Most fragile data first.
- Document everything. Time, action, command, result.
- Keep the chain of custody. Every transfer has a name, a time and a reason.
2. Order and Degrees of Volatility
Volatility is how fast data disappears. Collect the fastest-decaying data first.
Degrees
- Volatile: lost at power-off or when overwritten in seconds. CPU state, RAM, network tables, running processes.
- Semi-volatile: survives a reboot but is overwritten by normal use. Swap, pagefile, temp files, rotating logs, free space.
- Non-volatile: persists until deliberately destroyed. Disk contents, backups, archival media.
Order of volatility (RFC 3227)
| # | Data | Lifetime | How to collect |
|---|---|---|---|
| 1 | CPU registers, cache | Nanoseconds to milliseconds | Rarely practical. Partial state appears in crash dumps. |
| 2 | Routing table, ARP cache, process table, kernel statistics, RAM | Until power loss or overwrite | Memory image, then network and process snapshots |
| 3 | Temporary filesystems: /tmp, /dev/shm, swap, pagefile, hibernation file | Until reboot, cleanup or overwrite | Collected with the disk image, or live if tmpfs |
| 4 | Disk | Until overwritten | Forensic image |
| 5 | Remote logging and monitoring: syslog, SIEM, EDR, NetFlow, proxy, cloud audit logs | Days to months. Set by retention. | Export now. Send preservation requests. |
| 6 | Physical configuration, network topology | Stable | Photos, diagrams, cabling notes |
| 7 | Archival media: backups, tape, optical | Years | Copy and hash |
Modern additions
- Containers: lost when the container stops, or immediately with
--rm. - Cloud instances: instance store and RAM are lost on stop or terminate.
- Cloud logs: default retention can be short. Check it on day one.
- Encryption keys: full-disk and container keys sit in RAM while volumes are mounted.
- Mobile devices: state changes with lock status and uptime. See section 5.
- Clock drift: volatile and easy to miss. Record the offset from true time.
3. Types of Acquisition
Live and dead
| Live (system on) | Dead (system off) | |
|---|---|---|
| Captures | RAM, network state, processes, mounted encrypted volumes | Disk contents |
| Risk | Alters the system. Tools leave a footprint. | Volatile data is already gone |
| Use when | Active incident, encryption, malware, server that cannot go down | Powered-off devices, standard disk cases |
Scope of the copy
- Physical (bit-for-bit): every sector, including deleted data and slack space. Default for disks.
- Logical: files and folders as the OS shows them. Misses deleted data. Used for mounted encrypted volumes and some cloud and mobile cases.
- Targeted (triage): selected artefacts only. Fast. Used when volume or time forbids a full image. Example: KAPE.
Image formats
- Raw (dd): exact copy. Widely supported. Same size as the source.
- E01 (EnCase): compressed, stores hashes and case metadata, segmented.
- AFF4: modern format. Common for memory and triage collections.
Write protection
- Use a hardware write blocker whenever possible.
- Software option: boot Kali Live in forensic mode. It does not auto-mount internal disks.
- Set the device read-only and confirm it.
lsblk -o NAME,SIZE,TYPE,MODEL,SERIAL,RO
sudo blockdev --setro /dev/sdb
blockdev --getro /dev/sdb # 1 = read-only
Disk imaging
# record the source first
sudo hdparm -I /dev/sdb | head -20 # model, serial
sudo hdparm -N /dev/sdb # HPA check (ATA drives)
# raw image with hashing and log
sudo dc3dd if=/dev/sdb of=/mnt/evidence/case001-hdd01.dd hash=sha256 log=/mnt/evidence/case001-hdd01.log
# E01 image (interactive)
sudo ewfacquire /dev/sdb
# failing drive: retry and keep a map
sudo ddrescue -d -r3 /dev/sdb case001-hdd01.dd case001-hdd01.map
# verify
sudo sha256sum /dev/sdb case001-hdd01.dd
ewfverify case001-hdd01.E01
- Write the image to separate storage. Never to the source.
- Source hash and image hash must match. Record both.
- Make a second copy. Work on the second one.
Mounting an image read-only
mmls case001-hdd01.dd # partition layout
sudo losetup -r -f -P --show case001-hdd01.dd # prints /dev/loopN
sudo mount -o ro,noexec,nodev /dev/loopNp1 /mnt/ev
# ext3 and ext4: add noload to prevent journal replay
# E01 images
sudo ewfmount case001-hdd01.E01 /mnt/ewf # raw view at /mnt/ewf/ewf1
Memory acquisition
- Run the tool from trusted external media.
- Write the output to external storage. Never to the target disk.
- The tool itself changes memory. Record the tool, version and time.
- Hash the dump after capture.
| Platform | Tools | Notes |
|---|---|---|
| Windows | WinPMem, DumpIt, FTK Imager, Magnet RAM Capture | Run as administrator. Output file is roughly the size of RAM. |
| Linux | AVML, LiME | LiME is a kernel module and must match the running kernel. Record uname -r and /proc/version. Volatility 3 needs a symbol table for that kernel. |
| VMware | Suspend or snapshot the VM | Collect the .vmem with its .vmss or .vmsn file. |
| VirtualBox | VBoxManage debugvm | Dumps guest memory without touching the guest. |
| Hibernated host | hiberfil.sys | RAM at hibernation time. Collected with the disk image. |
:: Windows
winpmem_mini_x64.exe F:\case001\mem.raw
certutil -hashfile F:\case001\mem.raw SHA256
# Linux
sudo ./avml /media/ext/mem.lime
sudo insmod lime-$(uname -r).ko "path=/media/ext/mem.lime format=lime"
sha256sum /media/ext/mem.lime
# VirtualBox
VBoxManage debugvm "VMNAME" dumpvmcore --filename mem.elf
Live triage snapshot
Run after the memory image. Trusted binaries only. Send output to external storage. Log every command with a timestamp.
:: Windows (cmd, from trusted media)
date /t & time /t
ipconfig /all
netstat -ano
arp -a
route print
ipconfig /displaydns
tasklist /v
tasklist /svc
query user
net sessions
net use
powershell -c "Get-CimInstance Win32_Process | Select ProcessId,ParentProcessId,Name,CommandLine | Format-List"
# Linux (static binaries from trusted media where possible)
date -u; uptime; uname -a
who -a; w; last -Faiwx | head -50
ps auxwwf
ss -tulpanee
ip addr; ip route; ip neigh
lsof -nP +L1 # deleted but still open files
ls -l /proc/*/exe 2>/dev/null | grep deleted # running binaries deleted from disk
lsmod; mount; df -h
Some examiners run a quick network and process snapshot before the RAM image, because connections change in seconds and RAM capture takes minutes. Others image RAM first and rely on Volatility's network plugins. Pick one approach. Record it.
4. Power State: Shutdown or Pull the Plug
| Graceful shutdown | Pull the plug | |
|---|---|---|
| Pros | Flushes buffers. Consistent filesystem. | Freezes disk state. No shutdown scripts run. |
| Cons | Runs shutdown scripts. Writes to disk. May clear the pagefile. May trigger cleanup or wiping malware. | Unsaved data lost. Possible filesystem or database corruption. |
| Default for | Servers and databases, agreed with the owner | Workstations and laptops in most protocols |
- Laptops: remove the battery as well as the mains lead.
- Capture RAM and volatile data before either option.
- Record which option was used and why.
5. Seizing Evidence by Situation
Powered-off computer
Do:
- Photograph the device, ports, cables and surroundings.
- Record make, model, serial number and condition.
- Remove the drive or boot a trusted forensic environment.
- Image behind a write blocker. Hash. Verify.
- Collect passwords, recovery keys and PINs if the owner provides them.
Avoid:
- Powering it on to "take a quick look".
- Booting the installed OS.
- Connecting the drive to an analysis machine without a write blocker.
Powered-on, unlocked workstation
Do:
- Photograph the screen. Record open windows and visible processes.
- Keep the session alive. Do not change settings.
- Isolate the network by unplugging the cable or disabling the switch port.
- Capture RAM. Run the live triage snapshot.
- If disks are encrypted and mounted, acquire the decrypted volume live before power-off.
- Choose shutdown method. Record it.
Avoid:
- Locking the screen or logging out.
- Opening files or browsing. It alters timestamps and creates artefacts.
- Installing tools on the target.
- Running antivirus, cleaners or updates.
- Writing output to the target disk.
Powered-on, locked
- Photograph the screen. Record the time.
- Do not guess passwords. Do not log in with other accounts.
- Keep it powered. Leave it connected as found, unless the network must be isolated.
- RAM capture of a locked machine needs specialist methods such as DMA or cold boot. Escalate. Confirm legal authority first.
- Powering off loses RAM and may lose keys. Decide with the lead.
Full-disk encryption
- BitLocker, FileVault, LUKS and VeraCrypt keys live in RAM while the volume is mounted.
- Powered on and unlocked: capture RAM and acquire the logical volume before power-off.
- Powered off: a physical image is encrypted. You need a key, password or recovery key.
- Look for recovery keys in Active Directory, the owner's Microsoft account, printouts and password managers.
manage-bde -status
manage-bde -protectors -get C: # BitLocker recovery key info, admin shell
- Avoid: shutting down an unlocked encrypted machine before the decrypted data and RAM are captured.
Servers and production systems
- Agree actions with the system owner. Downtime has a cost.
- Prefer snapshots, agent-based collection and log export over power-off.
- Capture RAM and volatile data live.
- Image disks from a snapshot or a mirror, not from the running system where possible.
- Isolate the host with network rules. Do not shut it down.
- Avoid: rebooting. Reboots wipe RAM and trigger cleanup jobs.
Virtual machines
- Take a snapshot with memory included.
- Copy the VM files from the host: disk,
.vmx,.vmem,.vmss,.vmsn, or the equivalent. - Hash the copies.
- Collect hypervisor logs and host-side network logs.
- Avoid: reverting snapshots or deleting old ones.
Cloud instances
- Preserve logs first. Retention can be short.
- Snapshot the disks. Capture memory with LiME or AVML before any stop.
- Isolate with a restrictive security group. Do not terminate.
- Tag the evidence with case ID and time.
aws ec2 create-snapshot --volume-id vol-0123456789abcdef0 --description "case001 root volume"
aws ec2 describe-snapshots --snapshot-ids snap-0123456789abcdef0
- Collect audit logs: AWS CloudTrail, Azure Activity Log, GCP Cloud Audit Logs, VPC flow logs.
- Avoid: stopping or terminating the instance. It loses RAM and instance-store data.
- If an autoscaling group manages the instance, detach it first so it is not replaced.
Containers
- Preserve the container before stopping it.
- Save the filesystem, config and logs.
docker inspect CONTAINER > inspect.json
docker logs CONTAINER > container.log 2>&1
docker diff CONTAINER > diff.txt
docker export CONTAINER -o container-fs.tar
docker commit CONTAINER case001-evidence
- Collect host-side logs and the image digest.
- Avoid:
docker rm,docker system prune, and restarting policies that replace the container.
Mobile devices
- Leave the device as found: on stays on, off stays off.
- Stop remote wipe and sync: use a Faraday bag or enable airplane mode. Record which.
- Keep it charged. Use a power bank in the bag.
- Photograph the screen. Record the time and any notifications.
- A device that has not been unlocked since boot is in a more protected state. Do not reboot it.
- Do not enter passcodes by guessing. Failed attempts can lock or wipe the device.
- Collect the SIM and any cloud account details the owner provides.
- Acquire with approved tools for the model and OS version.
Network devices
- Capture traffic first if the device is in the path of an incident.
- Export the running configuration. Export logs.
- Avoid: rebooting. The running config and tables are lost. Do not save the running config over the startup config.
show running-config
show ip arp
show mac address-table
show logging
show version
External drives and removable media
- Photograph, label and record the serial number.
- Connect through a write blocker only.
- Disable auto-mount and autorun on the analysis system.
- Image, hash, then examine the image.
Active incident or ransomware
- Isolate the network. Leave the machine on.
- Capture RAM first. Encryption keys and malware may only exist in memory.
- Collect logs from firewalls, EDR and domain controllers in parallel.
- Communicate out of band if the attacker may have mail access.
- Avoid: rebooting, reimaging or wiping before collection.
6. Global Avoid List
- Working on the original evidence.
- Writing anything to the source disk, including tool output.
- Copying files with a normal file copy instead of imaging. It loses metadata and deleted data.
- Using binaries from the target. Rootkits can lie.
- Running
chkdsk,fsckor repair tools on evidence. - Skipping the hash.
- Powering down before volatile data is captured.
- Letting the suspect or other users touch the system after seizure.
- Mixing evidence from different cases in one container or one log.
- Undocumented actions.
- Collecting outside the authorised scope.
7. Documentation and Chain of Custody
Record at collection time. Times in UTC with the local offset.
Case ID: case001
Evidence ID: case001-hdd01
Collected by: NAME
Date/time UTC: YYYY-MM-DD HH:MM (local offset +HH:MM)
Location: ...
Item: make / model / serial number
State found: on / off / locked / unlocked / hibernated
System clock: shown time vs true time, offset
Photos: file names
Tools: name, version, command line
Hashes: source SHA-256 / image SHA-256
Storage: container, location, seal number
Transfers:
date/time | from | to | reason | signatures
8. Acquisition Checklist
- Confirm authority and scope.
- Secure the scene. Photograph everything before touching it.
- Record the state, system time and offset from true time.
- Decide live or dead. Use the order of volatility.
- Capture memory. Hash it.
- Collect network and process snapshots. Log each command.
- Contain: isolate the network. Do not power off yet.
- Acquire mounted encrypted volumes live if present.
- Choose shutdown method. Record it.
- Image disks behind a write blocker. Verify hashes.
- Label, seal and log custody.
- Work on copies.