How to Run a JPG as an EXE
Image files that have the extension ".jpg" are made up of small bits of code that define the image you see. It's possible to embed application code within the image file so that the JPG file runs as an ".exe" file. Performing a security audit on your network using this tactic can be an effective way to test how savvy your network's users are about opening suspicious files or using a virus scanner.
-
Creating a Container for the Files
-
Before you begin, you need to create a new folder on your desktop to contain the files forl modifying. You can do this by right-clicking your desktop and selecting "Create New Folder." Give the folder a name, such as "Vacation" or "Images." Creating a container also gives you a clean isolated environment for you to make your file modifications.
Disguising the EXE
-
To execute a JPG file as an EXE, you need to first have a written and working EXE file. After you've obtained the file that you want to use, place it into the newly-created folder. Create a shortcut to that EXE file by right-clicking the file and then creating a shortcut to that file within the same folder. The shortcut file is then right-clicked and renamed by selecting "Rename," then give it the name of a typical image file, such as "pic01.jpg" or "DSC_0133.JPG" -- and give it the JPG file extension.
-
Setting the Shortcut's Target
-
The definition used in a file shortcut's target is what tells the shortcut where to go when clicked. To set the JPG shortcut's target so that it can run as an EXE, you need to right-click the file and select "Properties." The target can then be changed to "C:\WINDOWS\system32\cmd.exe /c EXAMPLE.jpg," replacing the "EXAMPLE.jpg" with the actual JPG file name that is being used.
Concluding Steps
-
To finalize the disguise, the icon should be changed to the Windows default image icon. This is done by selecting the "Change Icon..." button that is also in the Properties menu. Save the target and icon changes by pressing the "OK" button on both windows. Rename the original EXE file to an image name that resembles, but is not the same as, the shortcut that you created and modified. After these steps have been completed, the shortcut file will run the EXE file when it is selected.
-