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

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

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

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


当前回答

不幸的是,你逃不掉的。最好的办法是用C语言编写代码,然后P/调用它。

这里有一个小小的catch-22,有人可能只是将您的应用程序反编译到CIL并杀死任何验证/激活代码(例如,对C库的调用)。请记住,用C语言编写的应用程序也会被更顽固的黑客逆向工程(看看现在的游戏被破解的速度就知道了)。没有什么可以保护您的应用程序。

最后,它的工作原理很像你的家,保护得足够好,这样就花费了太多的精力(意大利面条代码在这里会有所帮助),这样攻击者就会转移到你的隔壁邻居(竞争:))。看看Windows Vista,肯定有10种不同的破解方法。

有包在那里,将加密你的EXE文件,并在用户被允许使用它时解密它,但再一次,这是使用一个通用的解决方案,毫无疑问已被破解。

激活和注册机制针对的是“普通人”:那些没有足够的技术知识来绕过它(或者就此而言,他们知道他们可以绕过它)的人。不要为饼干费心了,他们有太多的时间。

其他回答

好吧,你不能完全保护你的产品不被破解,但你可以最大化/增强安全级别,让它有点难以被新手和中级破解者破解。

但请记住,没有什么是不可破解的,只有服务器端的软件受到了很好的保护,无法被破解。无论如何,为了增强应用程序中的安全级别,您可以执行一些简单的步骤来防止某些黑客“不是全部”破解您的应用程序。下面这些步骤会让你抓狂甚至绝望:

Obfuscate your source code, obviously this will make your source code look like a mess and unreadable. Trigger several random checking routines inside your application like every two hours, 24 hours, one day, week, etc. or maybe after every action the user take. Save your released application's MD5 checksum on your server and implement a routine that can check the current file MD5 checksum with the real one on you server side and make it randomly triggered. If the MD5 checksum has been changed that means this copy has been pirated. Now you can just block it or release an update to block it, etc. Try to make a routine that can check if some of your codes (functions, classes, or specific routines) are actually have been modified or altered or even removed. I call it (code integrity check). Use free unknown packers to pack your application. Or, if you have the money, go for commercial solutions such as Thamida or .NET Reactor. Those applications get updated regularly and once a cracker unpack your application, you can just get a new update from those companies and once you get the new update, you just pack your program and release a new update. Release updates regularly and force your customer to download the latest update. Finally make your application very cheap. Don't make it too expensive. Believe me, you will get more happy customers and crackers will just leave your application, because it isn't worth their time to crack a very cheap application.

这些只是防止新手和中级破解者破解应用程序的简单方法。如果您有更多保护应用程序的想法,请不要羞于实现它们。这只会让破解者的生活变得艰难,他们会感到沮丧,最终他们会离开你的应用程序,因为它不值得他们花费时间。

最后,你还需要考虑花时间编写一个好的、高质量的应用程序。不要把时间浪费在编写复杂的安全层上。如果一个优秀的破解者想要破解你的应用程序,无论你做什么,他/她都会做。

现在去实现一些玩具饼干…

广义上讲,有三种人。

Those who will not buy your software and resort to cracks, or if they don't find any, not use your software at all. Don't expect to make any money from this group. They rely either on their own skills or on crackers (who tend to prioritize their time depending on your useful and how big your audience is. The more useful, the sooner a crack will be available). The group of legitimate users who will buy (pay for) your software, irrespective of what protection mechanism you use. Don't make life hard for your legitimate users by using an elaborate protection mechanism since they are going to pay for it in any case. A complex protection mechanism can easily spoil the user experience and you don't want this happening to this group. Personally, I'd vote against any hardware solution, which adds to the cost of your software. A minority who will resort to "unethical" cracking and will only pay for your software because its features are protected by a licensing mechanism. You probably don't want to make it exceedingly easy for this group to circumvent your protection. However, all that effort you spend on protecting your software will pay back, depending on how big this group of people is. This entirely depends on the type of software you're building.

根据您所说的,如果您认为有足够多的少数人可以被推动购买您的软件,那么请继续执行某种形式的保护。考虑一下你能从这些少数人身上赚到多少钱,与你花在保护上的时间相比,或者你花在第三方保护API/工具上的钱。

如果您想实现自己的解决方案,那么使用公钥加密是防止容易被黑客攻击的好方法(与对称算法相反)。例如,您可以对您的许可证(序列号或许可证文件)进行数字签名。解决这个问题的唯一方法就是反编译、修改和重新编译代码(你可以使用Simucal回答中建议的技术来增加难度)。

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

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框架,尽管我还没有尝试过。

还有Salamander,这是一个来自Remotesoft的原生。net编译器和链接器,可以在没有。net框架的情况下部署应用程序。我不知道它是否符合它所宣称的。

net反应堆

更新

Jared指出de4dot声称能够反编译它。

.NET Reactor provides complete protection for your sensitive intellectual property by converting your .NET assemblies into unmanaged processes which cannot be understood as CIL, and which no existing tool can decompile. Hackers have no access to any intelligible form of your source. Powerful and flexible, the .NET Reactor licensing features allow you to enforce your license conditions and protect your revenue stream by using hardware and software locks. The license manager can build trial or permanent licenses, in a matter of seconds. A fully documented software development kit (SDK), complete with examples, allows you to call the licensing system directly from your code, allowing you to create custom extensions to the licensing system.