Hide Your Files Inside an Image in Ubuntu | Simple Steganography In Linux

Steganography is the science of hiding information. Here we will use Steganography to hide different files inside an image file in Ubuntu. This process does work in other Linux-based distros too.
For this purpose we need an image file of JPEG format and your files to hide. In my case, here I’ll use some files to hide and an image file titled image.jpg . I have made a folder in Documents for that purpose. I have named it Test. Now I have one image file named image.jpg and one folder named files_to_hide that contains all the files to hide. Now I have to compress the folder that contains all my files to hide. In that case it’s files_to_hide. I have now files_to_hide.zip.
Now open Terminal and point it to your folder that contains another folder of files to be hide and that very image. In my case I have created the folder Test which contains files_to_hide, it’s zip format files_to_hide.zip and image file image.jpg. Now I execute the command as following:

cd Documents/
cd Test

Now list all your files inside Test folder.


In my case the result looked like this:

files_to_hide  files_to_hide.zip  image.jpg

Now you have to hide files_to_hide.zip inside image.zip and so do as I do:

cat image.jpg files_to_hide.zip > img.jpg

Here, what I have done is simple. cat indicates the program used for this process of concatenation. the two files one zip and one image file. And at last I have merged them in one file named img.jpg. Here you can use any name you want.
Now you’ll see a file img.jpg has been created inside the fiolder Test. Now delete the rests. Because your image file img.jpg now contains all other files inside it.
This img.jpg file can be viewed as the ordinary image file and no one will suspect it being an extraordinary file. Now you can unzip it whenever you want. Just do the following:

unzip img.zip

This will extract the files_to_hide folder. Isn’t it amazing?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s