Steghide – An easy way to hide confidential data inside images and sound objects in Linux

We have written few articles about the same topics but the way of using is different, how to hide files and folders in Linux & how to protect files and folders with password to safe the personal documents from others. It help us to send the secret information over the Internet like mail.

Today we are going to discuss the same topic once again but the method is completely different. I will show you, how to hide sensitive data inside image and audio files using steghide utility.

Steghide is a steganography program that allows you to hide confidential files inside an image or audio file with a passphrase. Supports BMP and JPEG image formats, AU and WAV audio formats. By default it uses Rijndael algorithm to encrypt the file and the key size is 128 bits. If you want to use any-other supported algorithm to encrypt files, use steghide --encinfo command to bring the list.

Suggested Read : Gnome Encfs Manager – An Ease way to Create a Encrypted Directory in Linux

Suggested Read : SiriKali – GUI Front End To Manage ecryptfs, cryfs, gocryptfs, securefs, and encfs Encrypted Folders

Suggested Read : GnuPG – An Easy Way To Encrypt/Decrypt Files From Command Line in Linux

Suggested Read : Cryptkeeper – An Easy Way To Encrypt And Decrypt Folder or Directory In Linux

Steghide Features:

  • Compression of embedded data
  • Encryption of embedded data
  • Embedding of a checksum to verify the integrity of the extraced data
  • Support for JPEG, BMP, WAV and AU files

How to install Steghide in Debian systems ?

Debian systems had the steghide package in official repository, so we can easily install through Apt Package Manager or Apt-Get Package Manager.

$ sudo apt-get install steghide

For Arch Linux users, use Pacman Package Manager to install Steghide.

$ sudo pacman -S steghide

Manual method to install Steghide in Linux

Follow the below instruction for manual method to install steghide, if the distribution doesn’t have the package.

libmhash libmcrypt libjpeg zlib
$ wget http://prdownloads.sourceforge.net/steghide/steghide-0.5.1.tar.gz?download
$ tar -xzvf steghide-0.5.1.tar.gz
$ cd steghide
$ ./configure
$ make
$ make check
$ sudo make install

How to hide a file inside image ?

Steghide doesn’t have the GUI, so run the following command on terminal to embed the file inside the image. In the following example, we are going to hide taskwarrior text file into Linux_logo.jpg image.

$ steghide embed -cf Linux_logo.jpg -ef taskwarrior
Enter passphrase: 
Re-Enter passphrase: 
embedding "taskwarrior" in "Linux_logo.jpg"... done

Above command will embed the file taskwarrior in the cover file Linux_logo.jpg

How to Unhide/Extract a file ?

Run the following command in terminal and provide the correct passphrase to Unhide/Extract a taskwarrior file from the stego file Linux_logo.jpg, which will automatically save in the current directory.

$ steghide extract -sf Linux_logo.jpg
Enter passphrase:
wrote extracted data to "taskwarrior".

How to hide a file inside audio file ?

Use the same format and change the stego file type to audio instead of image file. See the following example.

$ steghide embed -cf test.wav -ef secret.odt
Enter passphrase:
Re-Enter passphrase:
embedding "secret.odt" in "test.wav"... done

Above command will embed the file secret.odt in the cover file test.wav

How to Unhide/Extract the file ?

Run the following command in terminal and provide the correct passphrase to Unhide/Extract a secret.odt file from the stego file test.wav, which will automatically save in the current directory.

$ steghide extract -sf test.wav
Enter passphrase:
wrote extracted data to "secret.odt".

How to view file information before extracting ?

If you want to get some information about the file before extracting it, use the following info option with steghide command.

$ steghide info  Linux_logo.jpg 
"Linux_logo.jpg":
  format: jpeg
  capacity: 2.0 KB
Try to get information about embedded data ? (y/n) y
Enter passphrase: 
  embedded file "taskwarrior":
    size: 3.3 KB
    encrypted: rijndael-128, cbc
    compressed: yes

This will printing some general information about the stego file like format & capacity. Hit y to extract the embedded data by providing passphrase.

steghide –encinfo

Displays the list of supported encryption algorithms and modes that can be used.

$ steghide --encinfo
encryption algorithms:
: ...
cast-128: cbc cfb ctr ecb ncfb nofb ofb
gost: cbc cfb ctr ecb ncfb nofb ofb
rijndael-128: cbc cfb ctr ecb ncfb nofb ofb
twofish: cbc cfb ctr ecb ncfb nofb ofb
arcfour: stream
cast-256: cbc cfb ctr ecb ncfb nofb ofb
loki97: cbc cfb ctr ecb ncfb nofb ofb
rijndael-192: cbc cfb ctr ecb ncfb nofb ofb
saferplus: cbc cfb ctr ecb ncfb nofb ofb
wake: stream
des: cbc cfb ctr ecb ncfb nofb ofb
rijndael-256: cbc cfb ctr ecb ncfb nofb ofb
serpent: cbc cfb ctr ecb ncfb nofb ofb
xtea: cbc cfb ctr ecb ncfb nofb ofb
blowfish: cbc cfb ctr ecb ncfb nofb ofb
enigma: stream
rc2: cbc cfb ctr ecb ncfb nofb ofb
tripledes: cbc cfb ctr ecb ncfb nofb ofb

Wanna know more about Steghide

If you want to know more options which is available for steghide, simply navigate to man page.

# steghide --help
or
# man steghide

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

Leave a Reply

Your email address will not be published. Required fields are marked *