Hide a Secret Message inside image Steghide Kali Linux steganography

Hide a Secret Message inside image Steghide Kali Linux steganography

Welcome back to HackingVision, Today we will demonstrate how to hide a secret message inside of an image using Steghide a popular steganography tool that we can use in Kali Linux.

In computer science, the art of hiding information inside files such as images, documents, programs, payloads, messages, music, HTML pages, removable media, etc. is called steganography its the practice of hidden messages or information within other non-secret text or data.

Steghide supports the following image formats: JPEG, BMP, WAV, AU files.

This tutorial is demonstrated using Kali Linux we assume you’re using Kali Linux or another Linux distro.

Installing Steghide

To install Steghide open up a terminal in Linux and use the following command.

apt-get install steghide

Now that Steghide is installed let’s create a new directory your picture and secret.txt files must be inside the same directory.

mkdir steghide

change into the directory where your image and secret.txt files stored. In our case, the image and secret.txt files are stored in a folder called steghide.

cd steghide

Download or move your JPG image or another supported image to the steghide directory we just created.

Write a secret message to the secret.txt file.

echo "Your Secret Message Goes Here" > secret.txt

Now if list the contents of our steghide directory we will see a file called secret.txt it will contain your secret message. To list the contents of a directory in Linux we can use the ls command.

Now its time to hide our secret message we wrote in secret.txt in our image. Use the following command to hide data inside your image. (Change the image name from anonymous.jpg to whatever your image is called.)

steghide embed -cf anonymous.jpg -ef secret.txt

You will be asked to provide a passphrase at this point.

Extracting secret message from the embedded image

We have learned how to hide a secret message inside a text file now its time to learn how a recipient of our image could extract information that we embedded in our image.

To extract information from our embedded image we can use the following command. You will be prompt to enter the decryption passphrase once passphrase has been entered we will retrieve our secret message that was cleverly hidden inside of an image.

steghide extract -sf anonymous.jpg

Now we can use the cat command to list the contents of secret.txt

cat secret.txt

Find info about the embedded image

Let’s say we receive a file that has a secret message embedded inside of it we can use steghide to print out information about the file to do this we can use the info command to list information about an embedded image replace anonymous.jpg with the name of the image you want information about.

steghide info anonymous.jpg