How to erase data so that it cannot be recovered?

How to erase data so that the intelligence services cannot recover it? To begin with, data recovery and data destruction are two sides of the same coin. To know when and how information can be returned to oneself, one must understand how it can be irrevocably destroyed. And in some situations this is simply necessary: ​​for example, the destruction of corporate information when disposing of equipment, the destruction of your personal data when transferring a disk for use by friends or sale, or maybe you want to delete the history of correspondence with your mistress once and for all. It is believed that the best data recovery specialists work in the intelligence services, so we formulated the question in exactly this way: how to destroy information from the disk so that neither the cops from the "K" department or the Q from James Bond can recover it.

1. Overwrite hard disk

There are many algorithms for destroying data by completely overwriting a disk. But they all boil down to N-fold formatting and writing binary ones, zeros and pseudo-random numbers to it. Since the write speed to a disk usually does not exceed 70 MB / s, then, armed with a calculator, we will calculate how long we will need?

The formula is quite simple: Disk size (MB) / Write speed * Number of cycles = Seconds;

500, 000 / 70 * 7 = 50, 000 (sec).

From this we can conclude that a 500 GB disk will “erase” for about 13 hours. But should we use 7 rewrite cycles? Modern storage media do not leave residual magnetization after overwriting data. Therefore, one cycle is enough for us. This means that we will need not 13 hours of time, but only 1.5.

Operating systems have tools to completely remove files.


format c:

Instead of 'c:' you must specify the letter of the logical partition.

For Windows Vista and older, previous generations of Windows only remove service information.


dd if = / dev / zero of = / dev / sda bs = 4k

Instead of '/ dev / sda', you must specify the device address for formatting.

2. Partial data overwrite

By using a direct connection to the hard drive at a lower level through the disk driver API or your own driver, you can quickly mess up information by overwriting data gaps with pseudo-random numbers. By directly specifying the memory address to write to, we do not need to completely overwrite the disk. Also, through the disk driver API, you can get the addresses in which information is stored, and overwrite only this memory area. This method is the most difficult in its execution, but, on the other hand, it allows you to quickly destroy only confidential information, while maintaining the disk's operability.

Working with the driver involves 2 stages. The first is getting the address and the length of the data, usually one file is written in different places on the disk, so we get an array of addresses and an array of lengths. The second step is writing pseudo-random numbers to the data in the memory area; writing must also be done through the driver, so that the operating system does not block or redirect data writing to another area of ​​the disk.

3. Mechanical data destruction

Once and for all, you can destroy the data if you spoil the pancakes of the hard drive. It is difficult and often impossible to recover data from scratched disks, do not forget to keep a screwdriver next to you, because you will have to remove the hard disk cover and it can also scratch the hard disk. Naturally, the data will be erased in the places where the scratch was made and adjacent to it. Elsewhere, the data can be recovered in the laboratory. Do not spare your efforts for scratches, light stripes will not destroy data even in places where your screwdriver has been. And if you bend the pancake, as shown in the picture, then your data will definitely never be restored by anyone.

But dropping the disc to the floor will not be enough. Yes, it will not be detected by the computer, but the data will be successfully restored in the laboratory. An HDD disk will not survive a fall from a table; moreover, in the off state, the height of the safe fall is greater than during the operation of the disk. SSDs were designed with this in mind, even a fall from a first or second floor window won't kill the drive. This is achieved due to the fact that there are no moving elements in the SSD, all actions are performed by the controller. Information can still be read programmatically or non-programmatically.

4. Chemically

As you probably already understood, in order to destroy data, you need to destroy the magnetic layer of the hard disk pancake. It is enough to pour any liquid on the disc that is capable of changing the properties of ferromagnets. To change the structure of chromium oxide (the ferromagnet with which the pancakes of hard drives are covered - the magnetic layer of the disc), it is necessary to pour hydrochloric acid or water on it at a temperature of 100 ° C.

What else is important?

If you do not need long-term storage of confidential data - write them to volatile (RAM) memory, then you will not have to worry about destruction.

Make sure your data cannot be recovered from other media that has ever been copied.