Say you have a data file (12KbTextToHide.txt) and an image file (SypSecLogo.jpg), but you don’t want just anyone to know the data is there, for whatever reasons:
NOTE: Disregard the “…because
of the ADS” note in the text file, for now. This will make sense in part 3 of this series..
Right-click the txt file (or other data) that you want to hide, and select “Add to ‘<name of file>.7z’”:
Now you have three files in the directory:
Then use the standard Windows copy command, with the binary (/B) switch, to combine the archive and the image:
C:\hideme>copy /B SypSecLogo.jpg + 12KbTextToHide.7z LogoWithHiddenArchive.jpg
SypSecLogo.jpg
12KbTextToHide.7z
1 file(s) copied.
C:\hideme>
Now you have 4 files in the directory (and the .7z file is buried within the LogoWithHiddenArchive.jpg file):
NOTE: The two image files show that they are the same size in this example, but this will not always be the case. If you open the LogoWithHiddenArchive.jpg file, you will see that it looks the same as the original one.
But the file sizes are not actually exactly 22KB each:
12/18/2011 06:26 PM 22,046 LogoWithHiddenArchive.jpg
12/18/2011 06:20 PM 21,697 SypSecLogo.jpg
Now you can open the image file, using 7zip as follows (Right-click on the jpg with hidden archive):
And 7zip will open the file and show the contents of the hidden archive as follows:
This process also works with
WinRAR:
Create archive using WinRAR:
Copy image and archive into image:
C:\hideme>copy /B SypSecLogo.jpg + 12KbTextToHide.rar LogoWithHiddenArchive.jpg
SypSecLogo.jpg
Overwrite LogoWithHiddenArchive.jpg? (Yes/No/All): Yes
12KbTextToHide.rar
1 file(s) copied.
C:\hideme>
Open image with WinRAR:
As you've seen in this short walk-through, it is very easy to hide data in other data with this process, but in the examples shown here, the files are just glued together as two parts of a binary. Most firewalls and antivirus software (not that I am suggesting ways to conceal a virus...) would be able to identify the internal archive "hidden" within the image file. In part 2, I’ll show you how to use Steganography to embed txt into an image file, bit by bit, and encrypted if you choose