从.NET应用程序中删除元数据?
这可能吗? .NET框架是否依赖字节码中的元数据?我想要一个我编写的应用程序无法在反射器或者类似的.NET反编译器中运行。
解决方案
回答
我认为我们无法删除元数据,但是如果我们想保护自己的IP,则可以混淆代码。
回答
Dotfuscator将阻止代码被反编译
http://www.preemptive.com/dotfuscator.html
编辑:我应该提到的是专业版,Visual Studio附带的免费社区版
回答
我认为我们指的是大会清单:
Every assembly, whether static or dynamic, contains a collection of data that describes how the elements in the assembly relate to each other. The assembly manifest contains this assembly metadata. An assembly manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes.
.Net程序集最重要的功能之一是它们是自描述的组件,这是由清单提供的。因此,删除它们将以某种方式破坏其目的。
回答
如果删除元数据,则该框架将无法加载代码,或者无法找出其引用的其他程序集或者类似的内容,所以不,这不是一个好主意。
混淆器会使"攻击者"更难以反编译代码,但是最终,如果有人有积极性和智慧,我们就无能为力了。
.NET将始终编译为MSIL,并且MSIL本质上比原始x86更易于阅读。这只是我们使用.NET时要做出的权衡之一。
不用担心apache,linux和其他所有东西的源代码都可以在网上免费获得,但是它没有为Microsoft提供太多竞争优势:-)
回答
看起来与以下问题相同:
如何将.net程序集的清单设为私有?
在这里查看我的答案:
如何将.net程序集的清单设为私有?
"我认为我们在说的是"混淆"。网上有很多关于它的文章:
http://en.wikipedia.org/wiki/迷惑
.NET上进行混淆的"标准"工具是抢先式解决方案:
http://www.preemptive.com/obfuscator.html
它们具有Visual Studio附带的社区版本,可以使用。
我们提到了ILDasm,我们是否看过.NET Reflector?
http://aisto.com/roeder/dotnet/
它为我们提供了一个更好的主意,让我们知道发布清单后人们会看到什么!"
回答
诸如VMware的ThinApp(以前称为Thinstall)之类的解决方案对保护代码也不会有所帮助吗?
不过它的价格很高。