HARDCORE BLUE ← Home
Articles

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

2. Order and Degrees of Volatility

Volatility is how fast data disappears. Collect the fastest-decaying data first.

Degrees

Order of volatility (RFC 3227)

#DataLifetimeHow to collect
1CPU registers, cacheNanoseconds to millisecondsRarely practical. Partial state appears in crash dumps.
2Routing table, ARP cache, process table, kernel statistics, RAMUntil power loss or overwriteMemory image, then network and process snapshots
3Temporary filesystems: /tmp, /dev/shm, swap, pagefile, hibernation fileUntil reboot, cleanup or overwriteCollected with the disk image, or live if tmpfs
4DiskUntil overwrittenForensic image
5Remote logging and monitoring: syslog, SIEM, EDR, NetFlow, proxy, cloud audit logsDays to months. Set by retention.Export now. Send preservation requests.
6Physical configuration, network topologyStablePhotos, diagrams, cabling notes
7Archival media: backups, tape, opticalYearsCopy and hash

Modern additions

3. Types of Acquisition

Live and dead

Live (system on)Dead (system off)
CapturesRAM, network state, processes, mounted encrypted volumesDisk contents
RiskAlters the system. Tools leave a footprint.Volatile data is already gone
Use whenActive incident, encryption, malware, server that cannot go downPowered-off devices, standard disk cases

Scope of the copy

Image formats

Write protection

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

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

PlatformToolsNotes
WindowsWinPMem, DumpIt, FTK Imager, Magnet RAM CaptureRun as administrator. Output file is roughly the size of RAM.
LinuxAVML, LiMELiME 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.
VMwareSuspend or snapshot the VMCollect the .vmem with its .vmss or .vmsn file.
VirtualBoxVBoxManage debugvmDumps guest memory without touching the guest.
Hibernated hosthiberfil.sysRAM 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 shutdownPull the plug
ProsFlushes buffers. Consistent filesystem.Freezes disk state. No shutdown scripts run.
ConsRuns shutdown scripts. Writes to disk. May clear the pagefile. May trigger cleanup or wiping malware.Unsaved data lost. Possible filesystem or database corruption.
Default forServers and databases, agreed with the ownerWorkstations and laptops in most protocols

5. Seizing Evidence by Situation

Powered-off computer

Do:

Avoid:

Powered-on, unlocked workstation

Do:

Avoid:

Powered-on, locked

Full-disk encryption

manage-bde -status
manage-bde -protectors -get C:      # BitLocker recovery key info, admin shell

Servers and production systems

Virtual machines

Cloud instances

aws ec2 create-snapshot --volume-id vol-0123456789abcdef0 --description "case001 root volume"
aws ec2 describe-snapshots --snapshot-ids snap-0123456789abcdef0

Containers

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

Mobile devices

Network devices

show running-config
show ip arp
show mac address-table
show logging
show version

External drives and removable media

Active incident or ransomware

6. Global Avoid List

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

  1. Confirm authority and scope.
  2. Secure the scene. Photograph everything before touching it.
  3. Record the state, system time and offset from true time.
  4. Decide live or dead. Use the order of volatility.
  5. Capture memory. Hash it.
  6. Collect network and process snapshots. Log each command.
  7. Contain: isolate the network. Do not power off yet.
  8. Acquire mounted encrypted volumes live if present.
  9. Choose shutdown method. Record it.
  10. Image disks behind a write blocker. Verify hashes.
  11. Label, seal and log custody.
  12. Work on copies.