I have a previous post on how to hide files inside an image file in Windows. If you have not read or watched the video yet, it is right here.
Anyway, a comment on that post gave a tip on how to do the same thing on Linux. Of course I tried it and it worked! According to Sebastian of mathemaniac.org, the concept here is really simple. An image file like JPG is read from the beginning of the file and terminated with an ‘End of Image’ marker. An archive file like ZIP has their metadata stored at the end of the file. Put them together and the image will be read as a valid image file and the appended ZIP file will be read as an archive.
Here is how to do it in Linux:
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
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.
20 Comments to “Tip: Hiding Files Inside An Image in Linux”
Subscribe to Email Feeds
- Vim: How to Copy Multiple Lines
- Required Packages for Oracle 11gR2 on Red Hat Enterprise Linux 6
- How Replace Space with Newline in Vim
- 3ix Web Hosting | Best in Webhosting on See Actual Street Pictures with Google Street
- 3ix Web Hosting Complaints – Raw Ask on Cebu Pacific Sucks
- The Best Place to Work: Google and their Office in Zurich | Viral News Worthy on Google Fun Facts
- The Best Place to Work: Google and their Office in Zurich | New Trends Computing on Google Fun Facts
- The Best Place to Work: Google and their Office in Zurich | BlogFactory on Google Fun Facts