Steganography is the art of hiding things in plain sight! The practice dates back to the days of ancient Greece. One story has it that Histaeus, the ruler of Miletus, shaved the head of a slave, and tattooed a message on his scalp and then sent the slave to Greece where the head was shaved and the message delivered. Fast-forward two thousand years to the American Revolution, both the British and American forces made use of invisible inks. They would write a message using special ink on a nondescript piece of paper. When the message got to its intended recipient, a reagent would be used to make the ink (and the message) visible again. Today, through the use of specially designed tools, we can embed messages in common graphics and/or music files. Once the file has been encoded, one can then post the files on a webpage or through some other accessible means and instantly pass along our hidden message.
Much press has been given to using steganographic tools on the Windows platform but does that mean those of us using a Macintosh or Linux distribution are out of luck? Certainly not! This posting will detail out how to encode a jpeg on both the Macintosh platform using an application called Cryptix and then we will look at a command line option of the Linux platform.
Cryptix on OSX
You can download a copy of Cryptix from http://www.rbcafe.com/cryptix. Once downloaded the operation of the encrypting a jpeg is pretty straightforward. Under the Tools pull down menu select Steganography. You have two choices either to use Cryptix’s built in tool or the GUI version of open source tool Outguess. One thing to keep in mind… If you use Cryptix’s built in tool only Cryptix can unlock the secrets embedded in the file that was created. If you need to share with users on other platforms… Outguess GUI is your best bet! Let’s take a look at Cryptix’s built in tool!

In the Key field we added a very simple passphrase. In real life you may want to use something a bit more complex. The message field is where we place the data we were looking to embed in our JPEG. If the message is short typing the message is fairly simple otherwise Cryptix does allow you to paste data into the message field. Next click of the Encrypt button. You will be presented with the following dialogue sheet.

Select the file you wish to embed your data into. Next select a filename for the newly created (or modified) JPEG.

Now you can open the newly created file within an application that can read a .jpg file.
NOTE: A word of caution! The file size of the newly created jpeg was 10X larger than the original file. Additionally, there were some extreme artifacts left after the embedding process. I originally tried to embed Sun Tzu’s Art of War into the file and got some erratic results. I attributed the result due to the amount of data I was trying to embed. However, in the above How-To, the amount of text embedded into the jpeg was minimal! If you look closely at that file, there still some visual artifacts remaining. (See below)
 |
 |
 |
| Original JPEG |
How-To JPEG |
Art of War JPEP |
One could over look the artifacts left behind in the how-to JPEG if the original file was not on hand to compare the difference. Additionally, if you were to look at the histograms of all the modified files one could definitely see there are problems with the file. Your results will vary based on how much data you’re trying to embed into and how big the original graphic file is.
Outguess on Ubuntu
Outguess is a command line driven tool. Some find this an obstacle but it is easy to use. The man page for the use outguess is pretty complete with examples. An online version can be found at http://manpages.ubuntu.com/manpages/gutsy/man1/outguess.1.html.
Installing Outguess on Ubuntu is fairly straightforward. Open Synaptic Package Manager and type outguess.

Once that completes, outguess can be found in /usr/bin. Open a terminal window. NOTE: I placed both the jpeg I wanted to embed with data and the file containing my data into the same directory for simplicy’s sack! Navigate to the dictortory that your files are located in. Enter the following command (please modify the file names based on your files).
root@corusant# outguess -k password -d TopSecretMessage.txt before.JPG after.JPG
The –k flag is the passphase you’re going to use to protect the embedded data. You will need this to extract the data at a late date. The –d flag is the file that contains the data you want to embed in the jpeg. The before.jpg needs to be available before the process begins BUT the after.JPG is created by outguess at the end of the embedding process.
You should see similar output:
Reading before.JPG....
JPEG compression quality set to 75
Extracting usable bits: 181591 bits
Correctable message size: 14684 bits, 8.09%
Encoded 'TopSecretMessage.txt': 1400 bits, 175 bytes
Finding best embedding...
0: 682(47.6%)[48.7%], bias 739(1.08), saved: 2, total: 0.38%
2: 682(47.6%)[48.7%], bias 687(1.01), saved: 2, total: 0.38%
46: 685(47.8%)[48.9%], bias 679(0.99), saved: 1, total: 0.38%
72: 676(47.2%)[48.3%], bias 675(1.00), saved: 3, total: 0.37%
82: 688(48.0%)[49.1%], bias 650(0.94), saved: 1, total: 0.38%
152: 698(48.7%)[49.9%], bias 638(0.91), saved: 0, total: 0.38%
152, 1336: Embedding data: 1400 in 181591
Bits embedded: 1432, changed: 698(48.7%)[49.9%], bias: 638, tot: 180854, skip: 179422
Foiling statistics: corrections: 324, failed: 0, offset: 64.375546 +- 165.386280
Total bits changed: 1336 (change 698 + bias 638)
Storing bitmap into data...
Writing after.JPG....
Congratulation! You’ve just embedded the contents of the file TopSecretMessage.txt into the file after.JPG. The process to retrieve data from after.JPG is just as simple.
root@corusant # outguess -k password -r after.JPG hidden.txt
Reading after.JPG....
Extracting usable bits: 181591 bits
Steg retrieve: seed: 152, len: 175
You now have a file (hidden.txt) that contains the same data that was stored in TopSecretMessage.txt
Resources:
Pierce, D. (2010, February 8th) How To: Smuggle Secret Information with VOIP, Retrieved on March 12th, 2010 from http://www.wired.com/dangerroom/tag/steganography/
Provos N., (2006, January 4), OutGuess – Information, Retrieved on March 12th, 2010 from http://www.outguess.org/info.php
Additional resources:
http://lifehacker.com/230915/geek-to-live–hide-data-in-files-with-easy-steganography-tools
http://www.linkgard.com/security_blog/introduction-to-steganography-and-steganalysis/