Showing posts with label Operating System. Show all posts
Showing posts with label Operating System. Show all posts

Monday, June 22, 2015

Create and Split drive image into multiple parts using dd

In my previous tutorial here I showed you how to use "dd" to create an image of a drive, but in this post I will discuss how to create multiple parts of the same drive image. That is split it into multiple parts rather than just a single large file. 

So you might be thinking what is the utility of this ?

Well the main reason being that if want to create an image of a drive or partition whose size is huge then you will have a problem when you load the image using any forensic tool or hex editor for analysing it. Therefore, it is convenient to create multiple parts of the same and then analysing each one of them. In this tutorial I will tell you how to do so.

Like in my previous tutorial on "dd" we will first find out the device path for the partition or physical drive. We can simply do so by using fdisk. Have a look at the following image :-

[Image: L0dVSTQ.png]

As you can see we have the flash drive mounted already and the device path being /dev/sdb. Now the command format to create multiple parts of the same image is :- 

sudo dd if=<device-path> | split -b <Split-Size> - <Image-File-Name>.

So an example command would look something like :- 

sudo dd if=/dev/sdb | split -b 1000m - usbflash_image.

if = Input file
<device-path> = /dev/sdb
<Split-Size> = Size of Image Parts (either mb or gb etc.)

What we are doing is we read the data and PIPE it to another command that is split which will split the data and create new file with the file name and numbered in a serialized form like aa, ab, ac etc. What split does here is, it takes read the data and when the size is 1000 megabytes (in the command 1000m) it creates a new file with the file name usbflash_image.aa and the next file being named as usbflash_image.ab and so on. The following image will clear it all :-

[Image: yjTZAx9.png]

If you have read this post where I applied similar technique to copy a Very large file to a flash drive in Linux. So I hope you like this short tutorial and if you have any doubts then please comment.

Have a nice day and Keep Coding and Keep Learning. Keep Sharing the posts.

Thank you,
Sincerely,
Psycho_Coder.
Continue Reading →

Using dd to create an image of a Physical Drive

Tux, the Linux penguin
Tux, the Linux penguin (Photo credit: Wikipedia)
Hello Guys/Gals

Today I will show you how to use "dd" to create a raw image of a Physical drive on Linux. dd is a tool that comes in built with almost all or many well known Linux diastros. I am on kali Linux and will show you how to use here. Before we proceed make sure that you have mounted your Physical Drive. If not and you don't know then watch my other video and blog post on Mounting a drive.

We will use fdisk to get the device path first. To see the device path we write :- 

sudo fdisk -l

As you can see our device path is "/dev/sdb1", in your case most likely it would be something similar. Now we use the dd tool to create the copy.

The Syntax is :-

sudo dd if=<device-path> of=<file-name>

So the complete command is :- 

sudo dd if=/dev/sdb of=usbflash_image.dd
Now let me explain what is happening. Here if means input file and of means output file. input file is the complete drive storage and we just need to give the device path.

The drawback of dd is that we are not able to see the progress or status as this doesn't updates the image creation progress. Also we are unable to create the md5 or sha1 hashes of the image during the process is running. Later we will use another tool which can do all of these properly.

For more clarity watch the video.



Continue Reading →

Thursday, June 18, 2015

Using Dban to Securely Wipe data from hard disk

"DBAN is free erasure software designed for the home user. It automatically deletes the contents of any hard disk that it can detect. This method can help prevent identity theft before recycling a computer. DBAN is also a commonly used solution to remove viruses and spyware from Microsoft Windows installations. "
--- Original Site < http://dban.org/ >

About its short commings and drawbacks read the info from the original site (link given above)

So lets move directly into how to use it. The tool comes in a iso format and you can either write it on CD/DVD or on flash drive. I would recommenend you to use it on a flash drive since its on 15 mb in size and if you use a CD or DVD then its wasted.

I will first show you how to use dban by creating a Virtual machine for ir. I am using Virtual Box which comes by default in fedora 19 (I am using fedora 19 at present).

So first download the iso file from here : http://sourceforge.net/projects/dban/files/dban/dban-2.2.8/dban-2.2.8_i586.iso/download

The file is only ~15 MB in size and so the download will be quick.  I downloaded it here :-

[Image: oGeI1wu.png]

Now download and install virtual box or VMware Player which ever you wish to use. I am using Virtual Box. If you don't have them already then you can download them from the following :-

Virtual Box : https://www.virtualbox.org/wiki/Downloads

VMware Player:
https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/6_0

The application I am using is called Boxes and is more like Virtual Box and comes installed with Fedora 21. So open Boxes and click new.

[Image: YvYj2c4.png]

You will get the following screen :-

[Image: PN56jos.png]

Click on Continue and the following screen will appear :-

[Image: N5i0iAw.png]

As you can see Virtual Box have already listed the ISO's but if it doesn't shows up then you can Click on Select File and Choose the DBAN ISO file

[Image: dDvKPrV.png]

After you choose open the following screen will appear :-

[Image: gigq28H.png]

If you wanna customize then click on customize. After you do so you will :-

[Image: tkCeThd.png]

But in our case there is nothing to customize we are wiping data. You will probably perform it on your complete HDD and so it unnecessary. If you have done this much then click on Create on Top right corner (in case of Virtual Box)

[Image: 3tSKzdi.png]

The following screen will appear showing the different DBAN options and its main interface:-

[Image: aDlyG64.png]

Click on the blue screen to enter the VM. If you press Enter autonuke setting will start which is the default and the recommended option. To see the other cmmands available press F3. You will see the following :-

[Image: RXNHezV.png]

We will go with the default option and we will press enter on the first screen screen that appears. After we do so will see the following :-

[Image: 4HFvDVv.png]

[Image: YofN2FX.png]

Now its will list all your HDD or flash drives attached. Now select the drive you want to wipe and press SPACE to select it. You can use UP and DOWN keys to select other drives (if any). After you have done this press F10 to start the process.

[Image: ughSSHV.png]

You will be able to see the time remaining to complete, no. of rounds or number of steps etc etc.Once the process s complet a black screen will come with the confirmation that the data has been wiped clean :)


Install using Flash Drive

To use dban using a flash drive you first need to write it onto the drive itself.

To write the ISO in flash drive I would recommened you to use Universal USB Installer if you're on Windows Since it comes with a pre loaded config for DBAN ISO and so it will be better imho. Linux users can use Unetbootin.

After you have done so simply boot your system and from Boot Options run using the flash drive and the rest i like I explained above after you create the VM.

Thats all for today and I hope you like the tutorial.
 
 
Continue Reading →

Follow Me!

Followers

Visitor Map