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

空扰寡人 提交于 2019-12-10 19:10:44

问题


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? 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? (Tying them to x86 is acceptable at this point.)

See also this question where I tried this and had no luck.


回答1:


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. Also it isn't available for all processors and platforms (specifically I think it isn't available on Windows). It is easier to try some commercial obfuscators that do just that, while taking away most of the metadata.




回答2:


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). 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.




回答3:


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. Your assembly needs to be there because the metadata in it is still needed.



来源:https://stackoverflow.com/questions/2587118/can-i-use-monos-aot-feature-to-natively-pre-compile-net-dlls-exes-to-make-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!