Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Best Linux Secure Delete?

  1. #1
    Join Date
    Sep 2007
    Location
    /dev/null/
    Beans
    1,589

    Best Linux Secure Delete?

    What is the best secure delete program I can get for Linux? Dont mind if it is command line or GUI. Im after a robust and secure way to shred files, without actually shredding the disc into little bits on the floor

  2. #2
    Join Date
    Apr 2008
    Location
    Belgium
    Beans
    124
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Best Linux Secure Delete?

    You can just use the standard shred program for this.
    Code:
    $ shred file
    cheers.

  3. #3
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Best Linux Secure Delete?

    You can use the shred command, which simply overwrites the file with random data repeatedly. The secure-delete package has tools that use a better algorithm. However, the built-in erase function on modern hard drives does a better job than simple data overwrites, but this erases the entire disk. This can be done with the "--security-erase-enhanced" option when using hdparm.

    I think many people go too far trying to erase data. Probably the only people who might be able to recover data that has been overwritten with a few passes of random data is a government intelligence agency.

  4. #4
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Best Linux Secure Delete?

    Though if you read the shred manual you will see that it is not guaranteed to do the job as well as you might have hoped.

    QUOTE
    In the case of ext3 file systems, the above disclaimer applies (and
    shred is thus of limited effectiveness) only in data=journal mode,
    which journals file data in addition to just metadata. In both the
    data=ordered (default) and data=writeback modes, shred works as usual.
    Ext3 journaling modes can be changed by adding the data=something
    option to the mount options for a particular file system in the
    /etc/fstab file, as documented in the mount man page (man mount).

    In addition, file system backups and remote mirrors may contain copies
    of the file that cannot be removed, and that will allow a shredded file
    to be recovered later.

  5. #5
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,791

    Re: Best Linux Secure Delete?

    The best way to do secure delete is to encrypt the partition and forget the key. Any other way is insecure.

  6. #6
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Best Linux Secure Delete?

    In both the data=ordered (default) and data=writeback modes, shred works as usual.
    data=ordered is the default. Unless the user adds data=journal to their /etc/fstab file, "shred works as usual".

  7. #7
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Best Linux Secure Delete?

    Thanks for that info, not that I use shred, but it's good to learn more.

  8. #8
    Join Date
    Feb 2007
    Location
    Montreal, Canada
    Beans
    191

    Re: Best Linux Secure Delete?

    Unfortunately, I suggest you have a look at this:
    http://ubuntuforums.org/showpost.php...1&postcount=10

    I followed those instructions with shred on a default ext3 (so data=ordered) and managed to acces the shreded data.

  9. #9
    Join Date
    May 2005
    Location
    US
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Best Linux Secure Delete?

    Quote Originally Posted by HermanAB View Post
    The best way to do secure delete is to encrypt the partition and forget the key. Any other way is insecure.
    That's precisely why I don't encrypt my drive!

    My general understanding of how deletions work is that "deleted" files aren't deleted per se, just allocated as "available to be overwritten." Is that understanding correct?

    If it is, would it be possible to securely delete all your files by deleting them and then filling up all the free space on your drive with multiple copies of some binary file (not a text file)?

  10. #10
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Best Linux Secure Delete?

    Quote Originally Posted by aysiu View Post
    That's precisely why I don't encrypt my drive!

    My general understanding of how deletions work is that "deleted" files aren't deleted per se, just allocated as "available to be overwritten." Is that understanding correct?

    If it is, would it be possible to securely delete all your files by deleting them and then filling up all the free space on your drive with multiple copies of some binary file (not a text file)?
    How the deletion actually works depends on the filesystem. With ext3, I believe all the meta-data containing stuff like file path/name and permissions are zeroed out. The data from the file is left intact, because it would be a waste of resources/time to overwrite unused data with nulls or random bytes. I think all filesystems will leave the file's actual data. Even if you delete the file, it can still be recovered using photorec from the testdisk package. You can prevent this by simply overwriting the entire file with nulls (zeros).
    Code:
    shred -z -u -n 0 /path/to/file
    This is a fast way to make it impossible for almost anyone to recover it. However, if someone were to actually open your hard drive, and examine it's platters with an electron microscope or something, it is theoretically possible to determine or guess what the data used to be since a 0 bit isn't physically a true zero, just close to zero. The bits closest to 0 used to be a 0, and the rest were 1's. This is why sensitive data should be overwritten with random data multiple times.

    The built-in erase function I mentioned earlier is better because it erases the edges of the tracks. The edges could be more vulnerable to data recovery because the drives' heads may have shifted slightly since the data was written.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •