Hidden in foliage

    Good time of the day. In this article, I will reinvent the wheel on the topic of steganography.

    Goals that are set

    There is a jpg image ( avatar.jpeg ) and an encrypted rar archive ( readme.rar ) with a password of 12345 which contains the readme.txt file . It is required to glue avatar.jpeg + readme.rar so that the output is a file that will be called avatar-join.jpg and open by default as a picture. When you forcefully open this file in winrar, you will be prompted to enter a password and access the readme.txt file , which will store the information we have hidden.


    What we need for this, for the experiments I chose WinHex, took my profile picture and created an encrypted archive with the password 12345 in which I placed the readme.txt file with certain text.

    We open our files ( avatar.jpeg and readme.rar ) in WinHex in different tabs, this is what should happen (the screenshots are not complete, but the essence is clear):

    This is how the avatar.jpeg file opened in the HEX editor looks like


    This is readme.rar


    1 file, respectively . Go to the tab with the open file readme.rar , press ctrl + a ( select all the code), copy the selected code to the clipboard (ctrl + c)
    2. Go to the tab with the fileavatar.jpeg , press ctrl + end (go to the end of the file avatar.jpeg , the cursor stops at D9)
    3. Press ctrl + v (paste the previously copied code from the first paragraph from the clipboard)
    4. In the avatar.jpeg tab press ctrl + s (save the resulting file with the jpg extension to the hard drive)

    From all of the above it becomes clear what we did, we copied all the bytes from readme.rar and pasted it into avatar.jpeg (such a Hex copy-paste).

    What happened after gluing:


    As a result, we got a container-picture, which by default will open as a picture, and in cases of forced opening of this container in Winrar, we will be asked to enter a password, in case of success, we can read the encrypted readme.txt file placed in the archive.

    We can install such an avatar picture on various forums and Internet resources and no one will suspect that this image carries in itself. It will work if the Internet resource does not convert the downloaded image and avatars on the server side. And you can just upload this avatar to your server and in the future just insert url'om.

    What to store and what to hide in the above-described way is up to you to decide, I just mentioned obvious things.

    How to do the same using the command line

    Everything is much simpler here, we won’t need WinHex, the only thing we need is a pre-created encrypted archive with our information and a picture / avatar / wallpaper, again of your choice + command line.

    Windows version

    copy /B avatar.jpeg + /B readme.rar avatar-join.jpg

    Standard copy function, the / B switch indicates that the file is binary.

    Linux version

    Unlike windows, in linux we will use the cat command, the whole file integration process looks like this:

    cat avatar.jpeg readme.rar >> avatar-join.jpg

    Finished product


    And this is actually a finished product, it looks like an ordinary avatar that does not portend anything. But if you save it to your computer and open it in winrar, enter the password 12345, you will see a hidden readme.txt file with a hidden message.

    Everyone knows the above things, but most of us prefer to use ready-made products that do the same with a few clicks of the mouse. Everything new is well forgotten old. Good luck!

    Also popular now: