Java运行时DLL注入
我想知道是否有一种 Java 方法可以在运行时将代码注入到进程中。 关键术语;在爪哇。我找到了很多对此的参考(最有用的是 此网站)。问题是我找到的所有参考资料都不使用Java,因此不适合我目前的情况。
谁能帮助我,也许为我指明正确的方向?
I was wondering if there is a Java method for injecting code into a process during runtime.
The key term; in Java. I have found alot of references to this (the most useful being at this website). The problem is that that all the references I've found do not use Java, and hence are unfavorable for my current situation.
Could anyone help me out, and perhaps point me in the right direction?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 Java Native Interface 将 CreateRemoteThread() API 绑定到 Java。
You can use Java Native Interface to bind CreateRemoteThread() API to Java.
我知道的最接近的是 System.loadLibrary。该方法将以系统相关的方式按名称加载库。
The closest I know of is System.loadLibrary. That method will load a library by name in a system dependent way.
一种方法是使用 Java Native Access 加载您找到的非 Java 库。我实在看不出有什么方法可以在不调用本机代码的情况下完成此操作,因此除非其他 java 开发人员已经创建了 JNI 或 JNA 包装器,否则您可能必须自己完成此操作。
One way would be to load the non java library you found using Java Native Access. I don't really see a way you will be able to do this without calling native code so unless a some other java developer has already created a JNI or JNA wrapper you will probably have to do it yourself.