C#:如何让黑客/破解者更难绕过或绕过许可检查?

发布于 2024-10-09 08:29:34 字数 1435 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

满身野味 2024-10-16 08:29:34

软件许可第一定律:一旦您允许软件安装在您无法控制的计算机上,您就无法控制该软件。

如果您想保持对代码的控制,则需要将其设为 Web 服务,并为最终用户提供一个与该 Web 服务交互的瘦客户端。

在许多情况下,这是不可接受的,因为用户希望即使没有互联网连接也能够使用他们的软件。

几乎在所有情况下,您都应该专注于改善用户体验,而所有形式的版权保护反而会使情况变得更糟。一旦你发现从warez网站下载并通过多次病毒扫描运行它的体验比为合法版本进行许可证设置更好,你就输了。

The #1 law of software licensing: You don't control your software once you allow it to be installed on a computer you don't control.

If you want to keep control over your code, you need to make it a web service and give the end user just a thin client that interfaces to that web service.

In many scenarios, this is unacceptable, because users want to be able to use their software even when they don't have an internet connection.

In almost all cases, you should focus on making the user experience better, and all forms of copy protection make it worse instead. Once you get to the point where the experience of downloading from a warez site and running it through several virus scans is better than doing the license setup for the legit version, you've lost.

巴黎夜雨 2024-10-16 08:29:34

您可以混淆代码(使其更难反编译/使用反射器),但只要有足够的精力和知识,它就会被破坏,之后很容易更改程序集的字节码,从而绕过许可证检查。另外,您可以投入资金来签署程序集,这将使更改程序集本身变得更加困难,但只要有足够的精力(不仅仅是打破混淆),这也可以避免。

您的目标不应该是让许可流程牢不可破,而是让您的软件本身值得购买。这是一个更好的保护。破解者(只有他们,黑客是完全不同的东西,请参阅这篇文章 for more)不会因此受到阻碍,但由于该软件物有所值,更多的人会购买它。

You can obfuscate the code (make it harder to decompile/use the reflector on it), but with enough energy and knowledge, it will get broken, after that it's quite easy to change the bytecode of the assembly, thus circumventing the license check. Also, you could invest the money to make it possible for you to sign your assemblies, which would make it harder to change the assembly itself, but with enough energy (more than just breaking the obfuscation) this can also be circumvented.

Your goal shouldn't be to make the license process unbreakable, but to make your software itself worth to buy. This is a much better protection. Crackers (and only them, hackers are something completely different, see this article for more) won't be hindered by that, but with the software being worth it, much more people would buy it.

感情洁癖 2024-10-16 08:29:34

我认为应该在源代码中的几个不同位置进行检查;捕获所有这些比只捕获一个要困难得多。另外,如果想要保护用 C#(或任何其他 .NET 语言)编写的程序,应该考虑使用一些 混淆器。在对应的情况下,破解者甚至拉默将能够使用一些软件来破解程序,例如 .NET反射器

I think that check should be done in several different places in the source code; it is much harder to catch all of them than only one. Also, if wants to protect program written in C# (or any other .NET language), one should consider to use some obfuscator. In counterpart a cracker or even lamer will be able to crack a program using some software like .NET Reflector

抚你发端 2024-10-16 08:29:34

如前所述,可以简单地使用 .NET Reflector 来获取软件的整个源代码(事实上,甚至可以用 VB.NET 或其他语言获取它,即使你是用 C# 编写的!)。如果您希望有机会减缓黑客的进程,您必须混淆您的程序集。

如何阻止人们直接复制许可证?如果您有已签署的许可证,那么它只会在两个地方签署 - 您采取了什么措施来阻止这种情况?不要介意全局变量是否会进一步削弱您的保护,而不考虑微不足道的“裂缝”。

正如本·沃伊特(Ben Voigt)指出的那样,对此确实没有好的答案。如果您需要一些不可复制的东西,请将其设为闭源 Web 应用程序。阿斯塔拉维斯塔会告诉你大多数东西都已经被破解了。花费数千美元的Adobe产品已经被破解,我相信他们的员工非常精通复制保护技术。

As mentioned previously, one can simply use .NET reflector to get the entire source code of your software (in fact, it can even get it in VB.NET or other languages even if you're written it in C#!). You must obfuscate your assembly if you hope to have even a chance at slowing a cracker's progress.

What is to stop people from directly copying licenses? If you have a license which is signed, it will then just be signed in two places -- what have you put in place to stop this? Never mind whether a global variable would further weaken your protection without taking into account trivial "cracks."

There really is no good answer to this as Ben Voigt pointed out. If you need something that is uncopyable, make it a closed-source web application. Astalavista will show you that most things have been cracked. Adobe products which cost thousands of dollars have been cracked and I'm sure their employees are quite well versed in copy protection techniques.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文