Howto: Cleaning /Wipping Hard Disk/Files

Share your own howto's etc. Not for support questions!

Howto: Cleaning /Wipping Hard Disk/Files

Postby bester69 » 2017-01-17 02:38

Im following these steps,as an easy and practical method, that i suppose its enought secure,
please correct me if im lacking something :?

Refs.:
http://linoxide.com/security/delete-fil ... tly-linux/
https://www.marksanborn.net/howto/wipin ... e-with-dd/


0- Using Bleachbit (It might be enought), to clean caches and that kind of things
https://www.bleachbit.org

1- wipping / shredding speficical files, we want to be sure they wont be recover (you can use both tools methods).

- shred -vn 2 filetoerase
- wipe -qQ 2 filetoerase


2- Shredding Swap disk.:
- sudo swapoff -a (dismount swap first)
- sudo sswap -fvl /dev/sdx (clean swap partition)
- sudo swapon -a (remount swap)

3- Shredding the whole free space drive:
- sudo sfill -fvl / (root partition)

Alternative/equivalent (perhaps more insecure method, -->there's no inode space wiper with dd):
Code: Select all
dd if=/dev/zero of=zero.small.file bs=1024 count=102400
dd if=/dev/zero of=zero.file bs=1024
sync ; sleep 60 ; sync
rm zero.small.file
rm zero.file

-----------------------------

please share your Method if you thing you've something better.. :wink:
Last edited by bester69 on 2017-01-17 12:02, edited 2 times in total.
User avatar
bester69
 
Posts: 949
Joined: 2015-04-02 13:15

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby Bulkley » 2017-01-17 02:59

Before donating a computer to the recycle people I blank the hard drive. I use either Dban disk overwrite utility or shred which I run at least three times. Then I install the oldest Linux I can get on the drive - my preference being Storm 2000. I use impossible passwords. When someone eventually boots it up he/she will find a working Linux OS that they can't access. My bet is they format and install Windows. Any files I had on the drive are long gone.
Bulkley
 
Posts: 5320
Joined: 2006-02-11 18:35

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby bester69 » 2017-01-17 10:37

Bulkley wrote:Before donating a computer to the recycle people I blank the hard drive. I use either Dban disk overwrite utility or shred which I run at least three times. Then I install the oldest Linux I can get on the drive - my preference being Storm 2000. I use impossible passwords. When someone eventually boots it up he/she will find a working Linux OS that they can't access. My bet is they format and install Windows. Any files I had on the drive are long gone.

Hi, thanks to share
I didnt know about Dban, so Ive just find out nwipe (It is a fork of the dwipe command used by Darik's Boot and Nuke (dban))..

I read somewhere with just two-passes it wasnt possible to recover anydata... When i read everywhere 15/30 passes for secure erasing i dont know what to thing. :?
User avatar
bester69
 
Posts: 949
Joined: 2015-04-02 13:15

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby wizard10000 » 2017-01-17 10:40

Zero-filling a hard drive will protect it from anyone except the government.

Data recovery companies cannot recover data from a zero-filled drive but some government agencies can by mapping residual magnetism in the platter - but they've gotta want you pretty bad to go to the trouble.

So - if you're selling the machine a zero-fill is sufficient; if you're protecting it from a government you need multiple passes with random characters.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby bester69 » 2017-01-17 10:55

wizard10000 wrote:Zero-filling a hard drive will protect it from anyone except the government.

Data recovery companies cannot recover data from a zero-filled drive but some government agencies can by mapping residual magnetism in the platter - but they've gotta want you pretty bad to go to the trouble.

So - if you're selling the machine a zero-fill is sufficient; if you're protecting it from a government you need multiple passes with random characters.


Ive studied some superior electronic's studies and i dont see how they can get those residual magnetism, when you write down 0 or 1 in the disk, with two passes or so i cant imagine how a simple bit can be recover when it has been totally destroyed. A bit in a SSD or in a hDD is the same concept its just a capacitor residual.

I can see a zero bit pattern recover --> They could still leave some residual capacitor
perphaps, Two same zero bit pattern filled recover--> As the pattern filled its the same and its constant (zero filling), It might still be able to recover as they just need to search for the residual bit.

I cant see a One pass Zero, Second Pass Random pattern filling reover (or even just one pass-random) --> The bit has been in my opinion totatlly destroyed, even if residual remains then they should be able to invert random pattern to uncrypt the bit, what i still dont see how can they do it, as /dev/random i suppose its not a constant pattern so they cant uncrypted..


So seriouslly talking, I dont see how even Goverments can recover data if you destroy the celds/bits,by random filling.
User avatar
bester69
 
Posts: 949
Joined: 2015-04-02 13:15

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby wizard10000 » 2017-01-17 11:05

bester69 wrote:...So seriouslly talking, I dont see how even Goverments can recover data if you destroy the celds/bits,by random filling.


Exactly. If you just delete a file it can be easily recovered. If you zero-fill a drive some governments can recover data because of the residual magnetism on the platter as mentioned. But - you're right. If the drive is wiped with random characters it would be difficult to recover the data - multiple passes are probably overkill, but a DoD wipe requires seven passes with random characters.

When I worked for DoD we zero-filled desktops and laptops before offering them for resale and server drives were shredded by this big machine that turned a hard drive into little bitty chunks of metal :)
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby pylkko » 2017-01-17 11:22

Ok, so what about:
Code: Select all
hdparm --user-master u --security-erase-enhanced password /dev/device name

Will resetting the cells of an SSD leave anything that can be recovered?
User avatar
pylkko
 
Posts: 1174
Joined: 2014-11-06 19:02

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby wizard10000 » 2017-01-17 11:31

pylkko wrote:...Will resetting the cells of an SSD leave anything that can be recovered?


No idea. You can't recover residual magnetism from an integrated circuit (at least not by any method of which I'm aware) but I really can't comment on a government's capabilities; all the *unclassified* data I've seen suggests that overwriting an SSD would make the previous data unrecoverable, but I have no idea what the FBI, CIA, NSA or DoD can do now.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby bester69 » 2017-01-17 11:49

