Post

Evidence Acquisition: Write Blocking, Imaging & RAM Capture

Write-protecting USB media through the registry, imaging disks with FTK Imager and dd, proving integrity with hashes, and capturing RAM on Linux and Windows.

Evidence Acquisition: Write Blocking, Imaging & RAM Capture

Overview

First post in the Digital Forensics Labs series. Every investigation starts the same way: get a copy of the evidence without changing it, and be able to prove you didn’t. This post covers that foundation:

  1. Software write blocking on Windows through the registry
  2. Disk imaging with FTK Imager, and hash verification
  3. What does and doesn’t change a hash
  4. A small case scenario on a prepared forensic image
  5. Command-line imaging with dd on Linux
  6. Memory acquisition with AVML (Linux), DumpIt and Magnet RAM Capture (Windows)

All work was done in isolated lab VMs on my own USB media and on course-provided evidence images.


Step 1: Software Write Blocking

Before plugging evidence media into an analysis machine, writes to it have to be blocked — otherwise Windows alone will happily update timestamps and metadata. Hardware write blockers are the gold standard; Windows also supports a software policy through the registry.

Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control, I created a new key named StorageDevicePolicies:

StorageDevicePolicies key created The new StorageDevicePolicies key

Inside it, a DWORD (32-bit) value named WriteProtect, set to 1:

WriteProtect set to 1 WriteProtect = 1 enables write protection for USB storage

Testing it with a USB drive: reads still work, but any write — here, deleting a file — fails:

1
2
3
D:\>del "Screenshot 2026-03-07 165204.png"
D:\Screenshot 2026-03-07 165204.png
The media is write protected.

Write-protected USB test Windows refuses the delete: the policy is working

A registry write block is good for practice and quick triage, but it only works on the machine where it’s configured and can be undone by anyone with admin rights. Real casework uses a hardware write blocker.


Step 2: Creating and Verifying a Disk Image in FTK Imager

With the drive protected, I created a full image in FTK Imager: File → Create Disk Image, selecting the physical USB drive as the source.

Selecting the source drive Choosing the physical USB drive as the image source

Image creation settings Destination, format, and “Verify images after they are created” enabled

Imaging in progress FTK Imager copying the drive sector by sector

After acquisition, FTK Imager hashes both the source and the image and compares them:

Verification results MD5 and SHA1 for the source and the image — both verified

The image summary records everything needed for the case file:

FieldValue
Source size7,386 MB
Sector count15,126,528
MD529451cfef09793eded8f8702f0da1304 — verified
SHA1f252595bdff2ad15d86c19a5923de1dc32494189 — verified

Image summary The acquisition log FTK Imager writes next to the image

Matching hashes are the proof that the image is a bit-for-bit copy — this is what makes the image usable as evidence.


Step 3: What Changes a Hash?

To see hashing from the other side, I added the USB drive as a Logical Drive (I only needed the files, not every sector) and exported a hash list for a small text file.

Logical drive in FTK Imager The USB drive added as a logical drive

Export file hash list Exporting MD5/SHA1 for the file to CSV

Then I edited one line in the file and exported the hashes again:

1
2
Before: 7801049f193551b585b46d4463740509e7311fb9
After:  f1c3e486e0fd04b7be056c5bb0a4506b28aba4bd

Hash before and after modification A one-line edit produces a completely different SHA1

Hash functions are designed so that any change to the input — even one byte — produces an unrelated output. That’s what makes them useful for integrity.

What a hash does not cover is the file’s name or location: those live in the file system, not in the file content. Renaming or moving a file leaves its hash unchanged — which is exactly why hash matching can find a suspect’s renamed copy of a confidential document.


Step 4: Case Scenario — Did an Employee Take Company Data?

The last FTK Imager exercise was a prepared image from a suspect employee’s machine. After adding the image and verifying it, browsing the user profile turned up sensitive files in plain sight:

  • Desktop\financial_stament_2009.pdf
  • Documents\!assword.txt
  • Downloads\All customers.xls

Evidence image added and verified The suspect image loaded and verified in FTK Imager

