混淆是一种方法,但它不能防止破坏应用程序的盗版保护安全性。如何确保应用程序不被篡改,如何确保注册机制不会被逆向工程?

此外,还可以将c#应用程序转换为本机代码,而Xenocode的成本太高。

c#提供了很多特性,是编写代码的理想语言,所以用c++重新编写整个代码库是不可能的。

安全证书可以很容易地从. net中的签名程序集中删除。


当前回答

坦率地说,有时我们需要混淆代码(例如,注册许可类等)。在这种情况下,您的项目不是免费的。在我看来,你应该花钱买个好东西。

Dotfuscator隐藏代码,. net Reflector在尝试反编译时显示错误。

其他回答

请记住,99%以上的用户不会有兴趣检查你的可执行文件,看看它是如何工作的。

考虑到很少有人会去尝试,而且大多数混淆器都是可以解决的,它值得你花时间和精力吗?

你最好把时间投入到改进你的产品上,让更多人愿意使用它。

Use online update to block those unlicensed copies. Verify serial number from different modules of your application and do not use a single function call to do the verification (so that crackers cannot bypass the verification easily). Not only check serial number at startup, do the verification while saving data, do it every Friday evening, do it when user is idle ... Verify application file check sum, store your security check sum in different places. Don't go too far on these kind of tricks, make sure your application never crash/get into malfunction while verifying registration code. Build a useful app for users is much more important than make a unbreakable binary for crackers.

如果您希望人们能够运行您的代码(如果您不希望,那么为什么要首先编写它?),那么他们的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.)

或者,您可以什么都不做,这意味着您的代码将自动受到版权法的保护。

你无法阻止别人破解你的软件。

However, you can make them create cracks that will hurt your sales less. Keygenerators that can issue a valid registration code for your software are much worse than simple patches that remove registration incentives from your software. That's because a crack will work for one software version only, and will cease to work with the next software update you release. The keygenerator will continue to work until you change your registration key algorithm and that's something you don't want to do often because it will put off your honest clients.

因此,如果您正在寻找一种方法来对抗非法的密钥生成器,并且您不想使用不对称加密,因为这会生成很长的注册码,您可以看看部分密钥验证。

Partial Key Verification makes sure that each illegal keygenerator works only for one particular release of your software. Basically what you do is to make sure that each release of your software only links with the code for checking SOME digits of the registration code. Which digits exactly is random, so crackers would have to reverse engineer many different versions of your software and combine all this into one keygenerator in order to release a keygenerator that works for all versions of your software.

如果你定期发布新的软件版本,这将导致大量的密钥生成器散布在各种软件盗版档案中,这些文件不再工作。潜在的软件盗版者通常会寻找最新版本的破解或关键元素,所以他们可能会尝试其中的一些,并最终放弃。

我在我的(c++)新共享游戏中使用了部分密钥验证,它非常有效。之前我们遇到了很多无法对抗的关键生成器问题。后来出现了许多漏洞,一些按键生成器只适用于特定版本的游戏,但没有一个按键生成器适用于所有版本。我们定期发布游戏的小更新,让之前存在的所有漏洞都变得无用。

似乎有一个用于部分密钥验证的开源。net框架,尽管我还没有尝试过。

根据我的经验,让你的应用程序或库更难破解会伤害你诚实的客户,而只会稍微延迟那些不诚实的客户。专注于制作一款优秀的,低摩擦的产品,而不是花费大量精力去推迟不可避免的事情。