wizard10000 wrote:....., but a DoD wipe requires seven passes with random characters.

When I worked for DoD we zero-filled desktops and laptops before offering them for resale and server drives were shredded by this big machine that turned a hard drive into little bitty chunks of metal :)

So you worked in Department of Defense??, tha's cool

Wizard, seven random passes, i dont see even aliens to be able to recover that :lol: ,
With just one random-pass I still dont see how they'd do it, unless DoD can be able to uncrypted random method used to shred the disk. I think that even writing a bit is not a regular process so you cant get a accurate messure of the bit to know from what level on apply decode rightly, and level of bit is irregular and analog process, so i see all of this very impossible. The resulting file recovered might be enought corrupted to be not able to read it (a word, pdf file as an example).

but my knowledge stop here..
User avatar
bester69
 
Posts: 949
Joined: 2015-04-02 13:15

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby wizard10000 » 2017-01-17 12:01

bester69 wrote:...With just one random-pass I still dont see how they'd do it.


Neither do I, but if one is good more must be better :mrgreen:
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby dasein » 2017-01-17 12:36

No.

Zero-fill works just fine to render mag drives unreadable. Has for years. Shred, multiple passes, etc. are just "theater."

For anyone who actually cares, there's an existing thread hereabouts with actual data from actual researchers, and not rectally-extracted, fact-free "opinion" from some random teenager in his mother's basement.

Edit: For the benefit of those too farqing lazy to search for it: viewtopic.php?f=10&t=82461&start=15#p446550

(I'm growing weary of this place. I mean, yeah, Second Law of Thermodynamics and all, but still.)
Last edited by dasein on 2017-01-17 13:08, edited 2 times in total.
User avatar
dasein
 
Posts: 7775
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby wizard10000 » 2017-01-17 13:00

dasein wrote:...Second Law of Thermodynamics and all.)


FDN is a closed system?

:P
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby dasein » 2017-01-17 13:04

wizard10000 wrote:FDN is a closed system?

Thanks, Wiz10K. You always make me smile.
User avatar
dasein
 
Posts: 7775
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby Hallvor » 2017-01-17 14:11

I just smash old hard drives with a sledge hammer. :D
Intel Core i5 3320-M CPU @ 2.60 GHz, 6 GB RAM, Intel HD 4000 graphics, 300 GB HDD, Debian Stretch (KDE)
User avatar
Hallvor
 
Posts: 739
Joined: 2009-04-16 18:35
Location: Norway

Re: Howto: Cleaning /Wipping Hard Disk/Files

Postby dasein » 2017-01-18 00:27

Hallvor wrote:I just smash old hard drives with a sledge hammer. :D

Ironically enough, zero-fill is much more secure, unless one shreds the platters into dust.

(Just sayin')
User avatar
dasein
 
Posts: 7775
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Next

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable