Steganography is the practice of concealing a file, message, image, or video within another file, message, image, or video. The word steganography combines the Greek words steganos, meaning ‘covered, concealed, or protected’, and graphein, meaning ‘writing’. The first recorded use of the term was in 1499 by Johannes Trithemius in Steganographia, a treatise on cryptography and steganography which was disguised as a book about magic. – Wikipedia

Steganography (pronounced STEHG-uh-NAH-gruhf-ee, from Greek steganos, or “covered,” and graphie, or “writing”) is the hiding of a secret message within an ordinary message and the extraction of it at its destination.

The main advantage of steganography over cryptography is that the secret message does not attract attention to itself as an object of scrutiny. Plainly visible encrypted messages, no matter how unbreakable, arouse interest and may be incriminating in countries where encryption is illegal, or encryption keys are required to be accessible.

So cryptography is the practice of protecting the contents of a message, whereas steganography is concerned with concealing the fact that a secret message is located within the message content.

Steganography includes the concealment of information within computer files. In digital steganography, electronic communications may include steganographic coding within the transported medium, such as a document file, an image file, a program, or a protocol. Media files are ideal for steganographic transmission because of the potentially large size, which makes detection difficult. – What is

We will use a tool called steghide for this tutorial:

Steghide only works with AU, BMP, JPEG, or WAV files. If you want to use a different file format, you will need to use a different tool.

Installing Steghide

Load up Kali Linux and run the following command to install steghide

apt-get install steghide
install steghide
installed steghide

Create a text file with your message

You can use any text editor. I used leafpad to create a text file called secret.txt with the message, “Life is a big adventure”

I downloaded a picture of a cute kitten from the internet and put both files on the desktop.

Using Steghide to hide your message

  1. embed –ef is option to embed the secret message txt
  2. -cf is image file we will use
  3. jpg is a pic file which obfuscates the message
[email protected]:~/Desktop# steghide embed -ef secret.txt -cf cute-kitten.jpg

You will need to enter a password, we have successfully embed the message into our image, thus hiding secret the message.

The full list of commands I used – you can see the difference in file size from the original image and the one we just created using the steghide

[email protected]:~/Desktop# ls
cute-kitten.jpg  secret.txt
[email protected]:~/Desktop# ls -l
total 200
-rw-r--r-- 1 root root 197289 Apr  6 08:27 cute-kitten.jpg
-rw-r--r-- 1 root root     24 Apr  6 08:28 secret.txt
[email protected]:~/Desktop# steghide embed -ef secret.txt -cf cute-kitten.jpg
Enter passphrase:
Re-Enter passphrase:
embedding "secret.txt" in "cute-kitten.jpg"... done
[email protected]:~/Desktop# ls -l
total 200
-rw-r--r-- 1 root root 197296 Apr  6 08:31 cute-kitten.jpg
-rw-r--r-- 1 root root     24 Apr  6 08:28 secret.txt
[email protected]:~/Desktop# steghide extract -sf cute-kitten.jpg
Enter passphrase:
wrote extracted data to "secret.txt".

Reading the embedded secret message

I deleted the secret.txt file from the desktop and then ran this command to retrieve the file from the image

steghide extract -sf cute-kitten.jpg
Techie Mike
Techie Mike
Self-taught techie, with a passion for computers and all the cool things you can do with them. Techie Mike, B.Eng. B.Sc.
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Techie Mike - The IT guy in Thailand.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.