Digital Forensics

Practical Steganography


5th September 2019

The saying goes, a picture is worth a thousand words…but what if a picture is worth more than a thousand words? What if there is something else inside it? And not just in an image, in other files too?

I’m Ordinal Walker and welcome to Ramblings of a techie.

In this one, we are going to cover Steganography...not a new concept and there are many other blogs out there that have covered this, but hey ho.

If I’m honest, this is a bit of a random place to start…in truth though, that is what the name (Ordinal Walker) is all about. It is a joke if you will, as in my life, I have never really done anything in any true order at all, things just seem to play out as they do and maybe that in itself is the order of this walker, the random order of life.

Anyway, enough ramble!

So, just what is Steganography?

A quick Google, will tell you:

It is the practice of concealing messages or information within other non-secret text or data. Steganography works by replacing bits of useless or unused data in regular computer files (such as graphics, sound, text etc) with bits of different, invisible information.

Quit stalling, what’s the plan?!

Great, we know what it is, so lets try it out.

This demo, like most if not all coming up, is based of a Linux OS. The distro I am using, is Ubuntu (Disco Dingo).

Step 1: Download an image

Name the file: steganography-example.jpg

Step 2: Create a secret text file

Name the file: secret-text.txt
File content: “This is a hidden message, embedded into an image”

Step 3: Install steghide


$ sudo apt-get install steghide

Step 4: Hide the file in the image

Now lets hide our file inside an image by using steghide with one of the commands below (you will be prompted for a passphrase).


$ steghide embed --coverfile steganography-example.jpg --embedfile secret-text.txt



$ steghide embed --cf steganography-example.jpg --ef secret-text.txt

Enter a passphrase, re-enter and that’s it!


$ Enter passphrase: 
Re-Enter passphrase: 
embedding "secret-text.txt" in "steganography-example.jpg"... done

Step 5: Extract the hidden data

If you want to extract the data from the file, use:


$ steghide extract -sf steganography-example.jpg 
Enter passphrase: 
wrote extracted data to "secret-text.txt".

And you will have the secret data extracted.

To conclude, as you can see when it comes to Steganagrophy…its what lies within that counts and that is why a picture can be worth more than a thousand words! Happy stegging 😉

Ordinal Walker



Leave a Reply