Comments on: Digital Graffiti Linux. GNU. Freedom. Sun, 13 May 2018 18:21:35 +0000 hourly 1 By: Aaron Toponce : Various Ways To Shred A Drive Thu, 10 Mar 2011 05:01:25 +0000 [...] used to “leave my mark” (much like a dog marks a fire hydrant), however, this is quite slow. There are other [...]

By: Aaron Tue, 19 Aug 2008 14:40:57 +0000 @Wilmer- Ahh, yes. Heh. I know better too. I ran "yes" as root, grabbed a copy of the data after a reinstall, then wrote the post, not actually testing if it worked or not. Thanks for pointing it out. Duly noted and fixed.

By: Wilmer Mon, 18 Aug 2008 20:42:56 +0000 @Aaron: I'm actually writing this on an Ubuntu box:

wilmer@ding:~$ sudo yes "Aaron was here on $(date +%D). " > /dev/mapper/ding-vmware
bash: /dev/mapper/ding-vmware: Permission denied

The problem is, sudo is spawned as a subprocess, which will then be root because sudo is setuid-root (and then read /etc/sudoers, see if the caller is allowed to use sudo with the given arguments, etc, and then start yes).

The redirection to /dev/sda is done by the parent shell already, not by sudo. The shell never becomes root so it will never be able to write to /dev/sda.

By: Jordon Mon, 18 Aug 2008 14:57:52 +0000 That's true, but such techniques are out of the reach of most people.

By: Alphager Mon, 18 Aug 2008 09:14:39 +0000 This does *NOT* securely delete data!
Even if you overwrite every single sector of the disk, the original content still can be recovered using special equipment.

WHile this is fun it is NOT an alternative to shred.

Quote from shred:
On a busy system with a nearly-full drive, space can get reused in a few seconds. But there is no way to know for sure. If you have sensitive data, you may want to be sure that recovery is not possible by actually overwriting the file with non-sensitive data.

However, even after doing that, it is possible to take the disk back to a laboratory and use a lot of sensitive (and expensive) equipment to look for the faint โ€œechoesโ€ of the original data underneath the overwritten data. If the data has only been overwritten once, it's not even that hard.

By: Jordon Mon, 18 Aug 2008 01:01:48 +0000 I recently wrote a post on my blog about "undeleting" old data and using GNU shred to overwrite it for good. Your method is much more clever. The next time I need to wipe an old flash drive, I can make it say, "Move along, nothing to see here..."

By: Aaron Sun, 17 Aug 2008 22:54:32 +0000 @Henrik- This can easily be done by creating a file with the same content until it fills all remaining hard disk space.

@Wilmer- Yes, you are correct. Unless the /etc/sudoers file has been setup, 'sudo' doesn't give magic root access. However, I'm an Ubuntu blogger, and on the Ubuntu planet, so I'm making the assumption that most of my readers are also using Ubuntu, which means that sudo will be properly setup. Further, there is also more than one way to skin a cat, as you have shown.

By: Wilmer Sun, 17 Aug 2008 21:10:19 +0000 sudo doesn't magically make your shell run as root, so the command isn't going to work, don't worry people. ๐Ÿ™‚

You could do something like

yes foo | sudo dd of=/dev/sda


By: Henrik Pauli Sun, 17 Aug 2008 19:47:19 +0000 Nice ๐Ÿ™‚ Now do it without needing a reinstall ๐Ÿ˜›