混淆是一种方法,但它不能防止破坏应用程序的盗版保护安全性。如何确保应用程序不被篡改,如何确保注册机制不会被逆向工程?
此外,还可以将c#应用程序转换为本机代码,而Xenocode的成本太高。
c#提供了很多特性,是编写代码的理想语言,所以用c++重新编写整个代码库是不可能的。
安全证书可以很容易地从. net中的签名程序集中删除。
混淆是一种方法,但它不能防止破坏应用程序的盗版保护安全性。如何确保应用程序不被篡改,如何确保注册机制不会被逆向工程?
此外,还可以将c#应用程序转换为本机代码,而Xenocode的成本太高。
c#提供了很多特性,是编写代码的理想语言,所以用c++重新编写整个代码库是不可能的。
安全证书可以很容易地从. net中的签名程序集中删除。
当前回答
如果您希望人们能够运行您的代码(如果您不希望,那么为什么要首先编写它?),那么他们的CPU需要能够执行您的代码。为了能够执行代码,CPU需要能够理解它。
由于cpu是愚蠢的,而人类不是,这意味着人类也可以理解代码。
只有一种方法可以确保你的用户不会得到你的代码:不要把你的代码给他们。
这可以通过两种方式实现:软件即服务(SaaS),即在服务器上运行软件,只允许用户远程访问它。例如,这就是Stack Overflow使用的模型。我很确定Stack Overflow不会混淆他们的代码,但是你不能反编译它。
The other way is the appliance model: instead of giving your users your code, you give them a computer containing the code. This is the model that gaming consoles, most mobile phones and TiVo use. Note that this only works if you "own" the entire execution path: you need to build your own CPU, your own computer, write your own operating system and your own CLI implementation. Then, and only then can you protect your code. (But note that even the tiniest mistake will render all of your protections useless. Microsoft, Apple, Sony, the music industry and the movie industry can attest to that.)
或者,您可以什么都不做,这意味着您的代码将自动受到版权法的保护。
其他回答
最好的答案是第一个来自小开发人员自己的经验,上面讨论的所有反反转技术对于任何严肃的反向工程师来说都是101个教科书案例。
一些商业DRM解决方案相当不错,但它们总是在数小时(或数天)内使用自定义DRM解决方案破解每一款AAA级游戏。只有一个全新的DRM解决方案的引入——有时——延迟是不可避免的,可能需要几个星期。
充分利用DRM需要花费大量的时间和金钱,而且很容易损害性能、可靠性、兼容性/可移植性和客户关系。要么坚持一些像样的商业DRM,不要试图太聪明,承担你的(更少的)损失,要么完全忘记它……
一个DRM解决方案的例子,它挖了自己的(商业)坟墓:http://en.wikipedia.org/wiki/StarForce
当涉及到。net时,如果你正在发布Windows窗体应用程序(或任何客户端有可移植可执行文件的应用程序),它就有可能被破解。
如果你想坚持使用。net,并且想把你的源代码被窃取的几率降到最低,那么你可以考虑将它部署为ASP。NET应用程序,而不是使它成为一个Windows窗体应用程序。
如果您希望人们能够运行您的代码(如果您不希望,那么为什么要首先编写它?),那么他们的CPU需要能够执行您的代码。为了能够执行代码,CPU需要能够理解它。
由于cpu是愚蠢的,而人类不是,这意味着人类也可以理解代码。
只有一种方法可以确保你的用户不会得到你的代码:不要把你的代码给他们。
这可以通过两种方式实现:软件即服务(SaaS),即在服务器上运行软件,只允许用户远程访问它。例如,这就是Stack Overflow使用的模型。我很确定Stack Overflow不会混淆他们的代码,但是你不能反编译它。
The other way is the appliance model: instead of giving your users your code, you give them a computer containing the code. This is the model that gaming consoles, most mobile phones and TiVo use. Note that this only works if you "own" the entire execution path: you need to build your own CPU, your own computer, write your own operating system and your own CLI implementation. Then, and only then can you protect your code. (But note that even the tiniest mistake will render all of your protections useless. Microsoft, Apple, Sony, the music industry and the movie industry can attest to that.)
或者,您可以什么都不做,这意味着您的代码将自动受到版权法的保护。
根据微软博客中的以下问题:
https://blogs.msdn.microsoft.com/amb/2011/05/27/how-to-prevent-ildasm-from-disassembling-my-net-code/
如何防止ILDASM分解程序集?
. net有一个名为SuppressIldasmAttribute的属性,它可以防止分解代码。例如,考虑以下代码:
using System;
using System.Text;
using System.Runtime.CompilerServices;
[assembly: SuppressIldasmAttribute()]
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello world...");
}
}
}
如你所见,只有两个不同之处:
我们添加了System.Runtime.CompilerServices命名空间减速。 我们添加了[assembly: SuppressIldasmAttribute()]属性。
在Visual Studio中构建应用程序后,当我们尝试在ILDASM中打开生成的EXE文件时,现在我们得到以下消息:
如果它是用。net编写并编译为CIL,则可以反映出来。如果安全性是一个问题,并且要避免混淆,那么我建议使用非托管语言编写应用程序,这种语言本质上更难以进行逆向工程。