Steganography is the practice of concealing a file, message, image, or video within another file, message, image, or video. The word steganography combines the Greek words steganos (στεγανός), meaning "covered, concealed, or protected", and graphein (γράφειν) meaning "writing".
What we'll do
In this howto we will embed, compress and encrypt a text file, hiding it within a cover file. The cover file must be in JPEG, BMP, WAV or AU formats, while the embed file can be in any format.
Getting started
We must first install steghide from the repository (as root):
Code: Select all
# apt-get install steghide
Hiding a text file in a JPEG image
As mentioned, many formats can be used, but in this example, we will embed a text file called secret.txt withing the image picture.jpg. The first thing we do is opening a terminal in the same directory as secret.txt and picture.jpg.
Code: Select all
hallvor@debian-netbook:~$ steghide embed -cf picture.jpg -ef secret.txt
Enter passphrase:
Re-Enter passphrase:
embedding "secret.txt" in "picture.jpg"... done
To get info about the embedfile, you can use the following command:
Code: Select all
hallvor@debian-netbook:~$ steghide info picture.jpg
"picture.jpg":
format: jpeg
capacity: 116,6 KB
Try to get information about embedded data ? (y/n) y
Enter passphrase:
embedded file "secret.txt":
size: 602,0 Byte
encrypted: rijndael-128, cbc
compressed: yes
hallvor@debian-netbook:~$
Extracting the content
The recipient must use steghide to extract the content.
We can extract the content using the following parameters:
Code: Select all
hallvor@debian-netbook:~$ steghide extract -sf picture.jpg
Enter passphrase:
wrote extracted data to "secret.txt".
Testing it
Below is a wallpaper with an embedded secret text message.
As you can see, it looks like a regular image. The secret message is called secret.txt, and the password is "debian".