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".
HP Elitebook 2570p, 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: 814
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: 358
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: 4804
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: 358
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: 4804
Joined: 2015-01-20 22:16
Location: Durango, Mexico

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

Postby bester69 » 2018-06-13 18:30

Im using Steganography with some security keys, and passwords container in the cloud, so This way I can store in the same space the passwords container and sensitive information.

For example, for attic keys (needed to access attic repositories) Im using my own Steganography by replacing in column N(x) vertically (with md5sum word) some inserted characters within the key file.

Im also using some layouts levels in order to recreate master keys files and access to master baul container.:
Example.:
1. /path/file1 >> key1 (encrypted zip)
2. key1 (Open key2) /path/subpath/file2 >> key2 (steghide (key1))
3. key2 (Open Master key) /path/subpath/file3 >> Master-Key (uncompresed zip, + steghide (key2))
4. /path/file4 (steghide (key2)) >> Maste-baul

-----------------------
>> I think this is a very secure way to proceed (using two levels of security Steganography)

.........

Another tactical I use , is to upload an ecrypted repository (key+password) to the cloud, and store in a different cloud the security keys need to acces it.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
User avatar
bester69
 
Posts: 1123
Joined: 2015-04-02 13:15


Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable