Hiding Files Inside An Image in Linux

Here is how to do it in Linux:</p>

Get an image file and an archive of the files that you want to hide. In this example, I have cat beer_and_cig.jpg and hideme.zip file. The zip file contains an MP3 song that I have stored inside the archive. To create the archive-image file, run this command:

cat beer_and_cig.jpg hideme.zip > ucantseeme.jpg

What this does is the 'cat' command reads the image file first, then reads the zip file and puts them together in the file named ucantseeme.jpg.

To test the integrity of the image file, try this:

# unzip -t ucantseeme.jpg
Archive: ucantseeme.jpg
warning [ucantseeme.jpg]: 4751 extra bytes at beginning or within zipfile
(attempting to process anyway)
testing: Feist - 09 - One Two Three Four.mp3 OK
No errors detected in compressed data of ucantseeme.jpg.

Notice the warning message? The test saw that there were few bytes at the beginning, which means it saw the image file first but the archive is intact and no errors were found.

Perfect!

comments powered by Disqus