简体   繁体   English

编译到.Net中的本机代码是否完全删除了MSIL?

[英]Does compiling to native code in .Net remove the MSIL completely?

I'm wondering if, in the context of disassembling .Net code (Redgate .Net reflector, etc), is it more secure to compile your code to native, using Ngen? 我想知道,在反汇编.Net代码(Redgate .Net反射器等)的背景下,使用Ngen将代码编译为本机是否更安全? That is, does that mean someone would now need IDA and ASM skills to disassemble (and make sense) of your code vs the relatively trivial de-compiling of MSIL? 也就是说,这是否意味着某人现在需要IDA和ASM技能来反汇编(并且有意义)你的代码与相对简单的MSIL反编译?

Yes, I'm aware that MS provides a obfuscater for exactly this purpose, but I'm curious if compiling to native is a better solution, with some tradeoffs(no JIT). 是的,我知道MS正是为了这个目的提供了一个混淆器,但我很好奇,如果编译为native是一个更好的解决方案,有一些权衡(没有JIT)。

Thanks. 谢谢。

ngen doesn't remove the MSIL (or rather, the native binary produced by ngen is unusable without also having the MSIL file). ngen不会删除MSIL(或者更确切地说, ngen生成的本机二进制文件在没有MSIL文件的情况下也无法使用)。 MSIL is still used by the verifier to determine whether to load assemblies in partial-trust scenarios, and for reflection. 验证程序仍使用MSIL来确定是在部分信任方案中加载程序集还是在反射中加载程序集。

There's a lot of good information here . 有很多很好的信息在这里

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

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