Hide Secrets in Pictures: Steghide

Posted by

Steghide is a command line stenography tool. The word stenography is combination of Greek words “Steganos” that means covered or concealed, and “graphein” means writing. Here stenography means we are talking about digital stenography. Digital stenography is a process of concealing a file or message or image or video in another some file or image or video. We can hide any file into another file. Now this is very important to exchange some secret data. Many government secret services and agencies use this kind of security for sending a private data.

We are going to hide a text file into an image file. After doing this the file is looking like a normal picture. We are using steghide tool in our Kali Linux system. So steghide is not comes pre-installed with Kali Linux. To download this we need to open our terminal window and type following command:

apt-get install steghide

The screenshot of the command is following:

This is asking to use 895 of disk space, type “Y” and hit enter.
Then the installation process will start. After a successful install use following command to see the options of steghide tool.

steghide --help

The screenshot is following:

Now we took both image file and secret message in our Desktop. The screenshot is following:

Now we need to go in Desktop directory in command line. We open the terminal window and type following command:

cd Desktop

Then we are checking our files by entering ls command as following:

ls

The screenshot of those commands are below:

Now we are going to hide our text to do this we use following command in terminal window:

steghide --embed -ef msg.txt -cf images.jpeg -sf any-name.jpeg -p 123456

Here we use -ef for embed file remember -ef (embed file) will hide in to the -cf (cover file) then we are creating a new stego file with the same extension name of our cf (cover file), the -p is for creating a password for this file we choose password 123456 for an example.

The screenshot is following,

Here we can see that we have successfully hide our secret message into new stego file any-name.jpeg file, and the both image file is looking same. We found a little bit size increased in the stego file so we suggest to use own clicked images in the place of free online images.

This is the recipe, now how to get back the message from the stego file ?

To extract the secret message we need to type following command in terminal window:

steghide extract -sf any-name.jpeg

The screenshot is following:

Now type the password and we have done successfully extract our secret message.

Feel free to leave a comment below or reach me on Instagram @iamshubhamkumar__.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.