Sunday, 21 June 2009

Using dd for a secure disk wipe

The best tool I know of for wiping disks is DBAN which boots from CD and can wipe all attached hard drive to MOD standards. If you are serious about wiping your data forever then I strongly recomment you look to DBAN.  Or take the drive apart and physically destroy the platters.  For a quicker homemade version read on.  Bear in mind that a small mistake here can COMPLETLY AND IRRETREVABLY DESTROY ALL YOUR DATA! You have been warned.


UPDATE: This is unlikley to be as effective on newer SSD based hard drives due to their wear leveling technology.

To wipe a disk (eg sda) use the following (multiple times if paranoid):
# dd if=/dev/urandom of=/dev/sda ; sync
Or a quicker version which is not as secure but should be fine unless you have pissed off GCHQ or similar (in which case its probably already to late anyway):
# dd if=/dev/zero of=/dev/sda ; sync
To determine current progress find the PID of the dd process then pass it a command using kill:
# ps -A | grep dd
# kill -USR1 <pid>

No comments:

Post a Comment