简体   繁体   English

我可以使用mono的AOT功能本地“预编译”.NET DLL / EXE,使其更难进行逆向工程吗?

[英]Can I use mono's AOT feature to natively “pre-compile” .NET DLLs/EXEs to make them harder to reverse engineer?

Can I use mono's AOT (Ahead of Time compilation) feature to natively "pre-compile" all or part of some of my own .NET DLLs (and or EXEs) to make them harder to reverse engineer? 我可以使用mono的AOT(Ahead of Time编译)功能本地“预编译”我自己的一些.NET DLL(和/或EXE)的全部或部分,以使它们更难以进行逆向工程吗? I'm using Windows (7 / x64 but I have an x86 XP machine as well) and .NET 3.5 (VS 2008) and I'm curious if mono/AOT can be/has been used for this purpose? 我正在使用Windows(7 / x64,但我也有x86 XP机器)和.NET 3.5(VS 2008),我很好奇是否可以/为此目的使用mono / AOT? (Tying them to x86 is acceptable at this point.) (此时将它们绑定到x86是可以接受的。)

See also this question where I tried this and had no luck. 另见这个问题 ,我试过这个问题但没有运气。

The IL code in assemblies can be removed once the code has been precompiled (this is what we do for monotouch, for example, to reduce app download size). 代码预编译后,可以删除程序集中的IL代码(这是我们为单点操作所做的,例如,减少应用程序下载大小)。 There are a few restrictions, but it works. 有一些限制,但它的工作原理。 Whether you should go to such lengths to screw your costumers with obfuscation is another matter, though. 不过,你是否应该花费这么长时间来为你的客户提供混淆,这是另一回事。

Short answer, no. 简短的回答,没有。

AOT'ing an assembly will only generate a shared library so the next time you use that assembly, Mono will not have to JIT-compile the methods that you use, but instead it will load them from the .so. AOT的一个程序集只会生成一个共享库,所以下次你使用该程序集时,Mono不必JIT编译你使用的方法,而是从.so加载它们。 Your assembly needs to be there because the metadata in it is still needed. 您的程序集需要存在,因为仍然需要其中的元数据。

AFAIK, mono's AOT doesn't remove the metadata which means a hacker has lots of information to try to understand the logic in your code. AFAIK,mono的AOT不会删除元数据,这意味着黑客有大量信息试图理解代码中的逻辑。 Also it isn't available for all processors and platforms (specifically I think it isn't available on Windows). 它也不适用于所有处理器和平台(特别是我认为它不适用于Windows)。 It is easier to try some commercial obfuscators that do just that, while taking away most of the metadata. 尝试一些这样做的商业混淆器更容易,同时拿走大部分元数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM