Pages

Wednesday, September 16, 2009

Hide data in images

     There's a nice feature on windows that allows masking or hiding some files in another file. For example you can append an archive (.zip/.rar/...) to a text file or image file (or any other) using the flag /b with the copy command.  

C:\>copy /?
Copies one or more files to another location.

COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
     [+ source [/A | /B] [+ ...]] [destination [/A | /B]]

  source       Specifies the file or files to be copied.
  /A           Indicates an ASCII text file.
  /B           Indicates a binary file.



As the help shows, copy can be used with multiple sources. The /B flag indicates binary copy. Without that flag it would be just a regular copy. The usage is as follows (suppose we have a picture (pic.jpg) and also a .zip file we want to hide, in the same directory):

   copy /b pig.jpg + hidden.zip pic.jpg
Click to zoom

Then the archive can be deleted. You can see the size of the initial file increased with the size of the archive.  Then you can open src.txt with WinZip or 7zip or other programs, like a normal archive:

Enjoy and be respectful:)


References:

No comments:

Post a Comment