限制 C# 和 Windows 中评估软件的启动或运行时间
在 Windows 7 下使用 C# 有什么好的方法可以限制应用程序的启动次数或使用时间?
据我所知,注册表可以轻松编辑,有程序可以报告任何类型的文件访问,虚拟机可用于将系统时间更改回安装应用程序时的时间,等等。对于我能想到的每一个想法有一个(通常)微不足道的解决办法。
我想避免需要互联网连接。即,我不希望软件每次使用散列等来请求启动许可。
我看到第三方许可系统具有此类功能。如果实施这些方法总是蹩脚,那么他们如何做到不蹩脚呢?
注意:我不想“破解”第三方系统。我已经有了自己的许可证系统,我想改进它。我所寻找的就是通用的、合理的想法。
谢谢,安迪
Are there any good ways to limit the number of times an application can start or limit how long it can be used for under Windows 7 and using C#?
As far as I can see the registry can be easily edited, there are programs to report any kind of file access, virtual machines can be used to change the system time back to when the application was installed, etc. For every idea I can think of there is a (usually) trivial work around.
I want to avoid the need for an internet connection. I.e. I don't want the software to request permission to start each time using hashes, etc.
I see third party license systems that have this kind of functionality. If implementing these approaches is always lame, how do they do it so it isn't lame?
Note: I don't want to "crack" a third party system. I already have my own license system that I want to improve. Generic, plausible ideas are all that I am looking for.
thanks, Andy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这不是你问题的答案,只是值得思考的事情。无论你的保护系统多么复杂,它都会很容易被破解。即使有在线检查,如果有人非常想要它,它也可以并且将会被破解。
也就是说,想要破解您的程序的人不是您的客户,他们从来不是,也永远不会是。如果你让你的保护系统牢不可破(并且没有牢不可破的保护系统),那些人将不会使用你的程序,并且会找到一些他们可以破解的其他程序。
另一方面,您的客户不会尝试破解它,而是会购买原版。问问自己 - 您是否真的愿意为不是您的客户的人浪费时间、精力和金钱,并可能为真正的客户减慢系统速度?
也就是说,我认为你应该制定某种保护系统,但要选择快速、易于实施且最不引人注目的系统。
This is not the answer to your question, just something to think about. No matter how complicated your protection system is, it will be easily cracked. Even with online checking, it can, and will be cracked if someone wants it really bad.
That said, the people who would want to crack your program AREN'T your customers, they never were, and they never will be. If you make your protection system ubreakable (and there are no unbreakable protection system), those people will just not use your program and will find some other which they can crack.
On the other hand, people who are your customers won't try to crack it and will buy the original. Ask yourself - do you really want to waste your time, energy and money for somebody that is not your customer, and probably slow down the system for somebody who actualy is?
That said, I believe you should make some kind of protection system, but go with that which is fast and easy to implement and least obtrusive.
构建一个相对安全但简单的软件许可系统绝非易事。不言而喻,只要有足够的资源和时间,任何系统(除了在安全服务器上托管代码之外)都可能被破坏。你能做的最好的事情就是付出比平均收益更大的努力。
如果您认真保护自己的软件资产,则应该考虑使用经过商业验证的许可技术,而不是自行开发。也就是说,让我们看看您如何考虑以您所描述的方式进行保护。
首先,您应该意识到,在虚拟机时代,您创建的任何文件或注册表项都可以轻松回滚。如果验证过程中没有在线组件,您就无法阻止这种情况。
您可以做的是:
现在您有一种方法可以检查这些值是否一致并限制某人篡改它们的能力。您还应该对这些值进行 SALT 处理,以便它们不能轻易重播。
Building a relatively secure but simple system for software licensing is far from easy. It goes without saying, that any system (other than hosting the code on secure servers) can be broken given enough resources and time. The best you can do is to make the effort necessary to do so greater than the average benefit.
If you are serious about protecting your own software assets, you should consider using a commercially proven licensing technology, rather than rolling your own. That said, let's look at how you could consider protecting in the manner you describe.
First, you should realize that in the age of virtual machines, any file or registry entry you create can be easily rolled back. Without an online component to the verification process you can't prevent this scenario.
What you can do are things like:
Now you have a means to check that these values are consistent and limit the ability for someone to tamper with them. You should also SALT these values so that they can't be easily replayed.
使用注册表,但使用到期日期对条目进行加密。它并非万无一失,但它可以保留 75% 的临时作弊者。
其他一些技巧:
任何安全系统的关键是你不能信任他们控制的任何东西。任何没有互联网检查的系统都无法阻止它们重新加载虚拟机。
Use the registry but encrypt the entry with the expiration date. It is not foolproof but it will keep 75% of the casual cheaters.
A few other tricks:
The key for any secured system is you can not trust anything they control. Any system that does not have a internet check there is no way you can stop them from reloading a VM.
我注意到一些程序的安装程序成为程序其余部分的独立下载客户端的趋势。您可以使用元编程来发送可执行文件来检查一些晦涩难懂的内容,例如(在此处插入晦涩难懂的内容)吗?
I notice a trend of some programs' installers being stand alone download clients for the rest of the program. Could you use meta-programming to send executable that does checks on something obscure like (insert obscure thing here)?