从 AWT 可执行文件中提取 Java 类 [英] extracting Java classes from AWT executable

查看:18
本文介绍了从 AWT 可执行文件中提取 Java 类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在其中运行 JVM 的应用程序,看起来它正在使用

所以我猜Java类在那里但无法访问,我在应用程序中找到的只是具有上述链接的RC_DATA内容,还发现该应用程序是使用Jexegen转换为EXE的Java应用程序 作为 Jexegen 和一些 SDK 链接可以使用十六进制查看器找到.

我的问题是是否有办法提取 Java 类或从该应用程序中读取它们?可能是通过了解抽象窗口工具包 (AWT) 或 SwingJexegen 的结构,或者 Java 文件在编译后如何包含在 c# 应用程序中.

我希望我能问清楚我的问题,我尽我所能.

解决方案

我的问题是是否有办法提取 Java 类或从该应用程序中读取它们?

正如您已经发现的,.exe 文件包含 RC_DATA 类型的资源.这种类型的条目有两个.较小的(名为1001")仅包含带有类名(可能是主类名)的字符串,较大的(名为1000",大约 600 Kb)包含实际类.您可以借助任何资源提取工具(例如资源黑客")提取该资源.

每个 *.class 文件以 4 个字节开头 0xCA 0xFE 0xBA 0xBE 这样您就可以遍历提取的1000"的内容并将每个类保存到单独的 *.class 文件.每个 0xCA 0xFE 0xBA 0xBE 将标记新文件的开始.而且,显然上一个结束.

然后类就可以反编译了.

<块引用>

也许通过了解 Abstract Windowing ToolKit (AWT) 或 Swing 的结构

AWT 和 Swing 只是构建 UI 的标准库.所以这里没有关系.

I have an application that is running JVM inside it, it looks like it is using Abstract Windowing ToolKit (AWT), I found that after doing some researches as the main application window is a MSAWT_Comp_Class, doing some analyzing on the application EXE I found what looked like links to import the Java classes (I am not sure):

So I guess the Java classes are there but unreachable, all I could find in the app is an RC_DATA content that has the above links, also found that the app is a Java app converted to EXE using Jexegen as Jexegen and some SDK links can be found using a hex viewer.

My question is if is there a way to extract the Java classes or read them from that application? maybe by knowing the structure of Abstract Windowing ToolKit (AWT) or Swing or Jexegen or how Java files are being included in the c# app after compiling.

I hope I could I ask my question clearly, I tried my best with my little knowledge.

解决方案

My question is if is there a way to extract the Java classes or read them from that application?

As you already figured out, .exe file contains resources of type RC_DATA. There are two entries of such type. The smaller one (named "1001") contains just string with a class name (it may be main class name) and bigger one (named "1000", about 600 Kb) contains actual classes. You can extract that resource with help of any resource extracting tool such as a "Resource Hacker".

Each *.class file starts with 4 bytes 0xCA 0xFE 0xBA 0xBE so you can iterate through content of extracted "1000" and save each class into separate *.class file. Each 0xCA 0xFE 0xBA 0xBE will mark new file start. And, obviously end of previous.

Then classes can be decompiled.

maybe by knowing the structure of Abstract Windowing ToolKit (AWT) or Swing

AWT and Swing is a just standard libraries to build UI. So it doesn't matter here.

这篇关于从 AWT 可执行文件中提取 Java 类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