Tuesday, September 25, 2018

Obscurity - Hiding a file behind an image

The ability to hide a file behind another file can be extremely useful when you want to send a file over a network such as a .exe that you know for sure will be rejected. For example, Gmail will reject most .exe files we can hide this file behind an image and send it over Gmail with an instruction for the receiver to open the file. Of course, there are others useful application for this as well. In this tutorial, we will hide a RAR file behind an image using the Windows command prompt.

1. First, add a file you want to hide into a RAR archive and put it on your Desktop. For my example, I just archive a text file.

add to archive

2.  Click Start and search for cmd and press Enter

3. Change your current directory to your Desktop directory by typing in cd Desktop and press Enter

change directory to desktop

4. In the command prompt type in copy /b secretmessage.rar + image.jpg output.jpg

merging the files


copy /b is the command to combine the two files

secretmessage.rar is the RAR archive file I created for this example

image.jpg is the image I want to hide my rar file behind

output.jpg is the result of my combined file that will show only the image when I double click on the file but behind the image is a different file.

To open the RAR simply change the extension of the output file from jpg to RAR. If prompt just click on Yes. Now you should be able to extract the file from the RAR archive as if it is just a normal RAR file.

When you compare the two files you will see that one is larger than the other depending on the size of the file you hid behind the image.

file comparison

0 comments:

Post a Comment