Digital Forensic Tools
Home / Workflows / Forensic image and hash values
Case workflow

How do I make a forensic copy of a drive and prove it is exact?

A forensic image is a bit-for-bit copy of a drive, made so that you can examine the copy and leave the original alone. This workflow shows how to block writes, make the image, and use hash values to show that the copy is exact.

This workflow was written from the tools' documentation and published references. It has not yet been checked step by step on the practice data. If a step does not match what you see, please report it.

What you will be able to answer

  • Why you never work on the original drive
  • How to stop a computer from writing to the drive you copy
  • Which image format to choose, raw (dd) or E01
  • How to make an image and record its hash values
  • How to check later that the image has not changed
  • What to write in your notes and chain-of-custody record

What you need

  • A drive to copy, or the small practice image described in the practice section
  • A write blocker, or a lab computer set up to block writes (see step 2)
  • A destination drive with more free space than the source drive holds, and that is not the source

Steps

  1. 1

    Never work on the original

    Even opening a drive in a normal way can change it. Windows may write to a drive when it is connected, and a file system can change its own records. So the original is copied once, and all later work is done on the copy. Before you start, photograph the drive and write down its make, model, serial number, size, and the date and time. On Linux, the command shows name, size, model and serial number of attached drives.

    lsblk -o NAME,SIZE,MODEL,SERIAL

    On real cases, follow your lab's rules for who may handle the evidence and how.

  2. 2

    Block writes to the source drive

    A hardware write blocker sits between the drive and the computer and refuses any command that would write. This is the usual choice in a lab. On Linux, blockdev can mark a drive read-only, and a live system such as CAINE is set up to avoid mounting drives. Afterwards, blockdev --getro prints 1 if the drive is read-only. The change does not affect a drive that is already mounted for writing. Test any software method on a spare drive first.

    sudo blockdev --setro /dev/sdb

    Use the real device name of the source drive instead of sdb. Check it with lsblk first. A wrong name can mark, or later overwrite, the wrong drive.

  3. 3

    Choose an image format

    A raw image (also called dd) is a plain copy of every sector. Almost every tool can open it, but it holds no case notes, and it is as large as the drive. An E01 image (Expert Witness format) can store case details, compress the data, split into parts and keep the hash values inside the file. In ewfacquire, -d sha256 adds a SHA-256 next to the MD5, -t sets the file name and -f the format. It asks for case number, examiner and notes.

    sudo ewfacquire -d sha256 -t evidence01 /dev/sdb
  4. 4

    Make the image with a graphical tool

    In FTK Imager (Windows), choose File, then Create Disk Image, pick Physical Drive, add a destination and an image type, and tick Verify images after they are created. It writes a text log beside the image with the MD5 and SHA1 values and the verification result. In Guymager (Linux), choose Acquire image, fill in the case fields, select the hashes (MD5, SHA-1, SHA-256) and tick the two re-read and verify options. Save to a different drive than the source.

    Choose the Physical Drive, not a single volume, so that the copy includes the partition table and unused space.

  5. 5

    Or image from the command line

    dc3dd is a version of dd made for forensic work. With hof= it writes the image, hashes the output as well as the input and compares the two. log= saves the I/O figures, the hashes and any errors in a text file and the run ends with a completed line. Read the log before you trust the copy. For a failing drive that gives read errors, GNU ddrescue reads the good areas first and keeps a map of the bad ones.

    sudo dc3dd if=/dev/sdb hof=evidence01.dd hash=sha256 log=evidence01.log
  6. 6

    Understand and compare hash values

    A hash value is a short code calculated from all the data. If one bit changes, the code changes completely. MD5 and SHA-1 are older and still common in lab notes. SHA-256 is stronger, and many labs record two types. Compare the hash of the source, as read during the copy, with the hash of the image. They must match. In an E01 file the stored hash covers the data inside, so hashing the .E01 file itself gives another value, which only shows the file was not changed afterwards.

    sha256sum evidence01.dd

    On Windows PowerShell, Get-FileHash evidence01.dd -Algorithm SHA256 prints Algorithm, Hash and Path. SHA256 is its default.

  7. 7

    Verify the image again later

    Hash the image again before you start analysis, and again before you give it to anyone else. ewfverify checks an E01 image: it prints the hash stored in the file and the hash it calculates over the data, and ends with ewfverify: SUCCESS when they match. In FTK Imager add the image and use Verify Image. QuickHash GUI and hashdeep can hash raw images and whole folders. A changed hash means the file changed, so stop and report it.

    ewfverify evidence01.E01
  8. 8

    Keep notes and a chain-of-custody record

    Write down who handled the drive, when, and where it went. Record the tool and version, the settings you chose, the hash values, the start and end time, and any errors. A chain-of-custody record is the list of every person who held the evidence, with dates and times. Keep the first image as a master that nobody opens, and work on a working copy. After you copy the image to a new place, hash the copy and check that it matches the master.

  9. 9

    Cross-check and write it down

    Confirm the hash values with a second tool, for example the value in the imaging log and a value from QuickHash GUI or sha256sum. For a raw image you can also hash the source drive itself through the write blocker and compare. In your notes, record the tool names and versions, the hash type, the hash values, the source drive details, any read errors, and the time zone of your computer.

