Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Steganography - hiding a file in an image or audio file

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 times

Steganography - hiding a file in an image or audio file

#1 Post by Hallvor »

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".
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

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

#2 Post by RU55EL »

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
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

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

#3 Post by GarryRicketson »

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
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

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

#4 Post by RU55EL »

Ooops.

It never occurred to me that the post was spam. I will keep that in mind next time.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

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

#5 Post by GarryRicketson »

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
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

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

#6 Post by bester69 »

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:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

Post Reply