Background
The secure deletion of data is an often overlooked aspect of computer security, but without the secure deletion of sensitive information, such as encryption keys, many other security methods are ineffective. When files are normally deleted, the data is not actually overwritten or removed from the disk, but instead the area of the disk where the file(s) reside is marked as free. Until another file occupies this space, the data remains and is easily recoverable. If an attacker can obtain encryption keys that were stored on disk and insecurely deleted, they can easily defeat even the most secure cryptosystem. Similarly, if an attacker can obtain a complete, or even partial, plaintext version of an encrypted message, it is much easier to decrypt that message and any other messages encrypted with that same key. There is also the concern that an attacker will scavenge insecurely deleted data from the windows or Linux paging files, such as credit card information, banking information, and business information. This How-To guide details methods of securely deleting information from various types of media, including destructive and non-destructive methods.
Hard Drives
Securely deleting data from hard drives can be difficult due to alternate data streams, various encoding schemes utilized by hard drives, bad sector recovery methods, file slack, and more. Details about each of these issues is available, although this guide will focus on circumventing these issues and securely deleting data.
The easiest and most cost effective method of securely deleting data from a hard drive is to use a software-based overwrite utility such as those found on the software page of this site. These utilities will overwrite files and the free disk space on a disk. Of these utilities, Eraser and DBAN are most highly recommended. Using a single pass will prevent software based utilities from recovering data, and multiple passes will be increasingly effective against hardware based recovery techniques, which are capable of recovering data that is deleted with multiple passes.
For low security environments, a single pass will be sufficient. If there is the concern that an attacker will hardware based recovery techniques, then multiple passes are suggested. Given the encoding methods used by modern hard drives, the best method is probably multiple passes with pseudorandom data. According to the authors of DBAN, 4 passes provides medium security, and 8 passes provides high security. More passes can, of course, be used.
If maximum security is needed, other methods of securely deleting data from a hard drive can be used. These methods will result in the destruction of the drive:
Degaussing: A degausser can be used to remove the magnetic fields from the hard drive. For this method to be effective an extremely powerful degausser must be used, and it is difficult to verify its effectiveness.
Acid: A thread on the overclockers.com forums from a couple years ago discussed the use of acids to destroy hard drives. Members of the forum tested various acids, with some success
Grinding: Arguably the most effective method involves grinding the magnetic coating off the hard drive platters and disposing of it.
Floppy Disks
The basic principles that apply for the secure deletion of data from hard drives also apply to floppy disks. Overwrite utilities such as those mentioned above are effective. Given the low cost of floppy disks and low reliability when they are repeatedly and repetitively used, plus their slow write speed, it is often easier to simply destroy a disk that has sensitive information on it. Floppy disks can easily be opened and the magnetic media can be removed. This can then be shredded and/or burned, depending on the security concerns.
CDs/DVDs
CDs and DVDs that contain sensitive information can easily be destroyed to prevent an attacker from gaining access to this information Methods for destruction include microwaving, burning, and shredding. For maximum security, these methods can be combined. Due to the damage the occurs to the media in each step, the recommended order is: microwaving, then shredding, followed by burning. It should be noted that the effects upon the microwave oven are unknown.
References
Secure Deletion of Data from Magnetic and Solid-State Memory by Peter Gutmann.
Media Destruction Guide from SpywareGuide.