Hide a zip file inside an image via Command Prompt

See how through a Command Prompt command you can hide a zip file inside an image, in Windows 10 & 11.

zip file

Steganography comes from the words στεγανος + writing and is the process in which some information that must be sent to a recipient is hidden in a medium. Any file can be defined as a medium in the case of electronic computers.

One method of steganography is to merge a ZIP file containing multiple files with an image. The final file will appear to be nothing more than a standard image file.

How to hide a ZIP in an image file with the command line

zip file 2

The conditions to hide a ZIP file inside an image file are:

  • The image you will use must be in JPG, PNG or GIF format
  • Image and zip file names must contain only Latin characters
  • Image and zip file names must not contain spaces
  • The two original files should be in the same folder

Step 1: Open a Command Prompt window with administrative privileges.

If you don't know how in Windows 10 right click on the taskbar and select “Command Prompt (Admin)”.

In Windows 11, navigate to All apps, find the “Terminal” app, right-click on it, and select “More > Run as administrator”.

A Command Prompt window with administrative privileges will open.

Step 2: First, create a ZIP file containing the files you want to hide. This will be the ZIP file you are going to merge with an image.

Its name must be in Latin characters and without spaces, say for example onoma_arxeiou_ZIP.zip.

Step 3: Find a JPG, PNG or GIF image and put it in the same folder as the zip file. This trick will not work if the ZIP file and the image file to be merged are not in the same folder.

steganography 4

Its name must be in Latin characters and without spaces, say for example onoma_eikonas.jpg

Step 4: Go to the Command Prompt window, there go to the folder where you have the zip and image files and enter the following command:

copy /B onoma_eikonas.jpg+onoma_arxeiou_ZIP.zip neo_onoma_eikonas.jpg

You will need to replace the fake filenames in this command with their actual titles.

steganography

We repeat that the command will not work if your file names contain spaces or have Greek characters. So make sure the ZIP file or image filenames don't have spaces.

Whatever file type your original image is JPG, PNG or GIF the final file can be anything you want. For example, the original can be JPG and the final PNG. It will work just fine.

Step 5: Now check the new image file created in the same folder (neo_onoma_eikonas.jpg).

steganography 1

Double-clicking this file will open it in your default image viewer. It doesn't look like a ZIP file, but if you know how, you'll still be able to access the merged ZIP file through this image.

How to access the file inside the image

To access the file hidden inside this image, download and install it freely available software 7-Zip, (if you don't already have it installed), one of the best tools files for Windows. If you still like it and that will work just fine.

From within the 7-zip program navigate to the folder containing the new image file and double click on this image file.

It will open the ZIP file you have merged with the image. You can then access the entire contents of the ZIP file by double-clicking it inside 7-Zip.

Alternative solution: Image Steganography

Alternatively you could hide a zip file inside an image with the program  Image Steganography

It has a similar process, runs on Windows 11/10 that enables you to embed ZIP files into images without requiring an of commands.

The difference is The hidden file when created with Image Steganography software will not be accessible in 7-Zip. To regain access to the embedded ZIP file, you will need to decrypt the image file it is encoded in with Image Steganography software. So you can only decode it through the same program.

Hide your most important files inside pictures

These alternative steganography methods will allow you to hide ZIP files containing your important files inside images in Windows you.

It is unlikely that anyone would guess that an image file includes an embedded ZIP file. So, this is a good way to hide your most confidential files. Especially on a laptop that can be stolen as it is portable.

Alternatively

Update:

The friend of iGuRu.gr Christos Kolatsos try the above with some changes. Here are the results as posted on our Facebook page

"I tried it on Windows 10. It also works without opening the command prompt with admin rights. It happens even if we define an image file name with Greek characters. It happens even if the file is not in zip format but in rar format.”
 
The steps are as follows:
 
1. We create a folder, not anywhere, but inside the disk C. Bulk inside the disk.
2. In the folder we will put the photo we want to use as a cover and the file we want to hide, after first compressing it in rar format.
3. Suppose our files have the following names:
folder: 111, image: 222, rar: 333, create hidden file: Sun
We open the command line and write:
cd /
cd 111
copy /b 222.jpg + 333.rar Helios.jpg
After that we will see a third file being created inside the folder. It will be the image we named: 111 but it will bear the name: Sun.
 
Double-clicking it will open with the image viewer and display the photo.
 
To see the hidden file we should follow one of the following ways:
 
A: Let's change the extension from jpg to rar.
Then we can double-click to open the new file with WinRar.
B: Right-click to select: Open with... and then WinRar

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.087 registrants.
Steganography,Image,Windows,Command,prompt,Taskbar,Photo

Written by Dimitris

Dimitris hates on Mondays .....

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).