Wipe it free: secure wiping software

In fact, according to a 2006 NIST (National Institute of Standards and Technology) publication, nothing more than a single pass is required with modern drives to prevent recovery, including by magnetic force microscopy--which isn't the type of equipment many people have lying around.

Nevertheless, there are range of standards defined by various government and military agencies around the world--the type who take data security seriously--such as Australia's DSD (Defence Signals Directorate) and America's DoD (Department of Defence). Here the US DoD recommends three passes to securely erase data (presumably, to be sure, to be sure), while DSD doesn't recommend wiping at all--the correct security procedure is degaussing (see the 'Magnetic Degaussing' sidebox) or, ideally, destruction. Both of these methods, naturally, are going to be more effective (though with the obvious downsides of making the drive inoperable).

Wiping with Linux

As you'd expect, wiping under Linux can be done with free tools, and in fact, the tools are part of any mainstream distribution of Linux.

There may be other options, but these two are the easiest:

For wiping an individual file the shred command will perform a repeated wipe exactly the same as the Windows utilities mentioned here--performing any number of writes you specify, with random patterns (including some of Gutmann's sequences) in addition to both renaming the file multiple times (to purge directory tables) and finally zeroing the data. An example of the shred command is shred -zvun10 /home/CSO/testfile. This zeros the file at the end, removes it, runs for 10 iterations and reports verbosely. Incidentally, shred was written by Colin Plumb (see 'Grading Secure Wipes' sidebox).

For full disk wiping there's the venerable dd command. This tool has all sorts of uses, from mirroring drives to creating partition snapshots and raw-reading disks. It can also be used to securely wipe a disk with a very simple command: dd if=/dev/urandom of=/dev/sda bs=1M. The flags 'if' and 'of' are simply in-file and out-file (and here we specify a whole device), while 'bs' is block size. This command reads random data from /dev/urandom and outputs directly to the disk until the whole disk is filled. Alternatively, you can use /dev/zero to output all zeros.

Importantly, of course, you don't need to run these commands from Linux for a Linux system. You can boot a Linux Live CD (like the popular Ubuntu Live CDs) and run the commands on Windows drives in a machine. Again, unless you have very specific requirements, there's little need to pay for wiping software.

Magnetic Degaussing

Of course, software isn't the only option to wipe a drive. Mechanical drives rely on magnetic properties to store bits, so if you don't trust software wiping, you could wipe it with a magnet instead.

A very powerful magnet, that is. Known as degaussing, strong magnets are moved around the drive creating moving magnetic fields that scramble and effectively destroy the data stored on the media. Degaussing has an advantage in that the entire surface of the disk is affected, wiping out partition tables, boot sectors and low-level formatting information in addition to stored data. This usually renders (especially with low-level format data destroyed) the drive inoperable and recoverable only by sending it back to the manufacturer--assuming the magnetic pulse doesn't destroy the motor in the process, too. Considering commercial degaussing can cost anywhere between $30k and $140k, this is probably the type of result you're looking for.

That does leave the rest of us in a bit of a pinch, can you degauss a drive yourself with a strong magnet? Yes, mostly. Rare earth Neodymium magnets are readily available online and exhibit extremely strong fields--enough to lift a thousand times their own weight. Using them on a drive is said to be very effective, but like commercial degaussers, may leave the drive inoperable (which if you're planning to sell the cleaned drives, may not be what you want). We can't recommend this route as Neodymium magnets can be physically dangerous if not handled correctly.

How We Tested

A cleanly formatted disk was set aside for each test on the testing machine, to which example files were then copied across. For programs that could both individually wipe files, and programs that wipe whole disks, we first noted the sectors where the files reside by booting a Linux Live-CD from USB and using the hdparm command with the '-- fibmap' and '--readsector' switches. This allowed us to find and raw-read the sectors on the drive where a file resides.

The files or disk was then wiped from within Windows, after which the machine was again booted to Linux and the same sectors where the files resided were read to confirm they no longer contain the data (or more correctly, contained scrambled or zeroed data).

Wipe times weren't measured, as all products saturate and are limited by the speed of the I/O subsystem.

Adding SSDs to the Mix

SSDs (solid state drives) have rapidly gained popularity in the last few years in both business and the home. It's common knowledge they are fast, quiet, and use less power, but they come with another feature intrinsic to their design: they are also somewhat less secure. Unlike traditional spinning-platter media, the NVRAM on which SSDs are based have limited write-cycles. While in practice the shelf life of an SSD is still very decent--there are no long-term studies yet that accurately catalogue write-cycle lifetimes--they use firmware designed to extend their life by using a technique called wear levelling. This balance writes out across the media to ensure all cells get written-to evenly.

In practice this means when a file is overwritten in the operating system, the new file is actually written to a different location than the original. Hence, even though it may be 'deleted' from the drive, it's still recoverable. Securely deleting files or wiping free space is also a bit of misnomer for SSDs for the same reason. The translated sectors the operating system sees on the drive don't bear any relation to where the data is physically stored in the NAND chips.

Unfortunately, there's no real solution to this if security is paramount except to perform what's known as a secure erase. All SSDs support this and is similar to restoring the drive to factory condition (with the exception of wear on the chips), resetting all cells to 0s. While secure, it's an all-or-nothing affair, you can't selectively erase files, folders or partitions as you can with spinning-platter media.

Adding to the complexity, many SSDs keep of a pool of memory (which can be many gigs in size) to use either as scratch space for garbage collection routines or to allocate as new sectors if any cells become unusable. This pool may also contain old data that could be recovered with the right tools.

What about TRIM? Contrary to popular belief TRIM does not clear the cells, it sets a flag in the drive's cluster map to indicate these cells don't need to perform the full read/modify/write cycle which is normally required when writing to cells that already contain data. Until those cells are actually written over with new information, that data is also still present.

All up, this tends to indicate that if security is more important to you than speed, SSDs are perhaps not the best choice.

This story, "Wipe it free: secure wiping software" was originally published by CSO Online (Australia).

| 1 2 Page 6
ITWorld DealPost: The best in tech deals and discounts.
Shop Tech Products at Amazon