scrub(1) | scrub | scrub(1) |
scrub - write patterns on disk/file
scrub [OPTIONS] special-file [special-file ...]
scrub [OPTIONS] file [file ...]
scrub -X [OPTIONS] directory
Scrub iteratively writes patterns on files or disk devices to make retrieving the data more difficult. Scrub operates in one of three modes:
1) The special file corresponding to an entire disk is scrubbed and all data on it is destroyed. This mode is selected if file is a character or block special file. This is the most effective method.
2) A regular file is scrubbed and only the data in the file (and optionally its name in the directory entry) is destroyed. The file size is rounded up to fill out the last file system block. This mode is selected if file is a regular file. See CAVEATS below.
3) directory is created and filled with files until the file system is full, then the files are scrubbed as in 2). This mode is selected with the -X option. See CAVEATS below.
Scrub accepts the following options:
Scrub may be insufficient to thwart heroic efforts to recover data in an appropriately equipped lab. If you need this level of protection, physical destruction is your best bet.
The effectiveness of scrubbing regular files through a file system will be limited by the OS and file system. File systems that are known to be problematic are journaled, log structured, copy-on-write, versioned, and network file systems. If in doubt, scrub the raw disk device.
Scrubbing free blocks in a file system with the -X method is subject to the same caveats as scrubbing regular files, and in addition, is only useful to the extent the file system allows you to reallocate the target blocks as data blocks in a new file. If in doubt, scrub the raw disk device.
On MacOS X HFS file system, scrub attempts to overwrite a file's resource fork if it exists. Although MacOS X claims it will support additional named forks in the future, scrub is only aware of the traditional data and resource forks.
scrub cannot access disk blocks that have been spared out by the disk controller. For SATA/PATA drives, the ATA "security erase" command built into the drive controller can do this. Similarly, the ATA "enhanced security erase" can erase data on track edges and between tracks. The DOS utility HDDERASE from the UCSD Center for Magnetic Recording Research can issue these commands, as can modern versions of Linux hdparm. Unfortunately, the analogous SCSI command is optional according to T-10, and not widely implemented.
To scrub a raw device /dev/sdf1 with default NNSA patterns:
# scrub /dev/sdf1 scrub: using NNSA NAP-14.1-C patterns scrub: please verify that device size below is correct! scrub: scrubbing /dev/sdf1 1995650048 bytes (~1GB) scrub: random |................................................| scrub: random |................................................| scrub: 0x00 |................................................| scrub: verify |................................................|
To scrub the file /tmp/scrubme with a sequence of 0xff 0xaa bytes:
# scrub -p custom="\xff\xaa" /tmp/scrubme scrub: using Custom single-pass patterns scrub: scrubbing /tmp/scrubme 78319616 bytes (~74MB) scrub: 0xffaa |................................................|
Jim Garlick <garlick@llnl.gov>
This work was produced at the University of California, Lawrence Livermore National Laboratory under Contract No. W-7405-ENG-48 with the DOE. Designated UCRL-CODE-2003-006, scrub is licensed under terms of the GNU General Public License.
DoD 5220.22-M, "National Industrial Security Program Operating Manual", Chapter 8, 01/1995.
NNSA Policy Letter: NAP-14.1-C, "Clearing, Sanitizing, and Destroying Information System Storage Media, Memory Devices, and other Related Hardware", 05-02-08, page XVI-8.
"Secure Deletion of Data from Magnetic and Solid-State Memory", by Peter Gutmann, Sixth USENIX Security Symposium, San Jose, CA, July 22-25, 1996.
"Gutmann Method", Wikipedia, http://en.wikipedia.org/wiki/Gutmann_method.
Darik's boot and Nuke FAQ: http://dban.sourceforge.net/faq/index.html
"Tutorial on Disk Drive Data Sanitization", by Gordon
Hugues and Tom Coughlin,
http://cmrr.ucsd.edu/people/Hughes/DataSanitizationTutorial.pdf.
"Guidelines for Media Sanitization", NIST special publication 800-88, Kissel et al, September, 2006.
shred(1), hdparm(8)
2014-08-26 | scrub-2.6.1 |