Ever thought of hiding files? Everybody did ! But everybody has his/her own way of hiding stuffs including computer files. Some use hidden folders (and forget the location of the folders sometimes 😛 ), some lock the up on online storage sites or others simply burn the files on a disk or copy the files on a removable drive and hide them physically in some drawer or safe. But there exist a James Bond technique for those geeky users on the Web; that’s of hiding the files in images. This post is a quick guide about how to do it.
This technique is known as Steganography.
Steganography is the art and science of writing hidden messages in such a way that no one, apart from the sender and intended recipient, suspects the existence of the message, a form of security through obscurity. The word steganography is of Greek origin and means “concealed writing” from the Greek words steganos meaning “covered or protected”, and graphei meaning “writing”. Wikipedia
The first recorded use of steganography dates back to 440 BC when Herodotus, an ancient greek historian from Caira, present-day Turkey, mentions two examples of steganography in his Histories. Demaratus, king of Sparta from 515 until 491 BC and successor of Ariston, sent a warning about a forthcoming attack to Greece by writing it directly on the wooden backing of a wax tablet before applying its beeswax surface. Wax tablets were in common use then as reusable writing surfaces, sometimes used for shorthand.
For our tutorial, we will be dealing with two files;
- A pdf document named document.pdf
- An image file named image.jpg**File compression and archiving software, WinRAR from Rarlabs will be needed for this process. WinRAR can be downloaded from www.rarlab.com**
Here’s how it’s done.
- Create a new folder and place the two files in it.
- Right-click on the document and click on Add to “document.rar”.
- A new file will appear. It is a compressed file named document.rar and containing our file document.pdf .
- Next, fire up Windows Command prompt either through
Start >> All Programs >> Accessories >> Command Prompt
Or simply hit ‘Windows key’ + R to launch the Run.. window, type cmd and hit the return key (a.k.a Enter key)..
- In Command Prompt navigate to the folder you are working with. Here its F:/steganography so the command is
—– cd steganography
- Then type the command copy /b image.jpg + document.rar newimage.jpg
The template is copy /b (imagefile) + (compresseddocumentfile) (newfilename)
- The compressed document and the image file will be merged together to create the new image file named newimage.jpg
- And there you go !! You have an image file with the document inside.
To access the files from the image, launch WinRAR.
Click on File >> Open Archive
Set the filetype to All files
Click on newimage.jpg (or any other file you have created using the above procedure)
Click on Open
Then either double-click on the file to launch it, or extract the archive and get your document back 🙂
Voila !! 🙂
You now know how to hide files in images 😉
Did I mention that the image file created is as any other image file ? 😎 , meaning you can send it as an email attachment and thus the recipient can simply extract the image file to get the secret document? 😉