Java RMI Server Insecure Endpoint Code Execution Scanner - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/misc/java_rmi_server metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Java RMI Server Insecure Endpoint Code Execution Scanner
Module: auxiliary/scanner/misc/java_rmi_server
Source code: modules/auxiliary/scanner/misc/java_rmi_server.rb
Disclosure date: 2011-10-15
Last modification time: 2020-08-26 12:34:03 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 1099
List of CVEs: CVE-2011-3556
Detect Java RMI endpoints
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
This module is a scanner module, and is capable of testing against multiple hosts.
msf > use auxiliary/scanner/misc/java_rmi_server
msf auxiliary(java_rmi_server) > show options
... show and set options ...
msf auxiliary(java_rmi_server) > set RHOSTS ip-range
msf auxiliary(java_rmi_server) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(java_rmi_server) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(java_rmi_server) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(java_rmi_server) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Go back to menu.
Msfconsole Usage
Here is how the scanner/misc/java_rmi_server auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/misc/java_rmi_server
msf6 auxiliary(scanner/misc/java_rmi_server) > show info
Name: Java RMI Server Insecure Endpoint Code Execution Scanner
Module: auxiliary/scanner/misc/java_rmi_server
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2011-10-15
Provided by:
mihi
hdm <[email protected]>
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 1099 yes The target port (TCP)
THREADS 1 yes The number of concurrent threads (max one per host)
Description:
Detect Java RMI endpoints
References:
http://download.oracle.com/javase/1.3/docs/guide/rmi/spec/rmi-protocol.html
http://www.securitytracker.com/id?1026215
https://nvd.nist.gov/vuln/detail/CVE-2011-3556
Module Options
This is a complete list of options available in the scanner/misc/java_rmi_server auxiliary module:
msf6 auxiliary(scanner/misc/java_rmi_server) > show options
Module options (auxiliary/scanner/misc/java_rmi_server):
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 1099 yes The target port (TCP)
THREADS 1 yes The number of concurrent threads (max one per host)
Advanced Options
Here is a complete list of advanced options supported by the scanner/misc/java_rmi_server auxiliary module:
msf6 auxiliary(scanner/misc/java_rmi_server) > show advanced
Module advanced options (auxiliary/scanner/misc/java_rmi_server):
Name Current Setting Required Description
---- --------------- -------- -----------
CHOST no The local client address
CPORT no The local client port
ConnectTimeout 10 yes Maximum number of seconds to establish a TCP connection
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RmiReadLoopTimeout 1 yes Maximum number of seconds to wait for data between read iterations
SSL false no Negotiate SSL/TLS for outgoing connections
SSLCipher no String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
SSLVerifyMode PEER no SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
SSLVersion Auto yes Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
ShowProgress true yes Display progress messages during a scan
ShowProgressPercent 10 yes The interval in percent that progress should be shown
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the scanner/misc/java_rmi_server module can do:
msf6 auxiliary(scanner/misc/java_rmi_server) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/misc/java_rmi_server auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/misc/java_rmi_server) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
TCP::max_send_size 0 no Maxiumum tcp segment size. (0 = disable)
TCP::send_delay 0 no Delays inserted before every send. (0 = disable)
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
Failed to negotiate RMI protocol
Here is a relevant code snippet related to the "Failed to negotiate RMI protocol" error message:
41:
42: vprint_status("Sending RMI Header...")
43: send_header
44: ack = recv_protocol_ack
45: if ack.nil?
46: print_error("Failed to negotiate RMI protocol")
47: disconnect
48: return Exploit::CheckCode::Unknown
49: end
50:
51: # Determine if the instance allows remote class loading
Go back to menu.
Related Pull Requests
- #14040 Merged Pull Request: Use CheckModule auxiliary/scanner/misc/java_rmi_server in exploit/multi/misc/java_rmi_server
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8502 Merged Pull Request: update java_rmi_server modules with CVE
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #6526 Merged Pull Request: Peers for the peer god
- #6072 Merged Pull Request: Fix #6050 - Java RMI scanner stack traces against Metasploitable2
- #5709 Merged Pull Request: Fixed Typo in Java RMI Module
- #4560 Merged Pull Request: Add support for RMI to Rex / Rewrite java_rmi_server modules / Add JMX mixin / Exploit for JMXRMI endpoints
- #2525 Merged Pull Request: Change module boilerplate
References
- http://download.oracle.com/javase/1.3/docs/guide/rmi/spec/rmi-protocol.html
- http://www.securitytracker.com/id?1026215
- CVE-2011-3556
See Also
Check also the following modules related to this module:
- exploit/multi/misc/java_rmi_server
- auxiliary/scanner/misc/java_jmx_server
- auxiliary/scanner/misc/cctv_dvr_login
- auxiliary/scanner/misc/cisco_smart_install
- auxiliary/scanner/misc/clamav_control
- auxiliary/scanner/misc/dahua_dvr_auth_bypass
- auxiliary/scanner/misc/dvr_config_disclosure
- auxiliary/scanner/misc/easycafe_server_fileaccess
- auxiliary/scanner/misc/freeswitch_event_socket_login
- auxiliary/scanner/misc/ibm_mq_channel_brute
- auxiliary/scanner/misc/ibm_mq_enum
- auxiliary/scanner/misc/ibm_mq_login
- auxiliary/scanner/misc/ib_service_mgr_info
- auxiliary/scanner/misc/oki_scanner
- auxiliary/scanner/misc/poisonivy_control_scanner
- auxiliary/scanner/misc/raysharp_dvr_passwords
- auxiliary/scanner/misc/rosewill_rxs3211_passwords
- auxiliary/scanner/misc/sercomm_backdoor_scanner
- auxiliary/scanner/misc/sunrpc_portmapper
- auxiliary/scanner/misc/zenworks_preboot_fileaccess
- auxiliary/admin/zend/java_bridge
- auxiliary/gather/java_rmi_registry
- payload/java/jsp_shell_bind_tcp
- payload/java/jsp_shell_reverse_tcp
- payload/java/meterpreter/bind_tcp
- payload/java/meterpreter/reverse_http
- payload/java/meterpreter/reverse_https
- payload/java/meterpreter/reverse_tcp
- payload/java/shell/bind_tcp
- payload/java/shell/reverse_tcp
- payload/java/shell_reverse_tcp
- auxiliary/server/capture/http_javascript_keylogger
- auxiliary/admin/http/nuuo_nvrmini_reset
- auxiliary/admin/vmware/terminate_esx_sessions
- auxiliary/scanner/vmware/vmware_enum_permissions
Related Nessus plugins:
- RHEL 5 / 6 : java-1.6.0-openjdk (RHSA-2011:1380) (BEAST)
- CentOS 5 : java-1.6.0-openjdk (CESA-2011:1380) (BEAST)
- RHEL 4 / 5 / 6 : java-1.6.0-sun (RHSA-2011:1384) (BEAST)
- Oracle Java SE Multiple Vulnerabilities (October 2011 CPU) (BEAST)
- Fedora 16 : java-1.6.0-openjdk-1.6.0.0-60.1.10.4.fc16 (2011-15020) (BEAST)
- GLSA-201111-02 : Oracle JRE/JDK: Multiple vulnerabilities (BEAST)
- Mac OS X : Java for Mac OS X 10.6 Update 6 (BEAST)
- Mac OS X : Java for Mac OS X 10.7 Update 1 (BEAST)
- Mandriva Linux Security Advisory : java-1.6.0-openjdk (MDVSA-2011:170)
- Ubuntu 10.04 LTS / 10.10 / 11.04 / 11.10 : icedtea-web, openjdk-6, openjdk-6b18 vulnerabilities (USN-1263-1) (BEAST)
Authors
- mihi
- hdm
Version
This page has been produced using Metasploit Framework version 6.2.7-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.