Hiding files in JPEGs
You’ve probably heard about storing secret messages in JPEGs by means of steganography. But what if you have entire documents that you’d like to hide? As proof of concept, I showed this example to my coworkers.
We start out with a random JPEG, taken from my Flickr account:
Now we create a simple zip file with a text document in it:
$ zip test.zip test.txt
And we cat the two files together:
$ cat fotobok.jpg test.zip > fotobok-test.jpg
File indeed recognizes this as an image:
$ file fotobok-test.jpg
fotobok-test.jpg: JPEG image data, JFIF standard 1.01
And you can see it here too:

The only difference now is that we can unzip the file aswell:
$ unzip fotobok-test.jpg
Archive: fotobok-test.jpg
warning [fotobok-test.jpg]: 19881 extra bytes at beginning or within zipfile
(attempting to process anyway)
extracting: test.txt
Tada! Our highly secret test.txt is back!

Comment from Boerenkool
Time: December 6, 2007, 10:15 pm
Hello world! (it works perfectly)
p.s. You are missing a leg