Hidden Messages in Images

There’s a technique called “steganographic encoding” where one hide’s a text message or even a whole file structure inside a seemingly normal image. We’re going to make a simple version of this!

  • First, let’s find an image to use…I chose this self portrait I snapped while RJ was playing around with reactivision.

  • Next, lets decide what we want in our message… for now I’ll just make up some text. I’ll type “This is a secret message” in a text file. You could have a whole set of files if you wanted, just compress them into a zipped folder. Save this file (as a .txt) and the image (as a .jpg) into a folder on your Desktop.

  • Now open a command prompt (Windows 7 & vista just open the start menu and type “cmd” – XP users, just go to start -> run -> then type “cmd”)
  • Change to the directory where your image and text file are stored on your desktop. Issue the command:
  • cd C:UsersOwnerDesktopsecret
  • Type the following: (you must change the file names to your own…I used secret.jpg and secret.txt)
  • copy /B secret.jpg + secret.txt new.jpg

  • Hit enter and the DOS prompt should create a file called new.jpg in the same directory you were working in. The /B you entered above is to copy binary data, which simply copies the text data onto the end of the JPEG image. However, when you open the image, the image header tells your computer to stop reading after the length of the image…thus no one will know that there is more information available.

  • To get the information out of this image, simply change the file extension of the new image to “.txt” instead of “.jpg” and your computer should be able to read the message. In fact, for added security, you could zip the text files up and password protect the directory before copying it.

You can see from the image above that the text “This is a secret message!” didn’t take up very much room in the file, so a user wouldn’t see a different file size. However, I put alot of information in that image, say from this page, then the file size will change significantly. This can tip people off if the filesize of images is not roughly what they expect.

Below is the large image, try and decode it’s message! Simple right click the image, save it to your Desktop and change the file extension to “.txt” or simply open the image in a text editor like notepad++. You should then be able to read the secret message! Have fun…

Motivation Behind the Article:

Recently, the Anonymous group hacked an infamous church organization during a live interview. It’s gotten a lot of press because of the skill and precision with which the attack was carried out. The fact that it was done during a live interview with one of the members of the Anonymous Group conveys a sense that these hackers can effortlessly and reliably take down networks at will. I think it’s sad that the majority of the web population doesn’t have any idea how to do something like this. We’ve recently seen examples of why the lack of fundamental knowledge about hacking is a bad thing. It’s better IMO to be at least cognizant of such things rather than taking the whole “head in the sand” approach. Possessing knowledge about internet infrastructure and how to circumventĀ it might be the equivalent to our founding fathers’ intent on the right to bear arms.

We’ll be starting off this week with an old trick (from 1985) used to hide messages in seemingly innocuous images. It’s pretty simple, if no one suspects the image of containing a message then information can flow freely without fear of discovery. Suddenly, a person with this skill can communicate freely without fear of censorship. Online, sites like flickr and forums become instant message boards without anyone knowing. In fact, it was suspected that terror groups where using these same channels to communicate back in 2001. However, not everyone who needs to communicate in this way is a terrorist. There are plenty of legitimate reasons for the public to be made aware of this technique. If nothing else,

One thought on “Hidden Messages in Images

Leave a Reply

Your email address will not be published. Required fields are marked *