LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-05-2008, 03:34 PM   #1
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Rep: Reputation: 54
military grade disk wipe


Anyone know of a good program that will run within my existing linux OS (aka not a boot disk) that will completly low level wipe a given device?

Right now I'm using a program called copywipe in windows but I'd like to do my drive wiping downstairs in the server room (too hot in my room to have such operation going on) and hook it up to the Linux server instead. I just use a USB connection with an enclosure then point a fan to the drive (gets VERY hot otherwise). The key is I need the wipe to be extremely good so that even if the FBI or other such snoopy organizations got ahold of it, they would not be able to retrieve anything even by removing the platters and analysing the magnetics etc...

This process can take a week per drive, I'm fine with that. I just want to basically fire it up and forget about it then come back and check it later.

Before you say "just physically destroy the drive" these are practically brand new and I rather recycle then throw out.
 
Old 07-05-2008, 03:50 PM   #2
OlRoy
Member
 
Registered: Dec 2002
Posts: 306

Rep: Reputation: 86
Just so you know, if your drive was made around 2001 or so and later, it's not vulnerable to laboratory microscope attacks. The technology has changed, and you only need to overwrite data once now. The reason why the government still requires many overwrites is in case someone comes out with a similar attack in the future. At least that's what they said in the SANS GCFA training.
 
Old 07-05-2008, 04:13 PM   #3
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Quote:
Originally Posted by OlRoy View Post
Just so you know, if your drive was made around 2001 or so and later, it's not vulnerable to laboratory microscope attacks. The technology has changed, and you only need to overwrite data once now. The reason why the government still requires many overwrites is in case someone comes out with a similar attack in the future. At least that's what they said in the SANS GCFA training.
Good to know. I'd still like to know of such software though so I can still do a decent wipe, but keeping that in mind I'll only do it like 5 times.
 
Old 07-05-2008, 05:22 PM   #4
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
http://dban.sourceforge.net is a bootable CD which gives you many options for wiping hard drives. One of which, from memory, gives you 7 wipes and rewrites and is, apparently, recommended by the NSA.
 
Old 07-06-2008, 01:28 PM   #5
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
That looks good but I'm hoping for something that I can install/run rather the boot off of. I'll be attaching the disks to be wiped via usb external enclosure and plugging them into my live server, don't want to have to boot out of it for that long and my vmware idea did not work. I tried booting off it using my backup server which I can afford to have down for a few days, but it would not recognize usb, guessing it runs at a rather low level dos'ish type format, and not full blown linux with all drivers etc.
 
Old 07-06-2008, 01:36 PM   #6
simonapnic
Member
 
Registered: Jul 2008
Posts: 70

Rep: Reputation: 16
Post

Well, there are a lot of tools that could help you.
For example, I always shred my data instead of rm-ing it. The shred utility is available on most *NIX-es nowadays. But if you want to do a full disk wipe, you can use the wipe utility Debian provides or just dd-ing it or shred-ing from a LiveCD with some Linux distribution on it.
 
Old 07-06-2008, 01:41 PM   #7
OlRoy
Member
 
Registered: Dec 2002
Posts: 306

Rep: Reputation: 86
Couldn't you do something like dd if=/dev/random of=/dev/usbdevice? If not, there are some programs on SourceForge
 
Old 07-06-2008, 01:59 PM   #8
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 67
Quote:
Originally Posted by OlRoy View Post
Couldn't you do something like dd if=/dev/random of=/dev/usbdevice?
I think that's all those shredding/wiping programs do. They just organize how many cycles are done, and what is in each cycle. You could do 8 full wipes to a disk with some being all 0s, some being all 1s, some being random, and some being specific patterns.
 
Old 07-06-2008, 07:32 PM   #9
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Quote:
Originally Posted by Meson View Post
I think that's all those shredding/wiping programs do. They just organize how many cycles are done, and what is in each cycle. You could do 8 full wipes to a disk with some being all 0s, some being all 1s, some being random, and some being specific patterns.
Can someone explain that command in details? I have an idea of what its doing but the --help file gives me absolutely no info that helps me understand it. I could just write a bash script and have some paterns setup in advanced. Or would copying /dev/urandom a couple times be very efficient?

Right now I found a program called wipe so I did "wipe /dev/sdc" and its at 2% since like, this morning lol.

I figure the odds of goverment agencies getting ahold of the drive (or people with same ability as them) is VERY slim, but rather not take chances. And I rather stay green and have someone else put the drive to good use, then to just smash it. Though smashing it and doing other physical destruction *IS* much more fun. But I'd feel bad doing it to 3 rather new 500GB drives. :P
 
Old 07-06-2008, 09:30 PM   #10
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
'dd' would be the simplest and most effective. Software like 'wipe' makes too many assumptions and doesn't necessarily work, nor would it affect any blocks which it believes is unused.

So:

dd if=/dev/random of=/dev/your_device_to_be_wiped

You can use 'urandom' instead of 'random' if it is faster.
Just run that dd line a few times and everything's gone; better if you can script it because it can take a few hours per pass. Some 'random' devices are pretty slow, so you'd better check on the progress of the 'dd' - otherwise it can take you months to do a single pass. You can check on dd's progress via:

kill -SIGUSR1 $(pidof dd)
 
Old 07-06-2008, 09:38 PM   #11
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
I agree about dd. It is the easiest and best way. Just set up a bash script to run it as many times as you think necessary. If you really want to, you could set up pattern files and write those to the drive, but I would just use /dev/urandom a few times.
 
Old 07-06-2008, 09:50 PM   #12
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Does DD actually end though? like does it know when it reaches the end of the disk?
 
Old 07-06-2008, 10:20 PM   #13
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 67
Quote:
Originally Posted by Red Squirrel View Post
Does DD actually end though? like does it know when it reaches the end of the disk?
Yes, it will stop at the end of the device you specify (in your case either a disk or a partition on a disk.)

You'd probably be better off doing something overnight like:

Code:
dd if=/dev/urandom of=/dev/your_device_to_be_wiped
dd if=/dev/null of=/dev/your_device_to_be_wiped
The NSA specification was something like 8 passes. Two or three should be good though.

If you're worried about time definitely use urandom because if you walk away from your computer overnight there might not be that much activity on /dev/random. To counteract this, you could try shuffling a playlist of all your music - then /dev/random will most likely not be your weakest link.
 
Old 07-06-2008, 10:26 PM   #14
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Yes. You can also get it to report its progress - see the manpage. Also use a (decent) blksize to speed things up.

Last edited by syg00; 07-06-2008 at 10:27 PM.
 
Old 07-06-2008, 11:54 PM   #15
lwasserm
Member
 
Registered: Mar 2008
Location: Baltimore Md
Distribution: ubuntu
Posts: 184

Rep: Reputation: 41
Why not just copy a partition or 2 or 3 & maybe a bunch of jpgs or mp3s from a system you don't care about. Maybe install Vista. It will look like the disk is just a backup or was removed from a working system. An empty, wiped disk would raise some suspicions all by itself that a disk with innocuous data would not.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard disk wipe software suggestions airman99 Linux - Software 14 11-19-2007 09:47 AM
[OpenBSD] safe disk wipe out noir911 *BSD 2 03-08-2007 03:53 AM
LXer: "military grade" Linux PDA gains WiFi, Bluetooth LXer Syndicated Linux News 0 07-08-2006 07:54 PM
MacOS 8.6 -- disk detect problem after a disk wipe BinJajer Other *NIX 2 02-05-2006 03:24 AM
how to wipe disk in best way to reinstall WinXP and Mandrake as dual boot jukebox4joe Linux - Software 3 01-23-2004 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration