1412 lines
53 KiB
HTML
1412 lines
53 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>
|
|
Module: Msf::Exploit::Remote::Java::Rmi::Client
|
|
|
|
— Documentation by YARD 0.9.37
|
|
|
|
</title>
|
|
|
|
<link rel="stylesheet" href="../../../../../css/style.css" type="text/css" />
|
|
|
|
<link rel="stylesheet" href="../../../../../css/common.css" type="text/css" />
|
|
|
|
<script type="text/javascript">
|
|
pathId = "Msf::Exploit::Remote::Java::Rmi::Client";
|
|
relpath = '../../../../../';
|
|
</script>
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8" src="../../../../../js/jquery.js"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8" src="../../../../../js/app.js"></script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<div class="nav_wrap">
|
|
<iframe id="nav" src="../../../../../class_list.html?1"></iframe>
|
|
<div id="resizer"></div>
|
|
</div>
|
|
|
|
<div id="main" tabindex="-1">
|
|
<div id="header">
|
|
<div id="menu">
|
|
|
|
<a href="../../../../../_index.html">Index (C)</a> »
|
|
<span class='title'><span class='object_link'><a href="../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> » <span class='title'><span class='object_link'><a href="../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> » <span class='title'><span class='object_link'><a href="../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> » <span class='title'><span class='object_link'><a href="../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> » <span class='title'><span class='object_link'><a href="../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span>
|
|
»
|
|
<span class="title">Client</span>
|
|
|
|
</div>
|
|
|
|
<div id="search">
|
|
|
|
<a class="full_list_link" id="class_list_link"
|
|
href="../../../../../class_list.html">
|
|
|
|
<svg width="24" height="24">
|
|
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
</svg>
|
|
</a>
|
|
|
|
</div>
|
|
<div class="clear"></div>
|
|
</div>
|
|
|
|
<div id="content"><h1>Module: Msf::Exploit::Remote::Java::Rmi::Client
|
|
|
|
|
|
|
|
</h1>
|
|
<div class="box_info">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Includes:</dt>
|
|
<dd><span class='object_link'><a href="Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Builder (module)">Builder</a></span>, <span class='object_link'><a href="Client/Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span>, <span class='object_link'><a href="Client/Registry.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry (module)">Registry</a></span>, <span class='object_link'><a href="Util.html" title="Msf::Exploit::Remote::Java::Rmi::Util (module)">Util</a></span>, <span class='object_link'><a href="../../Tcp.html" title="Msf::Exploit::Remote::Tcp (module)">Tcp</a></span></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Defined in:</dt>
|
|
<dd>lib/msf/core/exploit/remote/java/rmi/client.rb<span class="defines">,<br />
|
|
lib/msf/core/exploit/remote/java/rmi/client/jmx.rb,<br /> lib/msf/core/exploit/remote/java/rmi/client/registry.rb,<br /> lib/msf/core/exploit/remote/java/rmi/client/jmx/server.rb,<br /> lib/msf/core/exploit/remote/java/rmi/client/jmx/connection.rb,<br /> lib/msf/core/exploit/remote/java/rmi/client/registry/parser.rb,<br /> lib/msf/core/exploit/remote/java/rmi/client/registry/builder.rb,<br /> lib/msf/core/exploit/remote/java/rmi/client/jmx/server/parser.rb,<br /> lib/msf/core/exploit/remote/java/rmi/client/jmx/server/builder.rb,<br /> lib/msf/core/exploit/remote/java/rmi/client/jmx/connection/builder.rb</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
<h2>Defined Under Namespace</h2>
|
|
<p class="children">
|
|
|
|
|
|
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Client/Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span>, <span class='object_link'><a href="Client/Registry.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry (module)">Registry</a></span>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<h2>Constant Summary</h2>
|
|
|
|
<h3 class="inherited">Constants included
|
|
from <span class='object_link'><a href="Client/Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Jmx.html#BYTE_ARRAY_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::BYTE_ARRAY_UID (constant)">Jmx::BYTE_ARRAY_UID</a></span>, <span class='object_link'><a href="Client/Jmx.html#MARSHALLED_OBJECT_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::MARSHALLED_OBJECT_UID (constant)">Jmx::MARSHALLED_OBJECT_UID</a></span>, <span class='object_link'><a href="Client/Jmx.html#OBJECT_ARRAY_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::OBJECT_ARRAY_UID (constant)">Jmx::OBJECT_ARRAY_UID</a></span>, <span class='object_link'><a href="Client/Jmx.html#OBJECT_NAME_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::OBJECT_NAME_UID (constant)">Jmx::OBJECT_NAME_UID</a></span>, <span class='object_link'><a href="Client/Jmx.html#STRING_ARRAY_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::STRING_ARRAY_UID (constant)">Jmx::STRING_ARRAY_UID</a></span></p>
|
|
|
|
|
|
|
|
|
|
<h2>Instance Attribute Summary</h2>
|
|
|
|
<h3 class="inherited">Attributes included from <span class='object_link'><a href="../../Tcp.html" title="Msf::Exploit::Remote::Tcp (module)">Tcp</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../Tcp.html#sock-instance_method" title="Msf::Exploit::Remote::Tcp#sock (method)">#sock</a></span></p>
|
|
|
|
|
|
|
|
<h2>
|
|
Instance Method Summary
|
|
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
</h2>
|
|
|
|
<ul class="summary">
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(info = {}) ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#read_loop_timeout-instance_method" title="#read_loop_timeout (instance method)">#<strong>read_loop_timeout</strong> ⇒ Integer </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Returns the timeout to wait for data between read iterations.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#recv_protocol_ack-instance_method" title="#recv_protocol_ack (instance method)">#<strong>recv_protocol_ack</strong>(opts = {}) ⇒ Rex::Proto::Rmi::Model::ProtocolAck, NilClass </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Reads the Protocol Ack.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#recv_return-instance_method" title="#recv_return (instance method)">#<strong>recv_return</strong>(opts = {}) ⇒ Rex::Proto::Rmi::Model::ReturnValue, NilClass </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Reads a ReturnData message and returns the java serialized stream with the return data value.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#rhost-instance_method" title="#rhost (instance method)">#<strong>rhost</strong> ⇒ String </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Returns the target host.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#rport-instance_method" title="#rport (instance method)">#<strong>rport</strong> ⇒ Integer </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Returns the target port.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#safe_get_once-instance_method" title="#safe_get_once (instance method)">#<strong>safe_get_once</strong>(nsock = sock, loop_timeout = read_loop_timeout) ⇒ String </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Helper method to read fragmented data from a “‘Rex::Socket::Tcp“`.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#send_call-instance_method" title="#send_call (instance method)">#<strong>send_call</strong>(opts = {}) ⇒ Integer </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Sends a RMI CALL stream.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#send_dgc_ack-instance_method" title="#send_dgc_ack (instance method)">#<strong>send_dgc_ack</strong>(opts = {}) ⇒ Integer </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Sends a RMI DGCACK stream.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#send_header-instance_method" title="#send_header (instance method)">#<strong>send_header</strong>(opts = {}) ⇒ Integer </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Sends a RMI header stream.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../Tcp.html" title="Msf::Exploit::Remote::Tcp (module)">Tcp</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../Tcp.html#chost-instance_method" title="Msf::Exploit::Remote::Tcp#chost (method)">#chost</a></span>, <span class='object_link'><a href="../../Tcp.html#cleanup-instance_method" title="Msf::Exploit::Remote::Tcp#cleanup (method)">#cleanup</a></span>, <span class='object_link'><a href="../../Tcp.html#connect-instance_method" title="Msf::Exploit::Remote::Tcp#connect (method)">#connect</a></span>, <span class='object_link'><a href="../../Tcp.html#connect_timeout-instance_method" title="Msf::Exploit::Remote::Tcp#connect_timeout (method)">#connect_timeout</a></span>, <span class='object_link'><a href="../../Tcp.html#cport-instance_method" title="Msf::Exploit::Remote::Tcp#cport (method)">#cport</a></span>, <span class='object_link'><a href="../../Tcp.html#disconnect-instance_method" title="Msf::Exploit::Remote::Tcp#disconnect (method)">#disconnect</a></span>, <span class='object_link'><a href="../../Tcp.html#handler-instance_method" title="Msf::Exploit::Remote::Tcp#handler (method)">#handler</a></span>, <span class='object_link'><a href="../../Tcp.html#lhost-instance_method" title="Msf::Exploit::Remote::Tcp#lhost (method)">#lhost</a></span>, <span class='object_link'><a href="../../Tcp.html#lport-instance_method" title="Msf::Exploit::Remote::Tcp#lport (method)">#lport</a></span>, <span class='object_link'><a href="../../Tcp.html#peer-instance_method" title="Msf::Exploit::Remote::Tcp#peer (method)">#peer</a></span>, <span class='object_link'><a href="../../Tcp.html#print_prefix-instance_method" title="Msf::Exploit::Remote::Tcp#print_prefix (method)">#print_prefix</a></span>, <span class='object_link'><a href="../../Tcp.html#proxies-instance_method" title="Msf::Exploit::Remote::Tcp#proxies (method)">#proxies</a></span>, <span class='object_link'><a href="../../Tcp.html#replicant-instance_method" title="Msf::Exploit::Remote::Tcp#replicant (method)">#replicant</a></span>, <span class='object_link'><a href="../../Tcp.html#set_tcp_evasions-instance_method" title="Msf::Exploit::Remote::Tcp#set_tcp_evasions (method)">#set_tcp_evasions</a></span>, <span class='object_link'><a href="../../Tcp.html#shutdown-instance_method" title="Msf::Exploit::Remote::Tcp#shutdown (method)">#shutdown</a></span>, <span class='object_link'><a href="../../Tcp.html#ssl-instance_method" title="Msf::Exploit::Remote::Tcp#ssl (method)">#ssl</a></span>, <span class='object_link'><a href="../../Tcp.html#ssl_cipher-instance_method" title="Msf::Exploit::Remote::Tcp#ssl_cipher (method)">#ssl_cipher</a></span>, <span class='object_link'><a href="../../Tcp.html#ssl_verify_mode-instance_method" title="Msf::Exploit::Remote::Tcp#ssl_verify_mode (method)">#ssl_verify_mode</a></span>, <span class='object_link'><a href="../../Tcp.html#ssl_version-instance_method" title="Msf::Exploit::Remote::Tcp#ssl_version (method)">#ssl_version</a></span>, <span class='object_link'><a href="../../Tcp.html#sslkeylogfile-instance_method" title="Msf::Exploit::Remote::Tcp#sslkeylogfile (method)">#sslkeylogfile</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Jmx/Connection.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection (module)">Jmx::Connection</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Jmx/Connection.html#build_invoke_arguments_obj_bytes-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection#build_invoke_arguments_obj_bytes (method)">#build_invoke_arguments_obj_bytes</a></span>, <span class='object_link'><a href="Client/Jmx/Connection.html#build_jmx_invoke-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection#build_jmx_invoke (method)">#build_jmx_invoke</a></span>, <span class='object_link'><a href="Client/Jmx/Connection.html#build_jmx_invoke_args-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection#build_jmx_invoke_args (method)">#build_jmx_invoke_args</a></span>, <span class='object_link'><a href="Client/Jmx/Connection.html#send_jmx_create_mbean-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection#send_jmx_create_mbean (method)">#send_jmx_create_mbean</a></span>, <span class='object_link'><a href="Client/Jmx/Connection.html#send_jmx_get_object_instance-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection#send_jmx_get_object_instance (method)">#send_jmx_get_object_instance</a></span>, <span class='object_link'><a href="Client/Jmx/Connection.html#send_jmx_invoke-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection#send_jmx_invoke (method)">#send_jmx_invoke</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Jmx/Connection/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection::Builder (module)">Jmx::Connection::Builder</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Jmx/Connection/Builder.html#build_jmx_create_mbean-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection::Builder#build_jmx_create_mbean (method)">#build_jmx_create_mbean</a></span>, <span class='object_link'><a href="Client/Jmx/Connection/Builder.html#build_jmx_create_mbean_args-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection::Builder#build_jmx_create_mbean_args (method)">#build_jmx_create_mbean_args</a></span>, <span class='object_link'><a href="Client/Jmx/Connection/Builder.html#build_jmx_get_object_instance-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection::Builder#build_jmx_get_object_instance (method)">#build_jmx_get_object_instance</a></span>, <span class='object_link'><a href="Client/Jmx/Connection/Builder.html#build_jmx_get_object_instance_args-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection::Builder#build_jmx_get_object_instance_args (method)">#build_jmx_get_object_instance_args</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Jmx/Server.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server (module)">Jmx::Server</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Jmx/Server.html#send_new_client-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server#send_new_client (method)">#send_new_client</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Jmx/Server/Parser.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Parser (module)">Jmx::Server::Parser</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Jmx/Server/Parser.html#parse_jmx_new_client_endpoint-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Parser#parse_jmx_new_client_endpoint (method)">#parse_jmx_new_client_endpoint</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Jmx/Server/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Builder (module)">Jmx::Server::Builder</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Jmx/Server/Builder.html#build_jmx_new_client-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Builder#build_jmx_new_client (method)">#build_jmx_new_client</a></span>, <span class='object_link'><a href="Client/Jmx/Server/Builder.html#build_jmx_new_client_args-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Builder#build_jmx_new_client_args (method)">#build_jmx_new_client_args</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Registry.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry (module)">Registry</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Registry.html#registry_interface_hash-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry#registry_interface_hash (method)">#registry_interface_hash</a></span>, <span class='object_link'><a href="Client/Registry.html#send_registry_list-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry#send_registry_list (method)">#send_registry_list</a></span>, <span class='object_link'><a href="Client/Registry.html#send_registry_lookup-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry#send_registry_lookup (method)">#send_registry_lookup</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Registry/Parser.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Parser (module)">Registry::Parser</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Registry/Parser.html#parse_registry_list-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Parser#parse_registry_list (method)">#parse_registry_list</a></span>, <span class='object_link'><a href="Client/Registry/Parser.html#parse_registry_lookup_endpoint-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Parser#parse_registry_lookup_endpoint (method)">#parse_registry_lookup_endpoint</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Registry/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Builder (module)">Registry::Builder</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Registry/Builder.html#build_registry_list-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Builder#build_registry_list (method)">#build_registry_list</a></span>, <span class='object_link'><a href="Client/Registry/Builder.html#build_registry_lookup-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Builder#build_registry_lookup (method)">#build_registry_lookup</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Builder (module)">Builder</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Builder.html#build_call-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Builder#build_call (method)">#build_call</a></span>, <span class='object_link'><a href="Builder.html#build_dgc_ack-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Builder#build_dgc_ack (method)">#build_dgc_ack</a></span>, <span class='object_link'><a href="Builder.html#build_header-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Builder#build_header (method)">#build_header</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Util.html" title="Msf::Exploit::Remote::Java::Rmi::Util (module)">Util</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Util.html#calculate_interface_hash-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Util#calculate_interface_hash (method)">#calculate_interface_hash</a></span>, <span class='object_link'><a href="Util.html#calculate_method_hash-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Util#calculate_method_hash (method)">#calculate_method_hash</a></span>, <span class='object_link'><a href="Util.html#extract_byte-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Util#extract_byte (method)">#extract_byte</a></span>, <span class='object_link'><a href="Util.html#extract_int-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Util#extract_int (method)">#extract_int</a></span>, <span class='object_link'><a href="Util.html#extract_long-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Util#extract_long (method)">#extract_long</a></span>, <span class='object_link'><a href="Util.html#extract_reference-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Util#extract_reference (method)">#extract_reference</a></span>, <span class='object_link'><a href="Util.html#extract_string-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Util#extract_string (method)">#extract_string</a></span>, <span class='object_link'><a href="Util.html#register_common_rmi_ports_and_services-instance_method" title="Msf::Exploit::Remote::Java::Rmi::Util#register_common_rmi_ports_and_services (method)">#register_common_rmi_ports_and_services</a></span></p>
|
|
|
|
|
|
<div id="instance_method_details" class="method_details_list">
|
|
<h2>Instance Method Details</h2>
|
|
|
|
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="initialize-instance_method">
|
|
|
|
#<strong>initialize</strong>(info = {}) ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
17
|
|
18
|
|
19
|
|
20
|
|
21
|
|
22
|
|
23
|
|
24
|
|
25</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client.rb', line 17</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_info'>info</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='kw'>super</span>
|
|
|
|
<span class='id identifier rubyid_register_advanced_options'>register_advanced_options</span><span class='lparen'>(</span>
|
|
<span class='lbracket'>[</span>
|
|
<span class='const'><span class='object_link'><a href="../../../../OptInt.html" title="Msf::OptInt (class)">OptInt</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../OptBase.html#initialize-instance_method" title="Msf::OptBase#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>RmiReadLoopTimeout</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbracket'>[</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Maximum number of seconds to wait for data between read iterations</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
<span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../../../../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span>
|
|
<span class='rparen'>)</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="read_loop_timeout-instance_method">
|
|
|
|
#<strong>read_loop_timeout</strong> ⇒ <tt>Integer</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Returns the timeout to wait for data between read iterations</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>Integer</tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
30
|
|
31
|
|
32</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client.rb', line 30</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_read_loop_timeout'>read_loop_timeout</span>
|
|
<span class='id identifier rubyid_datastore'>datastore</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>RmiReadLoopTimeout</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>1</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="recv_protocol_ack-instance_method">
|
|
|
|
#<strong>recv_protocol_ack</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/ProtocolAck.html" title="Rex::Proto::Rmi::Model::ProtocolAck (class)">Rex::Proto::Rmi::Model::ProtocolAck</a></span></tt>, <tt>NilClass</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Reads the Protocol Ack</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:sock</span>
|
|
<span class="type">(<tt>Rex::Socket::Tcp</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/ProtocolAck.html" title="Rex::Proto::Rmi::Model::ProtocolAck (class)">Rex::Proto::Rmi::Model::ProtocolAck</a></span></tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>if success</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>NilClass</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>otherwise</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li>Rex::Proto::Rmi::Model::ProtocolAck.decode</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
93
|
|
94
|
|
95
|
|
96
|
|
97
|
|
98
|
|
99
|
|
100
|
|
101
|
|
102
|
|
103</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client.rb', line 93</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_recv_protocol_ack'>recv_protocol_ack</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_nsock'>nsock</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:sock</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_sock'>sock</span>
|
|
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_safe_get_once'>safe_get_once</span><span class='lparen'>(</span><span class='id identifier rubyid_nsock'>nsock</span><span class='rparen'>)</span>
|
|
<span class='kw'>begin</span>
|
|
<span class='id identifier rubyid_ack'>ack</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi.html" title="Rex::Proto::Rmi (module)">Rmi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model.html" title="Rex::Proto::Rmi::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/ProtocolAck.html" title="Rex::Proto::Rmi::Model::ProtocolAck (class)">ProtocolAck</a></span></span><span class='period'>.</span><span class='id identifier rubyid_decode'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/Element.html#decode-class_method" title="Rex::Proto::Rmi::Model::Element.decode (method)">decode</a></span></span><span class='lparen'>(</span><span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi.html" title="Rex::Proto::Rmi (module)">Rmi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/DecodeError.html" title="Rex::Proto::Rmi::DecodeError (class)">DecodeError</a></span></span>
|
|
<span class='kw'>return</span> <span class='kw'>nil</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_ack'>ack</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="recv_return-instance_method">
|
|
|
|
#<strong>recv_return</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/ReturnValue.html" title="Rex::Proto::Rmi::Model::ReturnValue (class)">Rex::Proto::Rmi::Model::ReturnValue</a></span></tt>, <tt>NilClass</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Reads a ReturnData message and returns the java serialized stream with the return data value.</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:sock</span>
|
|
<span class="type">(<tt>Rex::Socket::Tcp</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/ReturnValue.html" title="Rex::Proto::Rmi::Model::ReturnValue (class)">Rex::Proto::Rmi::Model::ReturnValue</a></span></tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>if success</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>NilClass</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>otherwise</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li>Rex::Proto::Rmi::Model::ReturnData.decode</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
113
|
|
114
|
|
115
|
|
116
|
|
117
|
|
118
|
|
119
|
|
120
|
|
121
|
|
122
|
|
123
|
|
124</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client.rb', line 113</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_recv_return'>recv_return</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_nsock'>nsock</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:sock</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_sock'>sock</span>
|
|
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_safe_get_once'>safe_get_once</span><span class='lparen'>(</span><span class='id identifier rubyid_nsock'>nsock</span><span class='rparen'>)</span>
|
|
|
|
<span class='kw'>begin</span>
|
|
<span class='id identifier rubyid_return_data'>return_data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi.html" title="Rex::Proto::Rmi (module)">Rmi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model.html" title="Rex::Proto::Rmi::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/ReturnData.html" title="Rex::Proto::Rmi::Model::ReturnData (class)">ReturnData</a></span></span><span class='period'>.</span><span class='id identifier rubyid_decode'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/Element.html#decode-class_method" title="Rex::Proto::Rmi::Model::Element.decode (method)">decode</a></span></span><span class='lparen'>(</span><span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi.html" title="Rex::Proto::Rmi (module)">Rmi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/DecodeError.html" title="Rex::Proto::Rmi::DecodeError (class)">DecodeError</a></span></span>
|
|
<span class='kw'>return</span> <span class='kw'>nil</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_return_data'>return_data</span><span class='period'>.</span><span class='id identifier rubyid_return_value'>return_value</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="rhost-instance_method">
|
|
|
|
#<strong>rhost</strong> ⇒ <tt>String</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Returns the target host</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>String</tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
37
|
|
38
|
|
39</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client.rb', line 37</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_rhost'>rhost</span>
|
|
<span class='id identifier rubyid_datastore'>datastore</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>RHOST</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="rport-instance_method">
|
|
|
|
#<strong>rport</strong> ⇒ <tt>Integer</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Returns the target port</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>Integer</tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
44
|
|
45
|
|
46</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client.rb', line 44</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_rport'>rport</span>
|
|
<span class='id identifier rubyid_datastore'>datastore</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>RPORT</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="safe_get_once-instance_method">
|
|
|
|
#<strong>safe_get_once</strong>(nsock = sock, loop_timeout = read_loop_timeout) ⇒ <tt>String</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Helper method to read fragmented data from a “‘Rex::Socket::Tcp“`</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>nsock</span>
|
|
|
|
|
|
<span class='type'>(<tt>Rex::Socket::Tcp</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>sock</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>String</tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
130
|
|
131
|
|
132
|
|
133
|
|
134
|
|
135
|
|
136
|
|
137
|
|
138
|
|
139
|
|
140
|
|
141
|
|
142
|
|
143
|
|
144
|
|
145
|
|
146
|
|
147
|
|
148
|
|
149</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client.rb', line 130</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_safe_get_once'>safe_get_once</span><span class='lparen'>(</span><span class='id identifier rubyid_nsock'>nsock</span> <span class='op'>=</span> <span class='id identifier rubyid_sock'>sock</span><span class='comma'>,</span> <span class='id identifier rubyid_loop_timeout'>loop_timeout</span> <span class='op'>=</span> <span class='id identifier rubyid_read_loop_timeout'>read_loop_timeout</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
|
<span class='kw'>begin</span>
|
|
<span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='id identifier rubyid_nsock'>nsock</span><span class='period'>.</span><span class='id identifier rubyid_get_once'>get_once</span>
|
|
<span class='kw'>rescue</span> <span class='op'>::</span><span class='const'>EOFError</span>
|
|
<span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='kw'>while</span> <span class='id identifier rubyid_res'>res</span> <span class='op'>&&</span> <span class='id identifier rubyid_nsock'>nsock</span><span class='period'>.</span><span class='id identifier rubyid_has_read_data?'>has_read_data?</span><span class='lparen'>(</span><span class='id identifier rubyid_loop_timeout'>loop_timeout</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_data'>data</span> <span class='op'><<</span> <span class='id identifier rubyid_res'>res</span>
|
|
<span class='kw'>begin</span>
|
|
<span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='id identifier rubyid_nsock'>nsock</span><span class='period'>.</span><span class='id identifier rubyid_get_once'>get_once</span>
|
|
<span class='kw'>rescue</span> <span class='op'>::</span><span class='const'>EOFError</span>
|
|
<span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_data'>data</span> <span class='op'><<</span> <span class='id identifier rubyid_res'>res</span> <span class='kw'>if</span> <span class='id identifier rubyid_res'>res</span>
|
|
<span class='id identifier rubyid_data'>data</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="send_call-instance_method">
|
|
|
|
#<strong>send_call</strong>(opts = {}) ⇒ <tt>Integer</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Sends a RMI CALL stream</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:sock</span>
|
|
<span class="type">(<tt>Rex::Socket::Tcp</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:call</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/Call.html" title="Rex::Proto::Rmi::Model::Call (class)">Rex::Proto::Rmi::Model::Call</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>Integer</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>the number of bytes sent</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li>Rmi::Client::Streams#build_call</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
68
|
|
69
|
|
70
|
|
71
|
|
72</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client.rb', line 68</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_send_call'>send_call</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_nsock'>nsock</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:sock</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_sock'>sock</span>
|
|
<span class='id identifier rubyid_call'>call</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:call</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_build_call'>build_call</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_nsock'>nsock</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span><span class='id identifier rubyid_call'>call</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="send_dgc_ack-instance_method">
|
|
|
|
#<strong>send_dgc_ack</strong>(opts = {}) ⇒ <tt>Integer</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Sends a RMI DGCACK stream</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:sock</span>
|
|
<span class="type">(<tt>Rex::Socket::Tcp</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>Integer</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>the number of bytes sent</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li>Rmi::Client::Streams#build_dgc_ack</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
80
|
|
81
|
|
82
|
|
83
|
|
84</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client.rb', line 80</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_send_dgc_ack'>send_dgc_ack</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_nsock'>nsock</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:sock</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_sock'>sock</span>
|
|
<span class='id identifier rubyid_stream'>stream</span> <span class='op'>=</span> <span class='id identifier rubyid_build_dgc_ack'>build_dgc_ack</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_nsock'>nsock</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="send_header-instance_method">
|
|
|
|
#<strong>send_header</strong>(opts = {}) ⇒ <tt>Integer</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Sends a RMI header stream</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:sock</span>
|
|
<span class="type">(<tt>Rex::Socket::Tcp</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>Integer</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>the number of bytes sent</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li>Rmi::Client::Streams#build_header</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
55
|
|
56
|
|
57
|
|
58
|
|
59</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client.rb', line 55</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_send_header'>send_header</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_nsock'>nsock</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:sock</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_sock'>sock</span>
|
|
<span class='id identifier rubyid_stream'>stream</span> <span class='op'>=</span> <span class='id identifier rubyid_build_header'>build_header</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_nsock'>nsock</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\x00\x00\x00\x00\x00\x00</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
Generated on Fri May 8 17:02:15 2026 by
|
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
0.9.37 (ruby-3.1.5).
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html> |