Where the evidence is stored

Image fileDestination drive (.dd, .raw or .E01 files)
The copy of the drive that all later work uses
Acquisition log or summary fileBeside the image, for example a .txt or .log file
Tool, time, settings, hash values and read errors
Source hash valueLog or case notes
The hash of the data as it was read from the drive
Verification hash valueVerification report or your notes
The hash of the finished image, to compare with the source hash
Hash values stored in an E01 fileInside the E01 file, shown by ewfverify or ewfinfo
The hash of the data when it was acquired
Chain-of-custody recordLab paperwork or case system
Who held the evidence, and when
Drive details and photosCase notes
Make, model, serial number and condition of the original

Check your result

  • Compare the hash in the imaging log with a hash you calculate yourself with a second tool.
  • Run ewfverify, or Verify Image in FTK Imager, and confirm that the stored and calculated values match.
  • Compare the image size with the drive size from lsblk or the maker's label. A big difference needs an explanation, for example a hidden area or a read error.
  • After every copy to a new place, hash the copy again and compare it with the master.

Common mistakes

  • Typing the wrong device name. A mix-up of source and destination in dd-style commands can overwrite the evidence.
  • Imaging a single partition or volume when the whole physical drive was needed.
  • Saving the image on the source drive, or on a drive that is too small, so the copy fails or changes the source.
  • Comparing the hash of the .E01 file with the hash of the source drive. They are different things.
  • Skipping the write-protection test, or mounting the drive before it is set read-only.

Write it up

A short, careful way to state this kind of finding in a report. Change the details to match your own results.

The [make and model] drive, serial number [value], was connected through [write blocker or method] and imaged on [date and time, time zone] with [tool and version] to [format]. The source hash ([type]) was [value]. The image hash was [value], and verification matched. The log reported [number] read errors.

What this does not prove

  • A matching hash shows that the image equals the data that was read. It does not show that the drive was untouched before you received it.
  • Bad sectors cannot be read. The image then holds gaps or filler, and a later read of the same drive may give a different hash.
  • An SSD can move and clear data by itself, for example with TRIM and garbage collection. Its content can change even when no one writes to it.
  • An encrypted drive gives an encrypted image. You need the key or password to read the files inside it.
  • Some drives have hidden areas, called HPA and DCO. A tool or write blocker may not show them unless it is set up to. Check the drive's size against the maker's stated size.
  • MD5 and SHA-1 have known weaknesses. Record SHA-256 as well when you can.
  • A drive or a user account shows a device, not the person who used it.

Practise on public data

NIST CFReDS: Data Leakage Case (removable media image RM#1)

by NIST

The case page lists several images of removable media, among them an E01 image called rm#1.E01, about 74.5 MB, made with FTK Imager behind a write blocker. NIST publishes SHA-1 values for each download file on a hash values page linked from the case page. For RM#1 the file name there is cfreds_2015_data_leakage_rm#1.E01 and the value begins FFD0F3CB. The PC image on the same page is about 5 GB or more. NIST publishes an answer document for the case, but it is about the investigation, not about imaging.

Your task. Download the RM#1 image. Calculate its SHA-1 with QuickHash GUI, sha1sum or Get-FileHash -Algorithm SHA1 and compare all 40 characters with the NIST page (ignore upper or lower case). Run ewfverify on it and note the stored and calculated hash lines. Then image your own spare USB stick twice with dc3dd or Guymager and check that both hashes match.

The published hash is for the downloaded file, not for a physical drive. Use only a spare USB stick that holds nothing you need, and check the device name with lsblk before every command.

Where to go next

Sources and further reading

A study guide written in our own words. It is not a legal or laboratory procedure. Follow your own lab's approved method on real cases. Last reviewed 24 Nov 2026.