Steganography

steganography-cover-image

Hello everyone, today we are going to discuss about steganography, a technique which is used to hide any kind of data inside a file.

What is Steganography?

Steganography is a technique of hiding secret data by embedding it into an audio, video, image, and a text file. Once, the secret data is embedded and then it sent, it normally looks like an audio, video, or an image but the hidden data can’t be seen normally. And the when the file reaches the destination, the receiver at the destination knows it has some hidden data and he will extract the embedded hidden data.

I hope, everyone had got some idea about what steganography is. But how does a file look like when the data is being hidden in it.

To show you, that I am going to hide a text “This is a hidden text” in an image.

First, I will show you the image and later, I will tell you the process that is being used to embed the data in an image.

 As you can, the above picture is a normal picture from a normal point of view. But a text is embedded in the image. As I mentioned “There is a hidden text”.

This is text embedded in the image.

Now, let’s see how I embedded the text inside a image.

How to embed text inside an image?

We can embed text inside an image using different tools. I am going to use a tool called Steghide.

It is an easy tool to use when it comes to steganography. I will show you how to embed the text and how to extract the text from the embedded image.

Steps to embed image using Steghide tool:

  1. Open your Kali Linux
  • Now, install a steghide tool using the command mentioned below.

   sudo apt install steghide

  • After using this command, the steghide tool is installed in your Kali Linux.
  • For keeping the files separate, create a new folder. And create a text file and add the text you want to insert in the image.
  • I had created a separate folder, and create a text file with “This is a hidden text” text inside the text file.
  • Now, keep the image in the same folder where you have created a text file.
  • After doing that, use the command which is mentioned below to embed the text in the image.

steghide embed -cf simple-background-quote-minimalism-text-wallpaper-preview.jpg -ef text-file.txt

  • After executing the command, you will be asked to enter a passphrase, and you will be asked again to enter the passphrase.
  • Now, keep that as your password for embedded file.
  • After that you have successfully embedded the text in the image file.
  • Before, doing the extraction. Try to keep the image in a separate folder.
  • I have, shifted the image file to a different location, now to extract the data use the command mentioned below.

steghide extract -sf simple-background-quote-minimalism-text-wallpaper-preview.jpg

  1. It will ask you to enter the passphrase you kept when you are embedding the data.
  2. That’s it, the data is extracted to a file named text-file.txt.
  1. Now, see the contents of the text file. You will see the same text which you added in the text file at first while embedding the data in the image.
  1. Boom! We have successfully done the embedding of text into an image and extracting the data from the image.

This is one of the processes of embedding the data into an image. There are different techniques as well. It is one of the easy processes.

I hope you have learned this thing, and if you have any doubts. Feel free to drop a comment.

Thank You!