Forensic Disk Imaging Step-By-Step
Forensic Disk Imaging Step-By-Step
By Synjunkie
For one reason or another you may want to make a copy of a hard disk. I will describe methods to create a bit-for-bit copy of a hard disk either to a local device or over a network. The thing to remember throughout the examples listed below is Linux thinks of everything as a file. So the file it sees as hda in the /dev directory is actually the harddisk. The following software will be used in the examples listed below: A bootable live linux distro that does not auto mount drives such as Helix dd nc split md5sum cat
dd, nc, md5sum, cat and split are available on Linux and Windows. Regarding hardware you will require the following: 2 x Computers (if creating a copy across a network) USB thumb drive USB hard drive (If creating the image to a USB hard drive)
Example 1 A Copy Across A Network To make a copy across a network you will need 2 computers, the target computer, Computer01, and the computer you will be copying to, Computer02. 1. Insert the Linux boot disk into Computer01 and boot the system into Linux. 2. Insert the USB thumb drive, if this doesnt automatically mount it will require mounting. In my examples below I will assume it is /dev/sdb1 and has been mounted as /media/USB. 3. Locate the disk you want to copy in the /dev directory, in my examples the hard disk will be called hda yours maybe something similar. 4. Using the command md5sum /dev/hda >/mount/USB/diskimage_md5hash.txt create a MD5 hash of the drive on the mounted USB drive so you can test this against the copied file to verify the integrity. 5. On Computer02 make sure you have enough diskspace to accommodate a file the size of the disk you are going to copy and using netcat (nc) run the command nc L p 6677 >c:\diskimage.img What you have done here is to set up netcat (nc) to listen persistently (-L) on port 6677 (-p 6677) and send the output to a file on C:\ of Computer02 (>c:\diskimage.img). 6. From Computer01 run the following command:
Revised December 2, 2008 Page 1 of 4
Page 3 of 4
Page 4 of 4