Steganography - hiding a file in an image or audio file

Share your own howto's etc. Not for support questions!

Steganography - hiding a file in an image or audio file

Postby Hallvor » 2016-01-09 12:59

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 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


This command embeds the cover file (-cf) in the embedfile (-ef). After typing in an encryption password, the file "picture.jpg" now contains an encrypted and compressed version of secret.txt.

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".


The file secret.txt is now decrypted, inflated and extracted.

Testing it

Below is a wallpaper with an embedded secret text message.

Image

As you can see, it looks like a regular image. The secret message is called secret.txt, and the password is "debian".
Intel Core i5 3320-M CPU @ 2.60 GHz, 6 GB RAM, Intel HD 4000 graphics, 240 GB SSD, Debian Stretch (KDE)
User avatar
Hallvor
 
Posts: 798
Joined: 2009-04-16 18:35
Location: Norway

Re: Steganography - hiding a file in an image or audio file

Postby RU55EL » 2018-02-08 22:35

I don't think many here are interested in the web page "10 Best Free Steganography Software for Windows –" that you posted a link to. A list of GNU/Linux steganography software would be of interest.
User avatar
RU55EL
 
Posts: 356
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Steganography - hiding a file in an image or audio file

Postby GarryRicketson » 2018-02-09 00:29

No, we are not interested in Windows software, and new member, old thread, .... obvious spam , so I moved it to spam.
Just to clarify, so the reply makes sense.
Folks, please do not reply when it might be spam, if you are not sure, it is better to just report the post instead of replying to it.
Anyway, I can see though, maybe you did not think it is spam, therefore the reply, which is correct. The How to topic is intended for Debian, and Windows software is of no interest here.
User avatar
GarryRicketson
 
Posts: 4788
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Steganography - hiding a file in an image or audio file

Postby RU55EL » 2018-02-09 01:23

Ooops.

It never occurred to me that the post was spam. I will keep that in mind next time.
User avatar
RU55EL
 
Posts: 356
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Steganography - hiding a file in an image or audio file

Postby GarryRicketson » 2018-02-09 02:17

No big deal, and no problem. Actually in this case it was not really all that obvious, I mean the topic is about Steganography, but combined with some
other information, on the OP, it became clear it was spam.
User avatar
GarryRicketson
 
Posts: 4788
Joined: 2015-01-20 22:16
Location: Durango, Mexico


Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable