Skip to content

Instantly share code, notes, and snippets.

@cianb96
Last active February 28, 2024 13:34
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cianb96/8089653 to your computer and use it in GitHub Desktop.
Save cianb96/8089653 to your computer and use it in GitHub Desktop.
Hide Files Inside A Photo

Using a simple little command to copy multiple files to one location, this trick basically works by merging a compressed file with an image. In other words, you can save your top-secret files inside an image by saving them both into one file.

The final result is an image file that also contains the secretly stored compressed file, which you can access in 2 ways: opening the file normally will show the image and hide the rest; otherwise, choosing to open the file with an archiver will reveal all the secrets (which only you can know about).

REQUIREMENTS:

Windows Command Prompt (cmd)

ZIP or RAR file archiver (extractor and compressor)

For example, you can use WinZIP or WinRAR (I use this one).

THE CODE

copy /B photo.jpg + myFiles.zip destination.jpg

  • The command 'copy' simply copies the 2 files to 1 location: resulting in merging them together.
  • '/B' just means the files are binary.
  • 'photo.jpg' is the photo we want to use to hide files inside.
  • 'myFiles.zip' is the compressed file we want to keep hidden.
  • 'destination.jpg' is the final file we want to create.

THE STEPS:

Step 1

To hide your files you must first save them in one compressed file such as a Zip or Rar file (*.zip or *.rar) using an archiver. Realize that you will be using that same archiver to open your files later...

Step 2

Put your newly compressed top-secret file and the image in the same folder (preferably on the desktop). Now open Command Prompt and us the change directory command (cd) to find your folder:

cd '%USERPROFILE%\Desktop\New Folder'

[change the names of any files or folders accordingly]

Step 3

Now use the copy command to merge the files.

copy /B rabbit.jpg + secret.zip cool.jpg

[change the names of any files or folders accordingly]

Step 4

You now have a cool file that you can choose to open using 'Open with...' and opening it with your file archiver of choice. However, simply clicking on the file to open it just displays the image and, therefore, keeps your secret files just that: a secret.

Remember that to keep you files a secret you must remove evidence by deleting the actual files that were used to make the final merged one... But beware, you may want to backup your files...

I am not responsible in case of damage caused to sensitive material due to this tutorial...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment