JAR hidden inside EXE?

前端 未结 5 1278
谎友^
谎友^ 2020-12-17 18:23

Minecraft, a Java game, is free this weekend. The Windows version downloads as an exe file. I was curious what the EXE file is doing and where it\'s unpacking and running th

5条回答
  •  余生分开走
    2020-12-17 18:35

    The ZIP (and by extension, JAR) file format is flexible in that it allows the archive to be embedded inside another file format. This is what makes self-extracting ZIP archives possible (some small code is embedded in areas that the ZIP file parameters ensure are ignored by unzip utilities). It has also been used for some particularly sneaky exploits as well.

    My guess is that Minecraft similarly exploited the ability to make the archive a valid Windows executable and added code to launch the JVM with itself in the classpath.

    See also: Wikipedia: Combining ZIP with other file formats

提交回复
热议问题