Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rmi-vuln-classloader shows potential false positive against partially mitigated JVM 1.8.0_45 #146

Open
dmiller-nmap opened this issue Jun 1, 2015 · 0 comments

Comments

@dmiller-nmap
Copy link

From IRC:

2015-06-01T20:30:19  <anthonymoralez> ‘nmap -q -sV --version-all --script rmi-vuln-classloader.nse -p 1098 localhost’ reports a vulnerability on port 1098. I am running ‘rmid -J-Djava.security.policy=file:https:///path/to/my.policy' from oracle’s JVM Java 1.8.0_45. My understanding was that this script is checking for the vulnerability that is mitigated by enabling java.rmi.server.useCodebaseOnly, which is enabled by default with JVM 1.8.0_45.
2015-06-01T20:31:19  <anthonymoralez> Does anyone know if rmi-vuln-classloader is supposed to detect this issue? Or how to secure rmid against this script?
2015-06-01T20:39:44  <anthonymoralez> judging by this message: http:https://seclists.org/nmap-dev/2012/q2/442 it is but I still don’t see how to secure rmid against this vulnerability

The script attempts to load the "dummy" class from "file:./dummy.jar", which will not succeed in any case. The target is deemed vulnerable if the response does not contain "RMI class loader disabled". This check may not distinguish between JVMs which support or enable the java.rmi.server.useCodebaseOnly property. Todo items:

  1. Determine if the useCodebaseOnly property really makes a service not-vulnerable. We may want to downgrade to LIKELY_VULN to reflect this mitigation, but it doesn't feel like a complete mitigation.
  2. Update the script to distinguish services with this property. This may require actually loading a class from elsewhere, which would be difficult unless there is some system-available class that useCodebaseOnly is supposed to prevent loading. Perhaps something like java.lang.Runtime.exec()?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant