服务器机器中的不安全 WAR

发布于 12-18 02:50 字数 193 浏览 3 评论 0原文

我将在服务器计算机中部署我的 web 应用程序 (WAR)。但是,服务器计算机在客户端手中,他们获取数据库转储(以便可以创建新数据),并且可以从 tomcat webapp 目录复制 WAR 文件。操作系统是Windows。如果他们能够复制我的 WAR 并创建数据库,他们就可以在其他地方使用它。我该如何保护这个? JNI?还有别的事吗?如果是 JNI,聪明的方法是什么?

I'm going to deploy my webapp (WAR) in a server machine. But, server machine is in client people hand, and they take database dump(so new data can be created), and WAR file can be copied from tomcat webapp directory. OS is Windows. If they able to copy my WAR and create a database, they can use it elsewhere. How can I protect this? JNI? Something else? If JNI, what's the smart way?

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

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

发布评论

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

评论(2

寂寞笑我太脆弱2024-12-25 02:50:00

说真的,如果您不能信任运行您的软件的服务器的人员,那么就没有可行的技术解决方案可以防止他们窃取它并在其他地方运行它。

所有已知的技术“修复”(例如混淆、加密类、许可证管理器、“call home”等)只会让坏人变得更加困难。他们都可以相对容易地被击败。 IMO,它们不值得您付出努力以及它们给您和/或您的客户带来的随之而来的技术问题。

最好的方法是合法的:

  • 让你的律师帮助你与客户起草一份合同,明确禁止他们对你的软件进行逆向工程、修改它、以你不想要的方式运行它,等等让

  • 让客户同意合同。

  • 监控他们在做什么(在你可以的范围内),如果他们看起来违反了合同......起诉他们。

即使这并不能保证,但它应该会让你的客户重新考虑偷你的东西。

Seriously, if you cannot trust the people who run the server on which your software is to run, then there is no viable technical solution that will prevent them stealing it and running it somewhere else.

All known technical "fixes" (e.g. obfuscation, encrypted classes, license managers, "call home", etc) only make it a bit harder for the bad guys. They all can can be defeated relatively easily. IMO, they are not worth the effort and the accompanying technical problems that they cause for you and/or your client.

Your best approach is the legal one:

  • Get your lawyers to help you draw up a contract with the client that expressly forbids them from reverse engineering your software, modifying it, running it in ways that you don't want, and so on.

  • Get the client to agree to the contract.

  • Monitor what they are doing (to the extent that you can), and if it looks like they are violating the contract ... SUE THEM.

Even this is not a guarantee, but it should cause your client to have second thoughts about stealing your stuff.

遮了一弯2024-12-25 02:50:00

可能的解决方案:

  1. 使用代码混淆库。如果他们尝试反编译代码(如果他们需要更改任何内容),这将使代码看起来很复杂。这通常是您需要购买的软件,有时当您在调试实时系统时尝试查看异常时,它会让事情变得复杂。
  2. 在代码中包含检查,以防止应用程序运行,以防找不到某些“隐藏”环境变量(或其他变量)。
  3. 与您的客户签订一份合同,明确禁止他在其他地方窃取和使用您的应用程序/代码。

解决方案#3 是最常见的。

Possible solutions:

  1. Use a code obfuscation library. This will make the code look complex in case they try to decompile it (in case they need to change anything). This is usually software that you need to buy and sometimes it will complicate things when you try to look through an exception when debugging the live system.
  2. Include checks in your code that prevent the application of running in case some "hidden" environment variable (or whatever) is not found.
  3. Setup a contract with your client which will explicitly forbit him of stealing and using your app/code elsewhere.

Solution #3 is the most common.

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