FTK Imager’s properties pane gives the file-system timestamps for each item:

File properties and timestamps Created, modified, and accessed times for one of the recovered files

Hashes then answer the key questions:

  • Secret_Project.docx did not match the hash of the company’s original — so it’s a different (likely modified) version, not an exact copy.
  • ProjectX.zip in Downloads did match a confidential company file exactly. Same hash, same content: this is a copy of company data on the employee’s machine.

Forensics establishes facts, not guilt. Here the evidence shows confidential files were present on the suspect’s system, and one is a byte-for-byte copy of a company file. How it got there, and whether it was authorized, is for the wider investigation.

To recover a deleted file in FTK Imager: find the entry marked as deleted in the evidence tree, Export Files, then hash the exported copy and record it so its integrity can be shown later.


Step 5: Imaging from the Command Line with dd

The same acquisition on Linux, with nothing but standard tools:

1
2
3
4
lsblk                                   # identify the source disk and the USB target
sudo mkdir -p /mnt/myUSB
sudo mount /dev/sdb1 /mnt/myUSB         # mount the destination drive
sudo dd if=/dev/sda of=/mnt/myUSB/image.dd bs=64k conv=noerror,sync status=progress
OptionWhy
bs=64kRead/write in 64 KB blocks
conv=noerrorKeep going past read errors instead of aborting
conv=syncPad unreadable blocks with zeros so offsets stay aligned
status=progressShow live progress

The acquisition took 2,583 seconds. A larger block size such as bs=1M usually finishes faster because it cuts the number of read/write calls — though with conv=noerror,sync, a bad sector then costs a whole 1 MB block of zeros instead of 64 KB.

The raw dd image opens directly in FTK Imager, where its hashes can be computed and compared to confirm it wasn’t altered:

dd image in FTK Imager The raw image.dd loaded into FTK Imager

dd image verification Verifying the dd image’s hashes in FTK Imager


Step 6: Capturing RAM

Disk images miss everything that only lives in memory — running processes, network connections, decrypted data, injected code. Memory has to be captured first, while the system is still running.

Linux: AVML

AVML is a single static binary. After downloading it, it needs execute permission before it can run:

1
2
3
file avml            # confirm it's a static x86-64 ELF
chmod +x avml
sudo ./avml memory.dmp

Preparing AVML Checking the binary and adding execute permission

AVML memory dump The resulting memory.dmp with its permissions, owner, size, and timestamp

The dump should go to external media, not the suspect’s own disk: writing gigabytes to the local drive could overwrite deleted-file remnants and other evidence, and it keeps the capture safely off the system under investigation.

Windows: DumpIt vs. Magnet RAM Capture

ToolDump sizeNotes
DumpIt3.98 GBCommand-line, minimal interaction
Magnet RAM Capture4.50 GBGUI, choose output location and format, progress display

DumpIt output DumpIt’s memory image

Magnet RAM Capture output Magnet RAM Capture’s memory image

How long a capture takes depends on the amount of RAM, the speed of the destination drive (USB write speed is often the bottleneck), CPU and memory performance, and how busy the system is during acquisition.


Conclusion

Acquisition is the step every later finding depends on. This lab covered the full chain: block writes, image the media, hash the source and the copy, and capture volatile memory before it’s gone.

Key takeaways:

  • Hashes are the proof. A verified MD5/SHA1 match is what makes an image trustworthy evidence.
  • Content changes the hash; names and locations don’t. That’s what lets hash matching find renamed copies.
  • dd is enough to image a disk, with conv=noerror,sync to survive bad sectors without shifting offsets.
  • Capture RAM first, and to external media. Memory disappears on shutdown, and writing to the suspect disk can destroy evidence.

Digital Forensics Labs series

  1. Evidence Acquisition: Write Blocking, Imaging & RAM Capture (you are here)
  2. File Systems, Offline Registry & File Signatures
  3. File Carving: Recovering a JPEG & PDF from Unallocated Space
  4. Autopsy Investigations & Office Document Metadata
  5. Browser & Email Artifacts: Chrome, Firefox & Mail Headers
This post is licensed under CC BY 4.0 by the author.