Hiding your personal data from others have always been a difficult job. Some people used to hide files by creating a hidden folder inside multi-level folders. Some others will do that by placing the files in between system files or any other better techniques they know. In this article, I’m going to share you a simple technique by which you can hide your data in a image. Most of the people on reading the topic/on seeing the featured image might think that I gonna share a Steganography/Cryptography technique. We gonna accomplish this by using the distinguishing feature of image and archive readers . Before explaining the technique, lemme start with how to do that
- Select an image in which you want to hide the files. Say “myblog_image.jpg” .(It’s need not to be jpg file, it can even be of other formats like png,gif )
- Compress the files(like videos, .exe, images, documents ) you want to hide, either to .zip/.7z/.tar.gz format. Say”myblog_compress.zip” ( It’s mandatory to compress the files to anyone of those formats. Reasons later )
- Place both the files in a same folder. (It’s not mandatory.. You can have it in different folder also)
- Go to Run(WinKey + R or Start->Run) and enter “cmd” or just use any easy way you know to open command prompt
- Navigate to the directory where you have the image and compressed file.
- Enter the following command.
copy /B <image_file_source>+<archive_file_source> <new_file_name>
Make sure you give it in a same order i.e. image source first and archive file source next (Reason later). In our case it’s,
copy /B myblog_image.jpg+myblog_compress.zip myblog_hidden_image.jpg
If you want to mention the file from different folder, give either relative or absolute path in double quotes.
copy /B “E:\Works\Blog\Hide Personal Files\myblog_image.jpg” + “E:\Works\Blog\HidePersonalFiles\myblog_compress_image.jpg” myblog_hidden_image.jpg
- Open the files in image viewer, you’ll view the image file and when you open it in archive readers like WinRAR, you can see the archived files
- Open the Dash (Super Key) or Applications and enter terminal or click Ctrl + Alt + T to open Terminal (or any method you know to open terminal )
- Navigate to the folder you have the image file and compressed file.
- Enter the following command
cat [compressed_file_source] >> [image_file_source]
In our case,
cat myblog_compress.zip >> myblog_hidden_image.jpg
Unlike Windows, it won’t create a new image file. It’ll hide the zip in the same file itself.
If you open the image, it’ll display the image and there would be no trace for zip file in the image.
And if you change the extension to .zip and open in the archive manager it’ll open the files you archived
Moving to technical details, lemme give some brief sketch of info you need to know before explaining in detail.
(i) Each file is stored in a binary format.
(ii) Image formats like JPEG, PNG, GIF will store the size of the image, format and other details in the header whereas Archive formats like .zip, .rar store their data both in header and footer. And hence, image viewers reader reads the data from the header to EOF whereas Archive readers will read the data from rear side i.e. from footer to header.
Anyone who is good at windows commands/ linux commands would find that the above commands just combines the binaries of the image and archive file. i.e., Archive file binaries would be appended (not mixed) to the image binary file. The new file will look like,
So, while opening the file in image viewer, it’ll read from the image header and reads exactly the same number of bytes mentioned in the header and ignores the archive file. Similarly, when opening the file in archive viewer, it’ll reader the data from the archive footer and ignores the image file. Now you may come to know why i asked you to give the command in the order of image and archive The reason we are choosing archive files for appending is not only we can hide many files but mainly because of it’s viewers property of reading from rear side.
The only way the other people can find that you hide the data inside an image is by its size only i.e. if you have an image of size 500 MB, anyone with common sense will surely find it ? Otherwise you can’t find that, image has the binary of archive file too. If you want to add extra layer of security, make the password protected archive files In case of any doubts/clarifications, leave your comments below
PS: If you append two or more archive files to a image, you can access the last archived file only