stenography

The art and science of writing hidden messages in such a way that no one, apart from the sender and intended recipient could understand or view is called Steganography.

According to Wikipedia, the word steganography is of Greek origin and means “concealed writing” from the Greek word steganos meaning “covered or protected” and graphei, meaning “writing”.

Steghide  is  a steganography program that is able to hide data in various  kinds  of  image-  and  audio/files.  The color respectivly sample frequencies are not changed thus making the embedding resistant against first-order statistical tests.

Prerequisites

  • Steghide application
  • A .jpeg or .bmp file and a .txt file to hide within it

Steghide

Straight from the Steghide website “Steghide is a steganography program that is able to hide data in various kinds of image- and audio-files. The color- respectivly sample-frequencies are not changed thus making the embedding resistant against first-order statistical tests”.

Features

  • Compression of embedded data
  • Encryption of embedded data
  • Embedding of a checksum to verify the integrity of the extracted data
  • Support for Jpeg, Bmp, Wav and Au files

Current Distributions

  • Microsoft Windows
  • Linux

Encrypting Data

In my example I am going to use Microsoft Windows to hide some data in a text file called “secrettext.txt” in a file called “image.bmp” using Steghide version 0.5.1.

  1. Download Steghide
  2. Extract the application
  3. Copy the text and bmp file to the extracted location
  4. Drop to a command prompt
  5. Change to the directory the extracted application resides in
steghide.exe embed -ef secrettext.txt -cf image.bmp

Where

  • -ef = The text file you wish to encrypt
  • cf = The image file you wish to encrypt the data in

You will be prompted for a password to encrypt the data, this adds extra security to the encrypted image should only be shared with the intended audience.Steghide Embedding

Before encrypting the image it was 565,494 and after it was encrypted it is still 565,494. This makes it very hard to even detect that anything has been embedded within it.

You can also do this for audio files, the same process as above but use a Wav file.

Extracting Data

Extracting the data is much the same as embedding it however you will need the following:

  • Steghide Application
  • The image/audio file
  • The password
steghide.exe --extract -sf image.bmp -p password

Where

  • -sf = The image file
  • -p = The passwordSteghide Extracting

Documentation

The documentation for the application can be found here

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

2 Responses to “Encryption of text in images using Steghide (Steganography)”

  1. hawbir

    I have a photo which hide a text using Steghide, and i want to extract it but when i try using Steghide it ask a password which I don’t have it. What can I do?

    Reply

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.