Digital Forensics

Digital Forensics, Part 1: Capturing a Forensically Sound Image

77 / 100

Digital Forensics, Part 1: Capturing a Forensically Sound Image

Digital forensics is rapidly growing field of information security. The hacker needs to understand what evidence can be recovered and the security engineer needs to know how to find it.

These skills are applicable to law enforcement, corporate investigations, network intrusions, malware analysis and incident response, among many others. No matter what area of information security your are in or hope to join, skills in this field will prove invaluable, so let’s get started.


Before any forensic investigation or analysis can begin, a forensically sound image must be captured of the data storage device. These forensically sound images must be a bit-by-bit, physical copy of the device. Without such a copy, any evidence will likely be inadmissible in a court of law.

There are multiple ways to capture forensic image of a storage device. We will look a few of the most popular methods here.


Using Linux/UNIX dd command

The Linux dd command is built into nearly distribution of Linux. It simply copies a storage device bit-by-bit from a input or source file (if) to an output or destination file (of). We can use it here with our Kali, or for that matter any Linux distribution, to do this.

First, we need to find out how our USB flash drive is represented in the Linux operating system. We can do this by typing;

kali > fdisk -l

Our flash drive is represented as /dev/sdb1 in Linux. Since the 1 at the end represents the partition number and we want to capture the entire device, we can represent the flash drive as simply /dev/sdb.

To then capture the flash drive entirely, we simply need to invoke the dd command followed by the input file if=/dev/sdb and then the output file. This can be anything we want to name our output file. Here I will name it usbimage.dd.

kali > dd if=/dev/sdb of= usbimage.dd

After hitting enter, the dd command will begin to copy, bit-by-bit, the data from the USB drive to the file we designated usbimage.dd. If we want to check to see whether anything is actually happening, we can open another terminal window and type ls -l.

6A4A49 24D0572DA5E147ECA59874CCCD02B0D2~MV2

As we can see in the screenshot above, dd has begun the process of creating my forensically sound image.

dd represents the most basic of all image capture techniques and creates the foundation used in many other methods

Using dcfldd

A few years back, the Department of Defense Computer Forensics Lab (dcfl) developed of an open source version of dd specifically designed for creating forensic images. While the dd command is a generic command for copying storage devices, this command has options tailored for creating forensic images, but at its heart, it is still dd.

dcfldd has the capabilities to;

(1) hash the image on the fly
(2) a progress bar
(3) wiping disks
(4) verification that the new image is identical to the original
(5) simultaneous output to multiple files or disks
(6) logs and output can be piped to external applications

Like dd, dcfldd can ONLY produce raw images.

To create a forensically sound image of our USB flash drive, we can use dcfldd similarly to dd, but we have more options. So for instance, if we wanted to create a MD5 hash of the image (a good idea), we can type;

kali > dcfldd if=/dev/sdb of= usbimage2.dd hash=md5 hashlog=usbimage.log

6A4A49 2808792CB05443BEB6856D547F7DBCC1~MV2
Notice that dcfldd shows us the status of your imaging process, unlike dd.
6A4A49 31C980B173954439AA5CC0B0D401BA12~MV2
When dcfldd has completed its imaging, it responds by telling how many blocks were written and how many blocks went in and how many blocks out.

Once the capture is complete, we can then check to see whether the images and log have been completed by typed ls -l.

kali > ls -l

6A4A49 EB33981EE4FD49BE9A733C29968A4180~MV2
As we can see, dcfldd created the image and also created the image log. Inside the image log should be the MD5 hash of the image. To see it, simply type;

kali > more usbimage.log

6A4A49 94FC747392FE40E1BEA1C7F3444D35AE~MV2
dcfldd is an excellent, if rudimentary, tool for creating forensically sound device images. Very few frills and no GUI, but fast and straightforward.
FTK Imager

The software developer, Access Data, sells a forensic suite known as the Forensic Tool Kit or FTK. As part of that suite of tools they have developed a tool known as the FTK Imager. This tool is designed specifically to create forensically sound images with a easy to use GUI. They have long provided this tool for free and as a result it has become the tool of choice in many forensic environments for creating forensically sound images.

You can download the FTK Imager at

After installing and executing FTK Imager, you will be greeted with a familiar interface like that below.

6A4A49 63D0DDC9A058490C86FC42D2EC42CF40~MV2

Note that like many Windows applications, it has the familiar top-line pull-down menus starting with “File”.

Click on “File” and go to “Create Disk Image”.

6A4A49 687E85FBBF6D4C079C03DD2F4EB29346~MV2

When you do, a window like the one below will open. Select “Physical Drive”.

6A4A49 B596966C251841D3AA0CFB170021C933~MV2

This will open another window asking you to select the source drive location. Here, I have selected “General USB Flash Disk”. Yours may be slightly different.

6A4A49 1CFA8724ABB64C45BAC0133FBF7999BD~MV2

Click “Finish” after selecting the device.

Next, you will prompted to enter the “Image Destination”. Click “Add” . Note also that I have indicated in the lower left corner that I want the images verified after they are created.

6A4A49 A9469493E47D4DC59A64282E78F39F84~MV2

You should then be prompted for the type of image you would like to create. Select a “Raw” or dd image.

6A4A49 69C273EC88494334B3A470D3DAF4AE57~MV2

After we have entered all that information about our image creation, FTK Imager will prompt us to create a case. The case creation process requires;

(1) a case number

(2) evidence number

(3) a unique description

(4) the examiners name
(5) notes
6A4A49 8B50B0FBA3944D68848C1622BF8C4934~MV2

Fill in this form appropriately and hit “Next”. We will next be prompted for the image destination. Here, I have created a folder specifically for forensic images named unimaginatively, c:\forensic images. I have also named the image file, “firstimage.dd“.

6A4A49 BCD673C82A6044DAB79CDD2A817822AC~MV2

Now, click “Finish”. You will now be returned to the “Create Image” window. Click “Start”.

6A4A49 FE780E15A3584DE3A938E721A0E81AF8~MV2

FTK Imager will now begin the time consuming process of copying the device, bit-by-bit to the file you have designated.

6A4A49 3955615D69AE4952A8115E83E0115470~MV2

When it has successfully completed, you will see it stop and in the status window you will see “Image created successfully”. It will then begin to try to verify that that the newly created image is identical to the original. This can take awhile, so be patient.

6A4A49 DF7CBBC299CF41048DA75F59432EECD2~MV2

Finally, when the image verification is complete, click on “Image Summary” and it will open a window of summary statistics on the image including the all important hashes like that below.

6A4A49 C27B7DF4F14942F0BC3AAD15AD1D8FA4~MV2

Success! We have created a forensically sound image of our USB device, verified that it identical to the original and generated both a MD5 hash and a SHA1 hash.



In this tutorial, we have created a forensically sound image using the three (3) most popular methods. This is usually the first step in any investigation and is critical to the overall success of the investigation. Without a good image, any further work invested in the investigation may be for naught.