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

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

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

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


当前回答

只是补充一个警告:如果你打算使用混淆,检查一切仍然工作!混淆可能会改变类名和方法名。因此,如果你使用反射来调用某些方法和/或类(就像在插件架构中),你的应用程序在混淆后可能会失败。另外,堆栈跟踪对于跟踪错误可能是无用的。

其他回答

如果微软能想出一个解决方案,我们就不会有盗版的Windows版本,所以没有什么是非常安全的。下面是来自Stack Overflow的一些类似问题,您可以实现自己的保护方式。如果你正在发布不同的版本,那么你可以针对不同的版本采用不同的技术,这样当第一个版本被破解时,第二个版本就可以接管。

基于许可证管理c++应用程序的特性 使用license文件保护DLL文件 授权/保护软件?

最好的答案是第一个来自小开发人员自己的经验,上面讨论的所有反反转技术对于任何严肃的反向工程师来说都是101个教科书案例。

一些商业DRM解决方案相当不错,但它们总是在数小时(或数天)内使用自定义DRM解决方案破解每一款AAA级游戏。只有一个全新的DRM解决方案的引入——有时——延迟是不可避免的,可能需要几个星期。

充分利用DRM需要花费大量的时间和金钱,而且很容易损害性能、可靠性、兼容性/可移植性和客户关系。要么坚持一些像样的商业DRM,不要试图太聪明,承担你的(更少的)损失,要么完全忘记它……

一个DRM解决方案的例子,它挖了自己的(商业)坟墓:http://en.wikipedia.org/wiki/StarForce

广义上讲,有三种人。

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回答中建议的技术来增加难度)。

是的,. net二进制文件(EXE和DLL)可以很容易地反编译成接近源代码。检查. net Reflector工具。在任何。net二进制文件上尝试一下。最好的选择是混淆文件,它们仍然可以被。net Reflector反编译,但它们会造成一团不可读的混乱。我不认为好的混淆器是免费或廉价的。一个是Visual Studio附带的Dotfuscator社区版。

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

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