Steganography is the art of hiding a message. The purpose of steganography is to hide a message from a someone you don’t want to see it. It is different than cryptography, the art of secret writing, which is intended to make a message cannot be read , but does not hide the existence of the secret communication. Although steganography differs from cryptography, there are many analogies between the two, and some authors classify steganography as a form of cryptography since hidden communication is a type of secret writing. Steganography works by changing bits of useless or bot used data in regular computer files (such as graphics, sound, text, HTML) with bits of different, invisible information. This hidden information can be plain text, cipher text, or even images.
Steghide is a command line utility that allows you to hide confidential data within various types of image and audio files.
For Linux users it can be installed with following command:
sudo apt-get install steghide -y
To start Steghide, the most basic option we use is the help command. This command will show us all the options that Steghide offers us.
Run the following command to pull the Steghide help section.
steghide --help
We hide the data in the image using the Steghide so that only the person who accepts it can read it. Therefore, we created a text file named “example.txt”, in which we wrote our confidential data and images. JPEG is the file in which we are embedding our data.
To achieve this, run the following command to embed “example.txt” in an image named “example.jpeg”.
steghide embed -ef example.txt -cf example.jpeg
Here, ef and cf are termed as embedded files and cover files, respectively.
Let’s see what this command is doing:
You will be prompted to enter a passphrase. This passphrase will be necessary for anyone trying to extract data from the image. The passphrase is not required. However, anyone trying to extract data will be able to do so.
Using Steghide adds an extra layer of security by allowing us to use a password for it. As long as you know the passphrase, it is quite easy to extract data from the image.
Now, use the following command to remove the hidden data:
steghide extract -sf example.jpeg