Cuando digo “destrucción” de información no me refiero a simpemente eliminarla o purgarla del disco duro, sino a sobrescribirla y hacer imposible su restauración. Existen varias utilidades y formas de hacerlo, pero yo les mostraré tres utilidades/herramientas que nos ayudarán: dd, shred y wipe. La primera, nos ayudará a zero-izar un sector de nuestro disco duro, memoria o lo que sea. Las otras dos son herramientas que nos permitiran sobreescribir y eliminar definitivamente un archivo para que sea irrecuperable. shred viene por defecto en casi todas las distribuciones unixlike, wipe se puede instalar en cualquiera.

Según los manpages,

wipe:
Wipe is a secure file wiping utility. There are some low level issues that must be taken into consideration. One of these is that there must be some sort of write barrier between passes. Wipe uses fdatasync(2) (or fsync(2)) as a write barrier, or if fsync(2) isn’t available, the file is opened with the O_DSYNC or O_SYNC flag. For wipe to be effective, each pass must be completely written. To ensure this, the drive must support some form of a write barrier, write cache flush, or write cache disabling. SCSI supports ordered command tags, has a force media access bit for commands, and write cache can be disable on mode page 8. IDE/ATA drives support write cache flushes and write cache disabling. Unfortunetly, not all drives actually disable write cache when asked to. Those drives are broken. Write caching should always be disabled, unless your system is battery backed and always powers down cleanly.

shred:
Overwrite the specified FILE(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data.

dd:
Copy a file, converting and formatting according to the operands

Vamos a lo practico.

Seguir leyendo