How To Wipe Files Or Filesystem On Linux

 ⚠️HP TECH ⚠️

➖ TUTORIAL ➖

since I got a wonderful support on my last wipe tutorial series, here is another tutorial.


We all use computers and laptops. Some people are booting their computer without encryption, some use bitlocker, veracrypt or bios password. There is not a completely protection. Sure you can encrypt your whole system but what's more difficult than restore an encrypted wiped system? — Right, nothing.


On linux (thanks peter gutmann) we have the package »wipe«. 

If pre-installed on kali, i don't know if it is pre installed on another system but on kali it is. 


View the version: 

mrblackx@kali:~$ wipe -v

This is wipe version 0.23.


Make sure you use sudo on the different wipes.


Delete Files Without Confirmation

For this feature we are using -f = force.


Example :

mrblackx@kali:/tmp/test_folder$ wipe -f test.txt 

Wiping test.txt, pass 34 (34)   

Operation finished.                                                           

1 file wiped and 0 special files ignored in 0 directories, 0 symlinks removed but not followed, 0 errors occurred.


Remove Directory Trees

It is deleting a directory + subdirectories. (No systemlinks!)

-r = recurse


Example:

mrblackx@kali:/tmp$ wipe -fr test_folder/

Operation finished.

0 files wiped and 0 special files ignored in 5 directories, 0 symlinks removed but not followed, 0 errors occurred.


Permission Problems

If you have permission problems, maybe because you set wrong permission with chmod. You can solve this with -c = chmod 

(no example because i don't need to show)


Print Errors

You can print errors with -i = informational aswell known as verbose output if you don't want any output only errors, you can aswell use -s = silent mode.


Quick Wipe & Passes

You can define a quick wipe (only 4 passes) or define the passes by yourself. Let's assume you want 10 passes, well you have to use following syntax : -qQ <10>. The default quick wipe passes, as already mentioned are 4.


Example:

mrblackx@kali:/tmp$ wipe -fqQ 10 viperzcrew.txt 

Wiping viperzcrew.txt, pass 9 in quick mode   

Operation finished.                                                           

1 file wiped and 0 special files ignored in 0 directories, 0 symlinks removed but not followed, 0 errors occurred.


Abort If Error

You can abort the operation if any error happen, this could be either useful or useless. Depends for which reason you wipe your files/system. For here you can use -a = abort on error.


Keep Files

If you want to keep linked files, which has been overwritten you can use -k


➕ ADVANCED STUFF ➕


Random Seeds

If you run echo /dev/random then you can see, it's fucking random. With -S you can change this option to different options. Please only use -S if you know what you are doing:


-S r = This is used for regular files or devices.

-S c =  Output will be md5 hashed.

-S p = The least secure setting, it won't use random strings.


The Length Of Blocks

Some block devices have problems with their size, floppy disks or tapes, use the -l <length> option to define a length. You can use K(kilo) - 1024,M(mega) - 1048576,G(giga) - 1073741824,B(block) - 512


You can also visit the MAN Page which i have this all information from above. (It is easy to understand). 


Example: 


sudo wipe -fiqQ 20 /var/logs/*

(Remove All Log Files + Subdirectories With 20 Passes Quickly And Forced)


ENJOY! Follow us for more...

No comments:

Post a Comment

What is Prototype content functions in JavaScript Framework Programming.mp4

  Download now Enjoy! Follow us for more...