Can i stop the malicious reading the class files via “java.io” function,with NATIVE code(tool)?

只愿长相守 提交于 2019-12-31 07:34:13

问题


  1. we'd defend against the code crackers who can operate on the whole operation system who may read the encoded class-file via "java.io" and save the copy
  2. we'd protect java-based application's intellectual property
  3. this requirement was raised by several customers, so it has realistic value.

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.


回答1:


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

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.



来源:https://stackoverflow.com/questions/22084982/can-i-stop-the-malicious-reading-the-class-files-via-java-io-function-with-nat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!