srm: secure rm to shred files

diskIn an earlierĀ article we discussed some free solutions to delete files securely and the approaches they take. Today we found another relatively newer utility which is a more secure alternative to the Linux file removal utility rm. It is also very handy as it works just like rm.

rm does not delete files securely. man rm explicitly says: Note that if you use rm to remove a file, it might be possible to recover some of its contents, given sufficient expertise and/or time. srm (Secure rm) is a new utility which can nuke your files so that it cannot be recovered easily.

srm overwrites the data in the target files before unlinking them. This prevents cmdline recovery of the data by examining the raw block device. By default srm uses 35 passes to overwrite the file contents! However, the number of passes and technique can be changed. srm has a very flexible feature of using different algorithms to overwrite the data as per the choice of the user. And still it doesn’t claim the files cannot be recovered anyway. Rather it compares itself with a file shredder.

Usage

The syntax of srm closely follows that of rm so if you already use rm, general usage is no different. Refer to the srm man page for common usage. The power of srm lies in being able to use multiple algorithms to wipe files. Here are the options:

-s : only overwrite the file with a single pass of zero bytes
-P : OpenBSD compatible rm. Files are overwritten three times, first with the byte 0xff, then 0x00, and then 0xff again, before they are deleted.
-D : US Dod compliant 7-pass overwrite.
-E : US DoE compliant 3-pass overwrite. Twice with a random pattern, finally with the bytes "DoE". See http://cio.energy.gov/CS-11_Clearing_and_Media_Sanitization_Guidance.pdf for details.
-G : Use the 35-pass Gutmann method. This is the default and slowest overwrite mode.

To install on Ubuntu:

$ sudo apt-get install secure-delete

Webpage: srm

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s