许可服务器使用了哪些技术?

Which techniques are used to licensing server?

我需要为我的应用程序创建许可服务器。 应用程序应 ping 许可服务器,如果许可证过期则停止工作。 应该如何安全地完成?我还没有找到任何关于此的文章。 更确切地说,让我感到困惑的是如何防止攻击者执行以下操作

  1. 看看我在哪里发出请求(例如使用 fiddler)

  2. 创建自己的服务器

  3. 使用 etc/host 文件将他的 PC 指向该服务器。

关于此的任何最佳实践?

您可以通过在您的服务器上启用 HTTPS 来实现。您的应用程序将需要验证 HTTPS 证书以确保远程主机不是伪造的许可服务器。

This article 描述了您提到的攻击,以及如何使用 HTTPS 避免它。

这是一个有用的示例:

Defeating Active Attackers

Verifying the server’s authenticity is key to defeating active attackers. Fortunately, TLS has this covered as well. As you recall, HTTPS is really just HTTP running over TLS. When HTTPS is implemented correctly, here is what happens to active attackers.

Because the legitimate server’s Certificate Authority (CA) verifies ownership of the domain (yourwebsite.com), an active attacker cannot fake the certificate. Encryption prevents the attacker from reading or modifying any intercepted data. In short, the entire CIA triad is satisfied and both passive and active attackers are defeated.

在您的情况下,角色略有不同:用户 是您的应用程序,而潜在的 attacker 是应用程序用户不想支付许可证费用。 ;)