[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


How to Embed Confidential Data in a Picture using Outguess on Ubuntu

Published on
10,809 Points
2 Endorsements
Last Modified:
Steganography is the hiding of a secret message within an ordinary message and the extraction of it at its destination.  Steganography takes cryptography a step farther by hiding an encrypted message so that no one suspects its exists.  Ideally, anyone scanning your data will fail to know it contains encrypted data.
Check the TechTarget Link for more information.  In today's society it is imperative for individual(s) and companies to keep information secure and out of intruders hands.  Placing more obstacles in their way would deter an intruder from obtaining important information.  I will explain in this article one steganography tool in Ubuntu that can assist you in hiding personal information.

This article will show you how to embed a text file in  a picture.  Outguess relies on data specific handlers that will extract redundant bits and write them back after modification.  Currently only the PPM, PNM, and JPEG image formats are supported; per the man pages.

*Note: found that it does not work with JPEG extension so you would have to convert it to a JPG extension instead.

First you would need a image file and download it to a location.

Let us check to make sure it is not install already, in our case it is not.

Open the terminal session

Ctrl + Alt+t

Now type:
dpkg --get-selections outguess

Open in new window

If is not install now we are going to install the application

sudo apt-get install outguess

Open in new window

Checking the install of Outguess and Installing it.Now once installed I am going to navigate to the location of the image I want to convert.

Now we are going to create a text file name secret.txt, but you can name it whatever you want.

gedit secret.txt

Open in new window

Creating the text file
Once the document open type a message and save the file to the same location of the image.

Now we are going to embed the secret.txt into the images.jpg file and output it to another file and you can name this file whatever you want.


outguess -d secret.txt picture.jpg picture-output.jpg

Open in new window

My example is as follows:

outguess -d secret.txt images.jpg gogiants.jpg

Open in new window

Now this screenshot shows how Outguess extract the redundant bits and write them back after modification.  According to Outguess website, "Outguess preserves statistics based on frequency counts.  As a result, statistical tests based on frequency counts are unable to detect the presence of stenographic content.  Before embedding data into an image, Outguess can determine the maximum message size that can be hidden while still being able to maintain statistics based on frequency counts." Plus look at how the size of the new image file increase.
Now the embed process is taking place
Now I copied the image to another location to show you how to extract the data from the image file

outguess  -r picture.jpg secret.txt

Open in new window

My example:
outguess -r gogiants.jpg secret.txt

Open in new window

Now extracting the file that is embedded into the picture
Now you are able to open the file and read the message. This is good if you want to hide your personal information from intruders. When you open the images side by side you could not tell the difference.
Images Side by Side Comparison
Plus you also add a secret paraphrase in order add extra security to secret.txt into the images.jpg image:

outguess -k "gmen" -d secret.txt images.jpg nygiants.jpg

Open in new window

Process of adding a secret phrase and embed the secret.txt inside of the image file
To extract the hidden message from the image; plus I copied the image to another directory so it will prevent any confusion and to show the portability of the program.  If you want to save the image to a USB drive and carry it around and you happen to lose it an individual would need the paraphrase in order to extract the data from the image.

outguess -k "gmen" -r gogiants.jpg secret.txt

Open in new window

The process of Decoding and extracting the secret.txt with the secret paraphrase

Featured Post

Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Join & Write a Comment

Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month