0

How can malware be attached in image files such as a JPEG image?

0

3 Answers 3

0

The most common attack method with attaching malware to an image file (or any file for that matter) is to hide an executable file with a different file extension.

For example in your case, a victim might think he is downloading the file wallpaper.jpg when in reality he is downloading the file wallpaper.exe that has been renamed with the JPEG file extension.

Other methods involve the use of Steganography, which involves hiding code inside the image itself, such as javascript of malware or exploits.

-1

The jpeg file may have a double extension, example.jpg.exe. It may also have data embedded in it which a separate piece of malware that looks harmless uses as instructions to perform a malicious action.

4
  • but this is not an image file, it's an executable made to look like an image file in a directory listing
    – schroeder
    Commented Dec 1, 2016 at 7:58
  • That is true but the second part of my answer involves the code being embded into the image. I will try an elaborate on that but if you have more information that would be great.
    – NotADoctor
    Commented Dec 1, 2016 at 10:06
  • but the question was "how" it is attached
    – schroeder
    Commented Dec 1, 2016 at 17:33
  • @schroeder thanks for pointing towards the duplicate article that answers this :)
    – NotADoctor
    Commented Dec 20, 2016 at 17:19
-1

The most simple way would be if a person doesn't have "show files extensions" option checked, then you can name your exe file like "house.jpg" (that is the name, so basically it is house.jpg.exe). You can't use regular dot from the keyboard tho, you need to find special dot in the table of characters. I know that this isn't the answer for your question, but it could help.

1
  • 1
    but this is not an image file, it's an executable made to look like an image file in a directory listing
    – schroeder
    Commented Dec 1, 2016 at 7:58

Not the answer you're looking for? Browse other questions tagged .