Thursday, October 20, 2011

How to hide files in a picture?


Thinking about keeping your secret files safe. There's a simple technique to do that. We'll use a picture to hide file in it. For this I'm using Windows (Xp or later will work, I haven't tested in earlier one).

1. Compress your file (maybe any) to get *.rar . (Suppose I got abc.rar)

2. Open Command Prompt and then type in the following command and press enter:
 
    copy  /b  123.jpg  +  abc.rar  secret.jpg 

    (123.jpg can be any picture file and secret.jpg is the name for new picture)

if you see

123.jpg
abc.rar
       1 file<s> copied.

then you are done. Now if you double click secret.jpg file then it will open as a picture. To  get your hidden file back, right click on secret.jpg and in open with option select winrar. You can then easily extract it to get you hidden file back.

Now, doing it the Linux way. I am using Ubuntu 11.10 for this purpose and as rar does not come with Ubuntu (you need to manually install it) I'll compress the files as *.zip.
Type in the following commands in terminal.

1. To compress file to zip
 
     zip  abc.zip  abc 

2. Hide the compressed file in a image file

     cat  123.jpg  abc.zip  >  secret.jpg

If you don't see any message then you are done. To get you hidden file back you can either do like in Windows (as mentioned above) or type in following command in your terminal:

    unzip secret.jpg

No comments:

Post a Comment