Steganography - Concealing messages in text files



Hey everyone! In this tutorial, I’m going to teach how you can conceal messages in a text file using SNOW (Steganographic Nature Of Whitespace). I discovered this program today and I thought it was a good and simple share. But first, what is Steganography?

According to Wikipedia, “Steganography is the practice of concealing a file, message, image, or video within another file, message, image, or video”. For this tutorial, we are going to stick with text files (maybe i’ll cover image file in another post).

So let’s get started!

Description from the official website:

The program SNOW is used to conceal messages in ASCII text by appending whitespace to the end of lines. Because spaces and tabs are generally not visible in text viewers, the message is effectively hidden from casual observers. And if the built-in encryption is used, the message cannot be read even if it is detected.

How it Works

Whitespace Steganography

The encoding scheme used by snow relies on the fact that spaces and tabs (known as whitespace), when appearing at the end of lines, are invisible when displayed in pretty well all text viewing programs. This allows messages to be hidden in ASCII text without affecting the text’s visual representation. And since trailing spaces and tabs occasionally occur naturally, their existence should not be sufficient to immediately alert an observer who stumbles across them.

If you want a detailed documentation of how SNOW works, click here.

Installing SNOW

If you’re running Kali, you already have the necessary repositories so you just have to type sudo apt-get install stegsnow

Concealing messages

The usage of SNOW is really straight forward. The program has 7 options:

 -C - To compress/uncompress;

 -Q - Quiet mode;

 -S - Report on the approximate amount of space available for hidden message in the text file;

 -p password - Encrypts/Decrypts the data with an established password;

 -l line-lenght - When appending whitespace, snow will always produce lines shorter than this value. By default it is set to 80;

 -f message-file - The contents of this file will be concealed in the input text file;

 -m message-string - The contents of this string will be concealed in the input text file;

Let’s say you want to share a password with a friend of yours. Let’s say the password you want to share is “qwerty” and and the encryption password is “0x00sec”. You simply create a text file and then we type in the terminal:

stegsnow -m "qwerty" -p 0x00sec <created_file_name> <new_file_name>

This creates a new file, with the concealed text.

Now to decrypt it, just type:

stegsnow -p 0x00sec <new_file_name>

This pretty much covers it! Thanks for reading!

(Command-Line Ninja) #2

Oh man! This is cool. I never knew about this!


Not just text files, steg can be used in most file formats. It’s most popularly used in picture formats and more famously Elliot Alderson uses it in Mr. Robot to hide his hack data in mislabled CD’s as mp3 data.


I covered that right in the beginning:

Steganography is the practice of concealing a file, message, image, or video within another file, message, image, or video


Totally missed that paragraph. XD

My bad.

(random-man) #6

That’s cool! Downloading it right now!


Old tricks are the best tricks, eh chaps!

(system) #8

This topic was automatically closed after 30 days. New replies are no longer allowed.