What? Am I insane? Officially, yes, but that’s not important. This is a PHP script that can hide files in images. It takes a JPG and converts to PNG. It requires GDlib and is almost totally pointless.
This script has almost no purpose; it is insecure in a number of ways (explained below), it is slow, and there are much better programs available. Lastly, I can see no reason that anyone would ever actually *need* PHP to perform steganography. But it was great fun to write, and perhaps you’ll enjoy playing with the source code!
Firstly, the script requires that you upload your secret file to my webserver, not only do you have no reason to trust me, but the file transfer could be sniffed, thus rendering the steganography pointless.
Assuming you could get around this (eg by using SSL on a trusted server, or running the script locally), the actual implementation of steganography itself is actually very weak; notice that there’s no built in encryption – anyone with access to your encoded image can simply pass it through the decode script and reveal the file. Additionally, the bitstream is encoded in a very boring ‘left-right-top-bottom’ way, so even if the attacker didn’t know the details of the decoding, I suspect it would be fairly trivial to guess.
Anyway, like most of the code here, this is a ‘concept’ piece and not actually designed for a specific use. I wondered if it could be done, noticed that no-one else had done it, and decided to give it a shot.
Incidentally, if any steganography experts are reading this, some tips on steganographising jpegs would be appreciated :-)
If you’re interested in ‘real’ (read: useful) steganography, the following resources offer a wealth of information.
an authoritative resource providing detailed stego theory as well as downloads.
what can only be termed a steganography portal
the leading commercial steganography company
links to some of the many, many tools out there.
widely acclaimed windows steganography software suite. (free)