Page 1 of 1

Wipe - Linux tool for erasing files

Posted: Wed 01 May 2019, 18:14
by labbe5
wipe is a cli-tool that is in most, if not all Linux repositories which will help you erase your sensitive files securely.

As root, open a terminal where your folder or files to erase are.

For a folder to erase : #wipe -r name-of-your-folder
For a file to erase : #wipe name-of-your-file

Files and folders are not just removed, they are overwritten numerous times, and become unretrievable by forensic investigation tools.

The best folder where to manage your sensitive files is temp folder.

Wiping a partition :
Randomize the drive/partition using a randomly-seeded AES cipher from OpenSSL.
As root :
#DEVICE="/dev/sdX"
#PASS=$(tr -cd '[:alnum:]' < /dev/urandom | head -c128)
#openssl enc -aes-256-ctr -pass pass:"$PASS" -nosalt </dev/zero | dd bs=64K ibs=64K of=$DEVICE status=progress

The command above creates a 128 byte encryption key seeded from /dev/urandom. AES-256 in CTR mode is used to encrypt /dev/zero's output with the urandom key. Utilizing the cipher instead of a pseudorandom source results in very high write speeds and the result is a device filled with AES ciphertext.

The block size is set to 64K above as it is usually faster than the default 512 bytes, and yields nearly optimal transfer rates across a range of hardware.

https://wiki.archlinux.org/index.php/Se ... ed_example

Further reading :
Secure Deletion on Solid-state Disks (SSDs), USB Flash Drives, and SD Cards
Due to the way SSDs, USB flash drives, and SD cards work, it is difficult, if not impossible, to securely delete both individual files and free space. As a result, your best bet in terms of protection is to use encryption. That way, even if the file is still on the disk, it will at least look like gibberish to anyone who gets ahold of it and can’t force you to decrypt it. At this point in time, we cannot provide a good general procedure that will definitely remove your data from an SSD.
https://ssd.eff.org/en/module/how-delet ... inux##SSDs

Posted: Wed 01 May 2019, 18:39
by musher0
Hi, labbe5.

Great suggestion!

Except this upupbb-light does not have the wipe utility.
And I suspect a lot of other Pups do not have it either.

Any idea where we can get it?

TIA.

Posted: Wed 01 May 2019, 18:44
by s243a
musher0 wrote:Hi, labbe5.

Great suggestion!

Except this upupbb-light does not have the wipe utility.
And I suspect a lot of other Pups do not have it either.

Any idea where we can get it?

TIA.
As a side note, depending on the storage media and the file system, one should also encrypt any sensitive file (or alternatively file system) because depending on the media and file system it may be the case that shredding utilities might not work as expected. For example wear reduction algorithms (or journaling?) might leave old remnants of the file in unexpected places.

Posted: Wed 01 May 2019, 18:55
by musher0
Hello all.
s243a wrote:( ... ) shredding utilities ( ... ).
This pup does have the shred utility, however.
What's the difference between shred and wipe?

BFN.

Posted: Wed 01 May 2019, 19:00
by s243a
musher0 wrote:Hello all.
s243a wrote:( ... ) shredding utilities ( ... ).
This pup does have the shred utility, however.
What's the difference between shred and wipe?

BFN.
Entropy?

Posted: Wed 01 May 2019, 19:51
by fabrice_035

Re: Wipe - Linux tool for erasing files

Posted: Thu 02 May 2019, 00:47
by Flash
labbe5 wrote:...Files and folders are not just removed, they are overwritten numerous times, and become unretrievable by forensic investigation tools....
Is that really true if the files are fragmented all over a hard disk?
I guess if the files were encrypted in the first place it wouldn't make much difference.

Posted: Thu 02 May 2019, 04:14
by musher0
s243a wrote:
musher0 wrote:Hello all.
s243a wrote:( ... ) shredding utilities ( ... ).
This pup does have the shred utility, however.
What's the difference between shred and wipe?

BFN.
Entropy?
Sorry, not getting it, s243a.

BFN.

Posted: Thu 02 May 2019, 06:40
by bigpup
Any idea where we can get it?
wipe is a cli-tool that is in most, if not all Linux repositories
Search Puppy Package Manager(PPM) for wipe.

Found and installed from PPM.
root# wipe -v
This is wipe version 0.23.

Author: Oguz Berke Antoine Durak.
Author's e-mail address: echo berke1lambda-diode2com|tr 12 @.
Web site: http://lambda-diode.com/software/wipe/
Release date: 2016-11-03
Git version: (unknown, compiled without git)

Based on data from "Secure Deletion of Data from Magnetic and Solid-State
Memory" by Peter Gutmann <pgut001@cs.auckland.ac.nz>.
root#
Here it is at Github:
https://github.com/berke/wipe/tree/master
The README kind of says it may or may not work.
Need to read that and decide for yourself.