Monday, August 21, 2017

Secure deletion of files and Hard disk

Secure deletion of files and Hard disk


Hi,
    There are some situations where you want to securely erase all your important data like Bank accounts detail and some other personnel things. If you are about to sell your computer or dispose it of, then youve to completely wipe the Hard Disk.
   
     Just deleting or formatting the HDD doesnt provide you the full security because there are some softwares available to recover those deleted data. You are supposed to overwrite the entire Hard disk with Junk data, then only it make sense.    Instead of wiping the entire Hard disk, you can also wipe an important particular file. So that it cant be recovered!
   
    If suppose you are deleting your files with the command "rm", it doesnt means that the file has been physically removed the Hard disk; it merely destroys an index listing the location of the file and makes the file�s data blocks available for reuse. Thus a file removed with "rm command" can be easily recovered with recovery tools!
   
    Ubuntu comes with a secured method to erase data and that is "shred" command. Shred can be used to wipe a file or entire hard disk or removable disks.

WIPING STORAGE (removable) DEVICES!
    Let us see how to wiping the removable devices (Pen drive, Flash drive, Memory or SD cards, etc.,). Just follow the steps clearly.
(Note: Files or disks wiped with SHRED command cant be RECOVERED)
   
        1. Plug in your removable device. Then open a terminal window and type mount and look for the line in the output what refers to the USB keystick.
                    Eg: /dev/sdb1 on /media/deepan 
(This is how my device was recognized in my system)
                   
        2. Unmount your USB device by right clicking over that icon and select "Unmount Volume"
       
        3. Open terminal, type the following command to wipe your USB

             sudo shred -v /dev/sdb        
(Note: In /dev/sdb1, the number 1 has beed dropped because 
that numeric value denotes the partition)
                   
        4. Progress of shred is shown in the terminal, since because the option -v (verbose) is used.
       
    This process might take lot of time because "shred" by default overwrites the data with 25 times. If you want to reduce this then follow this command.

        sudo shred -v -n1 /dev/sdb
                   
        5. Everything is okay! Just "Format" your USB and use it.

WIPING FILES!
    Just add the command option -u in the above command to securely delete that particular file(s).
                    Eg: shred -v -n1 -u testing.jpg                         
(Note: -n1 is not necessary if you want to overwrite it for 25 times)


                        shred -v -n1 -u test1.jpg test2.jpg test3.jpg      
   (Note: To wipe [erase] mutiple files in a single command)


                   
WIPING HARD DISK!
    If you want to securely erase or wipe your Hard disk completely, then just follow the steps which are necessary.
   
        1. Insert your Ubuntu CD and boot from it in "Try Ubuntu" mode.
       
        2. When your Desktop appears, open the terminal and type the following:

sudo swapoff

              sudo shred -v /dev/sda
(or)
                        sudo shred -v /dev/sda2        
(Note: To erase or securely delete the second partition alone)

To add "SHRED" command in your "RIGHT CONTEXT MENU (Right Click menu)", ill help you towards this issue in my next post or if you ask me!

Congrats! You have completely practised with "SHRED" command to securely erase the "HDD, USB, FILES". Hope you enjoyed! Dont hesitate to ask!

download file now

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.