如何防止java webstart应用程序被盗版
我有一个 java swing 应用程序,打算通过互联网销售。 目前我倾向于使用 java webstart 来部署应用程序。 该产品将授权用户一次只能在一台计算机上使用该程序。 我担心这个模型的盗版问题。 我想安装一些安全功能来强制执行许可证模型。 目标是至少使许可用户难以将已安装的产品(包括许可证密钥)复制给未许可的用户。 以下是我现在正在考虑的选项:
每次启动程序时,强制用户使用用户名/密码向母船进行身份验证。
注册并付款后,只需在用户 PC 上的某个位置(隐藏?)安装许可证密钥即可。 在运行时,验证是否安装了有效的许可证密钥。
使用/构建基于用户计算机硬件指纹的安全包。 每次启动应用程序时都会计算此指纹,并使用某种哈希与本地安装的许可证密钥进行比较。 该许可证密钥仅对该硬件指纹有效。
这里的问题之一是,一旦安装了该应用程序,除了使用 java webstart 检查应用程序更新之外,该应用程序不需要任何运行时来联系母船。 应用程序执行的所有操作都在本地执行,并使用 swing 将结果显示给用户。 因此,任何涉及母船的解决方案基本上都意味着构建服务器基础设施,其唯一目的是许可证验证。
我想我正在寻找的是基于 java 的东西,它至少在某种程度上安全、易于部署并且不会给用户带来痛苦。 您使用过什么安全/许可方法?
编辑:我应该补充一点,我不一定在寻找灵丹妙药来防止每个人都破坏安全性。 总会有人有足够的时间来找到完成任务的方法。 我不太关心这些人。 我基本上希望让临时用户很难简单地复制许可证密钥并将其发送给他的好友。 如果实施得当,该解决方案应该让普通用户相信购买它更简单。
I have this java swing application that I intend to sell over the internet. At the moment I'm leaning towards deploying the application using java webstart. The product will be licensed for the user to use the program on one computer at a time only. I am concerned about piracy with this model. I would like to install some security features to enforce the license model. The goal is to at least make it difficult for a licensed user to copy the installed product including license key to unlicensed users. Here are the options I am looking at now:
Force the user to authenticate to the mother ship with a username/password each time the program is launched.
Simply install a license key somewhere (hidden?) on the users PC after they have registered and paid. At runtime, verify that there is a valid license key installed.
Use/build a security package that is based on a hardware fingerprint of the users computer. This fingerprint would be computed each time the app is started and compared with the locally installed license key using some sort of hash. This license key would be would only be valid with this hardware fingerprint.
One of the issues here is that once this application is installed, there isn't any runtime need for the application to contact the mother ship, other than checking for application updates using java webstart. Everything the app does it does locally and displays the results to the user using swing. So any solution involving a mother ship would basically mean building a server infrastructure for the sole purpose of license verification.
I guess what I'm looking for is something java based that is at least somewhat secure, easy to deploy and is not a pain for the user. What security/licensing approach have you used?
EDIT: I should add that I am not necessarily looking for a silver bullet to prevent absolutely everyone from defeating security. There will always be someone with enough time on their hands to find ways to get it done. I'm not so concerned with these guys. I'm basically looking to make it difficult for a casual user to simply copy the license key and send to his buddies. Implemented correctly, the solution should convince the casual user that it is simpler to just buy it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
我想说(2)是你最好的选择。 您已经说服自己放弃了(1),并且如果用户购买了新主板,(3)会导致问题。 (2) 对于精通计算机的用户来说不会有太多保护,但它也不应该引起太多问题。
但最终,您无法阻止坚定的用户盗版您的软件。
-- 杰夫·阿特伍德
I'd say (2) is your best bet. You've already talked yourself out of (1), and (3) would cause problems if the user, say, bought a new motherboard. (2) won't be much protection against a reasonably computer-savvy user, but it shouldn't cause too many problems either.
But in the end, nothing you can do will stop a determined user from pirating your software.
-- Jeff Atwood
IMO,尝试在客户端强制执行复制保护可能会带来更多麻烦而不是其价值。 你会花费无数的时间试图智胜你的客户(你可以花很多时间来改进你的产品),但最终盗版者总是会获胜。
不过,您还有其他选择:
IMO, trying to enforce copy protection on the client side is probably more trouble than it's worth. You will spend countless of hours trying to outsmart your customers (hours that you could instead spend improving your product), but in the end the pirates will always win.
You have other options, though:
老实说,除非程序实际上需要来自服务器的数据才能运行(正如 fred-o 所说,《魔兽世界》需要;并且确实如此),那么您在客户端就没有什么可以做的,这将完全是傻瓜证明。 您的所有 3 个想法都可以轻松规避。 服务器/登录可能有点难,但我什至看到了一些裂缝,甚至在本地创建了一个虚拟登录服务器,因此程序认为它正在经过身份验证。
防止盗版的唯一真正方法是拥有程序需要运行的一些服务器端逻辑。 例如 - 您正在制作调整图像大小的软件(我知道,我知道)。 如果原始图像被发送到您的服务器并在那里调整大小,然后发送回客户端(而不是客户端进行调整大小),那么您将是安全的,因为您的服务器可以轻松地通过某种登录系统受到保护。 如果没有有效的用户名或密码(或者如果他们试图生成假用户名或密码),该程序将毫无用处。
如果您实现客户端功能,无论您做什么,都可以实现它。
Honestly, unless the program actually needs data from the server to function (as fred-o stated that World of Warcraft needs; and is true), then there is nothing you can do client side that will be completely fool proof. All 3 ideas you had could be circumvented easily. The server/login one might be a bit harder, but I've even seen cracks go so far as to locally create a dummy login server so the program thinks it's being authenticated.
The only true way to prevent piracy is to have some server-side logic that the program NEEDS to run. For example - you're making software that resizes images (i know, i know). If the raw image was shipped off to your server and resized there and then sent back to the client (as opposed to the client doing the resizing), then you would be safe because your server can easily be protected with a login system of some sort. And without a valid username or password (or if they tried to generate a fake one), the program would be useless.
If you implement client side functionality, it can be reached, no matter what you do.
我最好的选择是,实施一个简单的解决方案,不会给您带来太多负担,也不会引起客户的愤怒,从而阻止偶尔的盗版行为。 任何更复杂的事情都会成为一场军备竞赛。 一场太难获胜的比赛。
My best bet, implement an easy solution that doesn't tax you too much, and that doesn't make the customers irate, to discourage the occasional piracy. Anything more complicated and it will be an arms-race. One that is too difficult to win.
您的三个解决方案中:
第一个需要网络连接才能执行任何操作。 如果用户不能离线使用它,他们将不会高兴。 谷歌的办公软件必须解决这个问题。
第二个是没有太多的复制保护,除非该位置是隐藏的,而隐藏的位置有其自身的困难(例如,有些人不喜欢安装喜欢将东西隐藏在不同位置的应用程序),而且无论如何也不安全。
第三种方法可能会起作用,直到用户对计算机进行了更改指纹的操作(我不知道您要检查什么),或者想要将应用程序从一台计算机移至另一台计算机。 那么你就会有一个潜在的愤怒用户。 (“我更换了硬盘/移动到不同的 LAN 连接/出现系统故障/无论如何,[脏话删除] 的东西就停止工作了!”)
因此,虽然第 2 点不太可能导致用户问题,但它对于大部分复制保护方案不起作用。 数字 1 和 3 会让你的用户不满意,会给你带来一定的麻烦,而且无论如何也不会阻止有决心的人复制它。
Of your three solutions:
The first requires a net connection to do anything. Users are not going to be happy if they can't use it offline. Google had to deal with that for its office software.
The second isn't much copy protection, unless the location is hidden, and a hidden location has its own difficulties (some people, for example, dislike installing apps that like to hide things in various locations), and isn't secure anyway.
The third will likely work until a user does something to a computer that changes the fingerprint (I don't know what you'd be checking), or wants to move the app from one computer to a replacement. Then you'll have a potentially irate user. ("I replaced the hard drive/moved to a different LAN connection/had a system failure/whatever, and the [expletive deleted] thing just stopped working!")
So, while number 2 won't likely cause a user problems, it won't work for much of a copy protection scheme. Numbers 1 and 3 are going to get you unhappy users, will be a certain amount of trouble for you, and won't stop determined people from copying it anyway.
我会认真重新考虑许可要求,因为强制执行这些要求会让您失去合法客户。 如果你是一家大公司,你可以负担得起,但如果你是一家初创公司或个人,你就负担不起。
一种解决方法是提供个人许可证——适用于个人使用的所有机器。 无论好坏,这就是人们认为软件“应该”销售的方式。 如果你让他们为他们使用的每台机器付费,他们会觉得你在占便宜,这就是他们开始在网络上寻找其他人的许可证密钥的时候。
如果合适的话,您还可以提供公司许可证、或 10 套许可证等,比单独购买可享受折扣。 这为个人和组织提供了合法使用您的软件的方式,不会让他们觉得您无理地挤压他们。
I'd seriously reconsider the licensing requirements, because enforcing them will lose you legitimate customers. If you're a huge company, you can afford that, but if you're a startup or an individual you can't.
One way out is to offer an individual license - good for all machines the individual uses. This, for better or for worse, is how people think software "should" be sold. If you make them pay for each machine they use they'll feel like you're taking advantage, and that's when they start trolling the web for someone else's license key.
If appropriate, you could also offer a corporate license, or 10-packs of licenses, or whatever, for a discount over buying them separately. This gives both individuals and organizations ways to use your software legally that don't make them feel like you're squeezing them unreasonably.
考虑使用 JNLP 在您的应用程序中添加一个时间有限的组件 - 许可证模块? - 必须通过互联网定期更新。 需要注册才能访问更新版本。 设置
较长的宽限期,允许用户在禁用功能之前离线(或不想升级)一段时间。
Consider using JNLP to have a time limited component in your application - the license module? - which must be regularily updated over the internet. The accessability to the updated version requires registration. Let the
Have a long grace period allowing the user to be offline (or not wanting to upgrade) for a period before disabling functionality.
除非应用程序已经需要连接到网络来完成其实际工作,否则打电话回家可能很容易被归类为间谍软件。
我不确定这是否适用于 Java Web Start,但由于防火墙可能会阻止您的应用程序打电话回家,因此您的付费客户可能仍然会看到他们的应用程序被阻止。
所以:我不会时不时地使用一些打电话回家的东西。
(至于许可证密钥:如果密钥仅适用于特定的注册名称,并且该名称显示在某些“关于”对话框中,那么我不会担心使其依赖于硬件。当然,一些注册名称及其密钥将是共享,但任何更花哨的东西都不值得付出努力。如果我的 Mac 失败了,那么我不会很高兴看到我的一键时间机器恢复在新硬件上使您的应用程序无法启动。)
Unless the application already needs to connect to the net to do it's actual work, phoning home might easily be classified as spyware.
And I am not sure if this applies to Java Web Start, but as firewalls may block your application from phoning home, your paying customers may still see their application blocked.
So: I would not use something that phones home every now and then.
(As for license keys: if a key only works with a specific registration name, and if that name is shown in some About dialog, then I would not worry about making it hardware dependent. Sure, a few registration names and their keys will be shared, but anything more fancy is not worth the effort. If my Mac fails me then I would not be amused to see my 1-click Time Machine restore on new hardware make your application fail to start.)