我可以使用本机编译作为Java混淆 [英] Can I use native compilation as Java obfuscation

查看:87
本文介绍了我可以使用本机编译作为Java混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Java应用程序编写插件。我可以对插件进行模糊处理,但它仍然可以很容易地进行逆向工程。

I am writing a plugin for a Java application. I could obfuscate the plugin, but it would still be easily reverse engineered.

我相信如果我可以将这个插件编译成共享库,它大量使用JNI进行通信在主要应用程序中,逆向工程将更加困难。我愿意为JNI牺牲一些性能,而我编写的应用程序确实支持共享库加载。唯一的问题是我不知道有一个工具可以完成这项工作:gcj似乎依赖于它自己的运行时和IKVM.NET - 在.NET上

I believe that if I could compile this plugin to a shared library, which heavily uses JNI to communicate with the main application, it would be much harder to reverse engineer. I am willing to sacrifice some performance to JNI, and the application I am coding against does support shared library loading. The only problem is that I am not aware of a tool which does the job: gcj seems to depend on its own runtime and IKVM.NET - on .NET

要成为精确:


public class PluginImpl implements Plugin {
    @Override
    public void startPlugin(PluginContext ctx) {
       ctx.helloWorld();
    }  
}

应转换为


public class PluginImpl implements Plugin {
    @Override
    public native void startPlugin(PluginContext ctx);
}

并且我的startPlugin方法的主体被编译成共享库。

and the body of my startPlugin method is compiled into a shared library.

(好吧,是的,我知道,我本来可以用C编写这个插件)

(well, yes, I know, I could have written this plugin in C in first place)

推荐答案

如果要以任何形式分发可执行代码,则无法真正使用任何进行代码混淆。任何可执行代码都可以反向工程。这是一个商业问题,而不是技术问题,它通过商业手段解决:许可协议,价格,上市时间,或者很可能是对风险和价值的更现实的评估,即承认你的代码不是'这很有价值。或者将您的产品作为服务而非可执行文件提供。

You can't really use anything for code obfuscation if you are distributing executable code in any form. Any executable code can be reverse engineered. This is a business problem not a technical problem, and it is solved by busniess means: licence agreements, price, time to market, or most probably a more realistic assessment of the risks and values, i.e. admitting to yourself that your code just isn't that valuable. Alternatively deliver your product as a service rather than as an executable.

这篇关于我可以使用本机编译作为Java混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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