Destructive Windows Script

G

Grant Edwards

Wouldn't /dev/urandom or /dev/random on Linux systems work
better?

Maybe. Last time I found an article on the subject (should
have kept a copy), it suggested certain patterns for the
initial passes, and then random data for the last passes.

The data is converted into one of several RLL encodings (which
encoding depends on the drive). The optimal erase patterns
depended on the encoding used, so you have to use a several
different patterns to cover all the bases.

Googling for "secure disk erase pattern rll encoding"...

Here's a good but somewhat old paper:

http://www.cypherus.com/resources/docs/shred.htm

and here's a newer one that deals more with secure deletion of
individual files:

http://www.usenix.org/events/sec01/full_papers/bauer/bauer_html/

and finally the US Navy's take on the issue:

http://www.fas.org/irp/doddir/navy/5239_26.htm
It's the kernel's built in random number generator. It'd fill
the drive with random bits of data.

The "really random" device will block when it runs out of
entropy. It will probably take the kernel a _long_ time to
generate a disk's worth of random data. The pseudo-random
device won't block, but the results aren't quite as secure.
 
M

Mike Meyer

rbt said:
Wouldn't /dev/urandom or /dev/random on Linux systems work better?

Well, that would certainly make a good source for the data you write.
It's the kernel's built in random number generator. It'd fill the
drive with random bits of data. You could loop it too... in fact, I
think many of the pre-packaged *wipe* programs are mini Linux distros
that do just this.

dd if=/dev/random of=/dev/your_hard_drive

That works. You may want to set a block size for performance reasons.

<mike
 
D

Dennis Lee Bieber

OT but I am curious: does a metallic case act as a metallic shield, so that
the case needs to be opened to do this? (Conversely, is a magnet near a
disk drive a danger to it?)
Most disk drive cases look to be a non-ferrous alloy, no block
to a drive... And yes, sticking a magnet on the side of the computer
near the a drive could be a threat said:
I take this to mean the the drive is non-functional and might have well
been melted, except that demagnetising is cheaper.
Correct.

--
 
D

Dennis Lee Bieber

On an old Amiga, this would be child's play -- The Amiga stored
file names in "file header blocks"; directory blocks only had pointers

I should clarify: deletion unlinked the file header from the
directory chain and marked the sectors as free in the disk bitmap, but
did not modify the file name stored in the file header. So a simple disk
sector browser could be used to locate file headers, then relink them to
a directory and mark the data sectors in use...

Originally, data sectors used some space to hold pointers back
to file headers, and to next data sector... Made it easy to recover
since almost any disk block could be used to locate the header, then
chain all the data back... Overhead was getting only 488 data bytes per
sector.


--
 
M

Magnus Lycka

rbt said:
data = ['0', 'a', '1', 'b', '2', 'c',\
'3', 'd', '4', 'e', '5', 'f',\
'6', 'g', '7', 'h', '8', 'i',\
'9', 'j', '~', '!', '@', '#',\
'$', '%', '^', '&', '*', ';']

Note that the backslashes are redundant between pairs
of [ ], ( ) or { }. Just write:

data = ['0', 'a', '1', 'b', '2', 'c',
'3', 'd', '4', 'e', '5', 'f',
'6', 'g', '7', 'h', '8', 'i',
'9', 'j', '~', '!', '@', '#',
'$', '%', '^', '&', '*', ';']


(Not that it solves your disk wiping issue.)
 
T

Tim Roberts

Magnus Lycka said:
rbt said:
data = ['0', 'a', '1', 'b', '2', 'c',\
'3', 'd', '4', 'e', '5', 'f',\
'6', 'g', '7', 'h', '8', 'i',\
'9', 'j', '~', '!', '@', '#',\
'$', '%', '^', '&', '*', ';']

Note that the backslashes are redundant between pairs
of [ ], ( ) or { }. Just write:

data = ['0', 'a', '1', 'b', '2', 'c',
'3', 'd', '4', 'e', '5', 'f',
'6', 'g', '7', 'h', '8', 'i',
'9', 'j', '~', '!', '@', '#',
'$', '%', '^', '&', '*', ';']


(Not that it solves your disk wiping issue.)

This is a lot easier to type:

data = list("0a1b2c3d4e5f6g7h8i9j~!@#$%^&*;")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,241
Messages
2,571,219
Members
47,852
Latest member
PatriciaMu

Latest Threads

Top