How to hide files in images ?? :)

Print pagePDF pageEmail page

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;

  1. A pdf document named document.pdf
  2. 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.

  1. Create a new folder and place the two files in it.

    Folder with the two files

    Folder with the two files

  2. Right-click on the document and click on Add to “document.rar”.

    Context menu from where file is compressed

    Context menu from where file is compressed

  3. A new file will appear. It is a compressed file named document.rar and containing our file document.pdf .

    Newly created compressed file; document.rar

    Newly created compressed file; document.rar

  4. Next, fire up Windows Command prompt either through
    Start >> All Programs >> Accessories >> Command Prompt 

    Launching Command Prompt from Start Menu

    Launching Command Prompt from Start Menu

    Or simply hit ‘Windows key’ + R to launch the Run.. window, type cmd and hit the return key (a.k.a Enter key)..
    runprompt

  5. In Command Prompt navigate to the folder you are working with. Here its F:/steganography so the command is
    —–   F:/
    —–   cd steganography

    Navigating to folder

    Navigating to folder

  6. Then type the command copy /b image.jpg + document.rar newimage.jpg
    The template is copy /b (imagefile) + (compresseddocumentfile) (newfilename)
    command
  7. The compressed document and the image file will be merged together to create the new image file named newimage.jpg 
    copying

    New image file created

    New image file created

  8. And there you go !! You have an image file with the document inside.
  9. ***********************************************************************
    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

    Opening hidden file - 1

    Opening hidden file – 1

    Opening hidden file - 2

    Opening hidden file – 2

    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? 😉

iRshaad 🙂