# Disk acquisition with dd

<div align="center"><img src="https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2Fo8qMvP32YViljKaNFvbN%2Fdd_tools2-498x381.png?alt=media&#x26;token=42f09eb2-e42b-4c73-9a44-e65f8ad6c0d6" alt=""></div>

### 1. Introduction

> Image acquisition involves making a copy (or several copies) of the seized hard disk which can be then used to forensics analysis. This allows the investigators to analyze this image while ensuring the integrity and present condition of the real evidence disk.

In this lab, the evidence hard disk is mounted on ‘/dev/sdc’. The [**dd tools**](https://en.wikipedia.org/wiki/Dd_\(Unix\)) are installed on the lab machine.

Create a disk image for evidence hard disk using dd tools.

### 2. Create Image with dd

Our target disk where we need to do a copy for forensic analysis is mounted on **/dev/sdc**. Let’s check that first.

`df -h`

<div align="left"><img src="https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2FjLmNuPVnVEqtAjrpPbwa%2Fdd1.png?alt=media&#x26;token=fc63adae-6840-4ead-b143-016dd0c05f30" alt=""></div>

It seems that our disk is allready mounted, but is it useful to create a disk image when the disk is mounted?

> When you’re reading/writing to a file on a partition, it should be mounted (obviously, in order to access the file).\
> When you’re reading/writing to a raw disk, it should be unmounted to prevent corruption or inconsistency.

So for preventing any failures it’s better to unmount the disk first!

`umount /mnt/evidence`

<div align="left"><img src="https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2FB2bVeLtg0j5zjkiOw8kA%2Fdd2.png?alt=media&#x26;token=6d6f9c71-4fea-486f-a7af-fc0f8b6dddff" alt=""></div>

So now I’ll use the dd utility to create the image file

`dd if=dev/sdc of=evidence.img`

<div align="left"><img src="https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2FKkdwpgcDDXzIn8wGzmOj%2Fdd3.png?alt=media&#x26;token=d5a58b1d-9ab8-4f57-aa81-960c09f48ffa" alt=""></div>

### 3. Create MD5 SUM

To finalize this task I’ll create a MD5 Checksum of that evidence.img file

`md5sum evidence.img`

<div align="left"><img src="https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2FEH0o9ZHNvQkjWvjVbWaH%2Fdd4.png?alt=media&#x26;token=5ae1920d-ee83-4516-b136-495007b07435" alt=""></div>

### 4. Summary

{% embed url="<https://vimeo.com/676645356>" %}
