How to use steghide to embed a text file inside an image.

The steghide program is used to embed one image inside another. I will be showing you how to embed a text file inside an image and then set a passphrase to use when recovering the text file.

This is a simple example, I am embedding the file my.txt into a screenshot from a movie.

[email protected]:~# steghide embed -cf 1984-john-hurt.jpg -ef my.txt

Now it will ask me to set a passphrase.

[email protected]:~# steghide embed -cf 1984-john-hurt.jpg -ef my.txt 
Enter passphrase:

This is the passphrase that I use when I am extracting the embedded file.

If I want to extract the data, I use this command.

[email protected]:~# steghide extract -sf 1984-john-hurt.jpg 
Enter passphrase: 
the file "my.txt" does already exist. overwrite ? (y/n) y
wrote extracted data to "my.txt".

This is how easy it is to hide a text file inside an image.

This example shows how to embed an image inside an image. This is another useful way to transfer secret data.

[email protected]:~# steghide embed -cf orwell.jpg -ef images.jpeg 
Enter passphrase: 
Re-Enter passphrase: 
embedding "images.jpeg" in "orwell.jpg"... done

So, try this out for yourself and see how you go!

No comments have been made. Use this form to start the conversation :)

Leave a Reply