我可以通过“java.io”来阻止恶意读取类文件吗?功能,使用NATIVE代码(工具)? [英] Can i stop the malicious reading the class files via "java.io" function,with NATIVE code(tool)?

查看:189
本文介绍了我可以通过“java.io”来阻止恶意读取类文件吗?功能,使用NATIVE代码(工具)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我们会对可以操作整个操作系统的代码破解者进行辩护,他们可以通过java.io读取编码的类文件并保存副本

  2. 我们保护基于java的应用程序的知识产权

  3. 这个要求是由几个客户提出的,所以它具有现实价值。

Simplex Java-JDK-JVM解决方案,例如没有本机代码/工具的securityManager,因为它很容易被绕过,所以很容易被绕过,因为在这种情况下,cracker对操作系统具有管理员权限。

Simplex Java-JDK-JVM solution like securityManager without native code/tool can NOT be accepted because it's easy to be bypassed, since cracker have the admin privilege on the OS in this scenario.

推荐答案

最好使用 SecurityManager 来控制对Java API。如果需要,SecurityManager可以调用本机代码。

You are probably better off using a SecurityManager to control access to Java APIs. The SecurityManager can call into native code if it wants.

具体来说, checkRead 方法可用于验证如果一个程序被允许从给定的路径读取,这不仅包括 FileInputStream.read(),还包括用Java读取文件的任何其他方法。

Specifically, the checkRead method can be used to validate if a program is permitted to read from a given path, which covers not just FileInputStream.read() but any other means of reading files in Java.

这篇关于我可以通过“java.io”来阻止恶意读取类文件吗?功能,使用NATIVE代码(工具)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