Stegsnow | Hide a Text In a Text File

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

This utility can 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.

In this article, we will try to hide data in a text file with a not so famous tool. we will try to make data as hidden as possible. with this tool, you will be able to hide your ssh keys, API keys, passwords and other stuff too. but it is required for the data to be in text (ASCII) form.

Stegsnow provides rudimentary compression, using Huffman tables optimised for English text. However, if the data is not text, or if there is a lot of data, the use of the built-in compression is not recommended, since an external compression program such as compress or gzip will do a much better job. Encryption is also provided, using the ICE encryption algorithm in 1-bit cipher-feedback (CFB) mode. Because of ICE’s arbitrary key size, passwords of any

length up to 1170 characters are supported (since only 7 bits of each character are used, keys up to 1024-bytes are supported).

⤿ Install:

apt install stegsnow

⤿ Help menu:

stegsnow --help

⤿ Let’s hide a message in a text file - for the demonstration, I have created a text file which contains some text names:

> cat original.txt
My bad, I forgot my password, sorry about that.

⤿ Now we want to hide a message in this file:

stegsnow -C -m "My password is 12345" -p "root" original.txt original2.txt

-C is to compressing data. It will also be used in extracting data;

-m is to define the message that supposed to be encrypted;

-p is for the password.

⤿ Now let’s take a look at the original2.txt with nano:

⤿ The file has something in red colour, but we can’t read it. But you can try to read it with hex:

hexdump original2.txt
0000000 794d 6220 6461 202c 2049 6f66 6772 746f
0000010 6d20 2079 6170 7373 6f77 6472 202c 6f73
0000020 7272 2079 6261 756f 2074 6874 7461 092e
0000030 2020 2009 2020 2020 0920 2020 090a 2020
0000040 2009 2020 2020 2020 0909 2020 2020 2009
0000050 2009 2020 2020 0920 2020 0920 2009 2020
0000060 2020 090a 2009 2020 0920 2020 2020 0920
0000070 2020 2020 2020 2009 0920 0920 2009 0920
0000080 2020 2020 200a 2020 2009 2020 2020 2009
0000090 2020 0920 2020 2020 2020 0920 2020 2009
00000a0 2020 2020 0920 2020 2020 0920 2020 2020
00000b0 2020 2009 2020 2020 2020 2009 2020 2020
00000c0 2020 200a 0920 2020 0920 2020 0909 0909
00000d0 000a

⤿ To decrypt the file, you will need to use Stegsnow tool again with your given password:

stegsnow -C -p 'root' original2.txt
My password is 12345

And we have our hidden text back.


34 views0 comments

Recent Posts

See All

Here I will show you a command that will help you to transfer files faster between computers, it's very useful when you need to transfer a large amount of files. You can do it to transfer to others ha

Malicious executables often attempt to hide their behavior and evade detection. By doing so, they present anomalies and suspicious patterns. Pestudio is a free tool that allows you to perform an initi

Do you want to build by yourself a LAN server right on your Windows computer? Here you have some steps to do it works. #1) Go to; #2) Click on DOWNLOAD link; #3) Download and install