How to hide the secret messages inside an image by steganography?
How awesome is the technology? You can hide your message inside an image by steganography. Once upon a time, the man has used this method to hide information in their physical art. But, nowadays this is in the digital photograph. Am going to show you how to hide your message in a digital image. But, before doing this you have to know exactly what steganography means?
What is steganography?
Steganography is the practice of concealing a file, message, image, or video within another file, message, image, or video. The word steganography comes from New Latin steganographia, which combines the Greek words steganós, meaning "covered or concealed", and -graphia meaning "writing".
How steganography work?
We know an image made by a lot of pixels & every pixel includes 0 & 1 mean binary. Just by binary 0 & 1, we can store anything. Even our every digital activity computer can understand by binary include audio, video, text & image. In this case, steganography just replaces the bits of an image by your given message. Not only this in this following message hiding steganography technology we are going to use encryption by a password. And no one can extract the message from your secret digital image without the image & given password.
How to perform steganography?
In this article am going to use a Kali Linux machine with steghide tool. You can do the same thing in various ways. Let's start the process. Open your Linux terminal. In kali Linux press CTL+ALT+T.Now type the following command in my case the package has been installed. Before giving command you should give root permission by sudo su.
apt-get install steghide
Wait a bit. After completing installation you can type steghide --help to get help or follow me. Mind it in this way you can just use jpg/jpeg image to hide text message. Try to use a large image if your message is so large. Cause, I told it replaces the bit of image. If the message binary size is bigger than the image it will not work. Next, create a text file & put your message after that keep both file in one folder & go to the directory by the terminal. In my case, my image name is test.jpeg & text file is test.txt in Desktop.No just type the command below.
steghide -embed -cf test.jpeg -ef test.txt
|Embed the message inside an image|
It will ask you to set a password. Enter the password you want to set of leave blank & press enter twice. Don't copy & paste the command. Cause you have to enter the name of your file instead of test.jpeg & test.txt.If everything is ok You will see a success message & your new secret image replaced by the original. Now come to the point of how to extract the test.txt file from the image. Mail your friend the image & tell to install the steghide package. Otherwise, you can try it in the same system by deleting the original text message & we will get it from the image. After that just on the terminal in the stenographic image directory & type the command below & enter the given password or blank.
steghide -extract -sf test.jpeg
Boom!!! You see a text file added beside the image. I have deleted the original text file. But, after extract the image I got the test.txt file include the message. Open the txt file & see magic.
|The hidden message.|
Stay with us & humanity...
-... -... ...