Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

Possible Duplicate:
How can I reliably erase all information on a hard drive?

I purchased an external hard drive and have been saving various things including system backups to it. I got it a month ago and it's almost full so I'm returning it for a larger one. I want to make sure I don't leave any sensitive information on it, as I mentioned it has full system backups so that's basically everything. Is there a tool I can use the securely deletes the free space? The drive came with a few files that I'd like to leave intact -- but if that can't be done not my problem.

share|improve this question

marked as duplicate by Rory Alsop Jan 25 '13 at 9:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
If you're on Windows, Eraser looks pretty interesting. –  Henning Klevjer Jan 25 '13 at 7:40
    
Or just cipher /W, which comes with Windows. –  Polynomial Jan 25 '13 at 8:50

2 Answers 2

If you're just trying to securely wipe the slack space of the drive, i.e. the sectors that are free after file deletion, there are a few easy ways to do it.

On Windows, you can use cipher /W:C:\ (replace C for the drive letter you're targeting) to perform secure deletion of the free sectors. This should work fine for HDDs, and even implements (arguably pointless) multi-pass wiping.

For Linux, you can use the secure-delete tool, which should be available from your package repository. There's an answer on SuperUser that covers this. Again, this supports multi-pass wiping, but it's unnecessary.

Keep in mind that if your external drive is running over USB it will be slow. If possible, remove it and hook it up to the computer directly, e.g. via SATA. This will massively increase the disk throughput.

If the external drive is an SSD, things get more complicated. SSDs are built out of special flash cells which have limited write capacity; once you write to them a few million times they'll burn out. In order to make the lifespan of these devices more useful, two main techniques are used. The first is wear levelling, which involves distributing the writes across different cells, and storing a map to these fragmented instances of data. This helps solve cases where a single file is written to frequently, which would normally result in the same cell being written over and over, causing premature burnout. Unfortunately this also means that you can't guarantee that a file write will actually overwrite the same physical cell, so you can't guarantee that you've wiped the data. The other technique involves providing redundant cells which can be used to help increase the lifespan of the disk. When a cell is detected to be faulty (usually through burnout) it is re-mapped to a redundant cell. Unfortunately this means that old data might be left behind on the old cell, which also leads to leakage.

In order to provide some form of secure deletion method on SSDs that works despite the life extension mechanisms, without resorting to extensive erasure operations, manufacturers encrypt all data that goes onto the sectors with a strong block cipher such as AES. The key for the encrypted data is stored on the device, and the encryption / decryption is entirely transparent to the operating system. When the user wishes to securely wipe the device, the operating system can send a special command to the drive which causes it to generate a new key and overwrite the old one. This renders all data on the device, redundant or not, entirely unreadable, without ever writing over the cells. Unfortunately this results in deleting everything from the disk, including all partitions. There's no way to do a partial secure delete - you'd have to copy the files you want to keep over to another disk, then wipe it, then bring the files back over.

Actually doing this secure deletion operation is usually dependant on the device, but most manufacturers provide tools or instructions on how to do it.

share|improve this answer
    
fyi according to this site cipher has been reported to delete data it's not supposed to ssd.eff.org/tech/deletion –  Celeritas Feb 24 '13 at 7:40
    
@Celeritas If you read the page fully, and do some research elsewhere, this actually turns out not to be a big deal. The flaw is that it follows certain types of filesystem links (e.g. symlink) without warning, and might result in deleting other files if you try to wipe a directory that contains a symlink. Of course, if you're only targeting one file or aren't using symlinks, you're fine. Regardless of the bug, using cipher /W to wipe slackspace is still safe. So for security purposes, it's fine. –  Polynomial Feb 24 '13 at 16:32

Look at this Erase your hard disk

Sure Delete 5.1.1 will be software the one you are looking for.

share|improve this answer
    
-1 for recommending CCleaner. Its free space wiping algorithms are awful, and don't guarantee proper wiping of all free sectors. –  Polynomial Jan 25 '13 at 8:29
    
@Polynomial see my second line starting with 'Another better way..'. It says the former way is a option and but is better than that option. –  sujeesh Jan 25 '13 at 8:43
    
I'm not going to remove my -1, because I don't think that a couple of product recommendations constitutes a proper answer. –  Polynomial Jan 25 '13 at 8:46
    
@Polynomial you are always welcome and you can -1 the answer. I have posted whatever i know and those who want it they can choose as their wish. It's up to them. –  sujeesh Jan 25 '13 at 9:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.