Bryan Kielpinski

Bryan Kielpinski

How to Rick Roll your Hard Drive

Never Gonna Give You Up thumbnail

Rick Roll? What is this the early 2000's? I know, I know. Bare with me, there are many reasons you may want to Rick Roll your hard drive. Did I just say "Rick Roll" and "hard drive" in the same sentence?

You see, computer hard drives are a very cool. They are disks that store information in the form of 1's and 0's, well in the form of a magnetized or unmagnetize segment of the disk.

Talk about cool! Now here comes the not so cool part, when files are deleted by your operating system the data isn't really deleted as you would expect. Instead, it is basically marked as availible for writing new data. If you don't write any data to this part of the disk, your old data is still sitting there for anyone to access.

So now why is this an issue? And why Rick Roll?

You see, that super secret family recipe or any other data you thought you deleted could by recovered by someone with some know how. Therefore we should overwrite free space on our hard disk to make sure previous data is not sitting there waiting to be recovered.

How To:

In order to write over the empty space of your hard drive with Rick Astley you will need to actually go and download the video from Youtube.

If you are using a Linux/FreeBSD machine you can use wget.

If you are using Windows you should probably just use one of those free online youtube downloading sites.

We are going to use a lovely utility called, dd. It usually comes with all Linux distros and FreeBSD. Windows users will have to download it. This utility is great at reading and writing data, securely wiping files, duplicating CDs, and Making Backup Images of your Hard Drives, but it doesn’t have a way to loop an input file. For this reason we need to create a small script that will do the looping for us.

First create a text file with your favorite editor:

vim rickrollscript.sh

Copy and paste the following code in the text file:

#!/bin/bash x=1 while [ $x = 1 ] do dd if=rickroll.flv >> deleteMeLater.tmp done


In order for a shell script to run, it must be executable:

> ```
chmod +x rickrollscript.sh

Now all you have to do is run it. This script can be ran from a regular user account:

sh rickrollscript.sh


Depending on the size and speed of the hard drive it may take a little while to fill it up. You will know when it is done when you are greeted with something like this:

> ```
dd: stdout: No space left on device

When you notice this message you can hit ctrl + c to end the loop.

Conclusion

And voilà! You have just successfully overwritten any free space on your hard drive with the video "Never Gonna Give You Up" by Rick Astley. Now if someone decides to snoop on the data sitting on your hard drive, they will not be able to recover deleted data that is still sitting around.

In conclusion, computers are fun. But they can be surprisingly dificult to keep secure from someone with a bit of technical know how. I hope this post was informative and maybe a bit entertaining. Go forth reader and do great things! Thanks for your time.