Reboot gh-pages

This commit is contained in:
jenkins-metasploit
2026-05-08 17:08:43 +00:00
commit c3f5bd3de2
3540 changed files with 2281201 additions and 0 deletions
+126
View File
@@ -0,0 +1,126 @@
<!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::HTTP
&mdash; 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::HTTP";
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 (H)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span>
&raquo;
<span class="title">HTTP</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::HTTP
</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/http/class_loader.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>This mixin implements the remote loading of Java classes over HTTP</p>
</div>
</div>
<div class="tags">
</div><h2>Defined Under Namespace</h2>
<p class="children">
<strong class="modules">Modules:</strong> <span class='object_link'><a href="HTTP/ClassLoader.html" title="Msf::Exploit::Remote::Java::HTTP::ClassLoader (module)">ClassLoader</a></span>
</p>
</div>
<div id="footer">
Generated on Fri May 8 17:02:36 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>
File diff suppressed because one or more lines are too long
+117
View File
@@ -0,0 +1,117 @@
<!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
&mdash; 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";
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 (R)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span>
&raquo;
<span class="title">Rmi</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
</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/util.rb<span class="defines">,<br />
lib/msf/core/exploit/remote/java/rmi/client.rb,<br /> lib/msf/core/exploit/remote/java/rmi/builder.rb,<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="Rmi/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Builder (module)">Builder</a></span>, <span class='object_link'><a href="Rmi/Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span>, <span class='object_link'><a href="Rmi/Util.html" title="Msf::Exploit::Remote::Java::Rmi::Util (module)">Util</a></span>
</p>
</div>
<div id="footer">
Generated on Fri May 8 17:02:09 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>
@@ -0,0 +1,670 @@
<!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::Builder
&mdash; 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::Builder";
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 (B)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span>
&raquo;
<span class="title">Builder</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::Builder
</h1>
<div class="box_info">
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/builder.rb</dd>
</dl>
</div>
<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="#build_call-instance_method" title="#build_call (instance method)">#<strong>build_call</strong>(opts = {}) &#x21d2; Rex::Proto::Rmi::Model::Call </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds a RMI call stream.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#build_dgc_ack-instance_method" title="#build_dgc_ack (instance method)">#<strong>build_dgc_ack</strong>(opts = {}) &#x21d2; Rex::Proto::Rmi::Model::DgcAck </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds a RMI dgc ack stream.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#build_header-instance_method" title="#build_header (instance method)">#<strong>build_header</strong>(opts = {}) &#x21d2; Rex::Proto::Rmi::Model::OutputHeader </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds a RMI header stream.</p>
</div></span>
</li>
</ul>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="build_call-instance_method">
#<strong>build_call</strong>(opts = {}) &#x21d2; <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>
</h3><div class="docstring">
<div class="discussion">
<p>Builds 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{Symbol =&gt; &lt;Integer, Array&gt;}</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">:message_id</span>
<span class="type">(<tt>Integer</tt>)</span>
<span class="default">
</span>
</li>
<li>
<span class="name">:object_number</span>
<span class="type">(<tt>Integer</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>Random to identify the object.</p>
</div>
</li>
<li>
<span class="name">:uid_number</span>
<span class="type">(<tt>Integer</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>Identifies the VM where the object was generated.</p>
</div>
</li>
<li>
<span class="name">:uid_time</span>
<span class="type">(<tt>Integer</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>Time where the object was generated.</p>
</div>
</li>
<li>
<span class="name">:uid_count</span>
<span class="type">(<tt>Integer</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>Identifies different instance of the same object generated from the same VM at the same time.</p>
</div>
</li>
<li>
<span class="name">:operation</span>
<span class="type">(<tt>Integer</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>On JDK 1.1 stub protocol the operation index in the interface. On JDK 1.2 it is -1.</p>
</div>
</li>
<li>
<span class="name">:hash</span>
<span class="type">(<tt>Integer</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>On JDK 1.1 stub protocol the stub's interface hash. On JDK1.2 is a hash representing the method to call.</p>
</div>
</li>
<li>
<span class="name">:arguments</span>
<span class="type">(<tt>Array</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/Call.html" title="Rex::Proto::Rmi::Model::Call (class)">Rex::Proto::Rmi::Model::Call</a></span></tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/builder.rb', line 46</span>
<span class='kw'>def</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='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='id identifier rubyid_message_id'>message_id</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:message_id</span><span class='rbracket'>]</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.html#CALL_MESSAGE-constant" title="Rex::Proto::Rmi::Model::CALL_MESSAGE (constant)">CALL_MESSAGE</a></span></span>
<span class='id identifier rubyid_object_number'>object_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:object_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_number'>uid_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_time'>uid_time</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_time</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_count'>uid_count</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_count</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_operation'>operation</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:operation</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='op'>-</span><span class='int'>1</span>
<span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:hash</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:arguments</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_uid'>uid</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/UniqueIdentifier.html" title="Rex::Proto::Rmi::Model::UniqueIdentifier (class)">UniqueIdentifier</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/Element.html#initialize-instance_method" title="Rex::Proto::Rmi::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
<span class='label'>number:</span> <span class='id identifier rubyid_uid_number'>uid_number</span><span class='comma'>,</span>
<span class='label'>time:</span> <span class='id identifier rubyid_uid_time'>uid_time</span><span class='comma'>,</span>
<span class='label'>count:</span> <span class='id identifier rubyid_uid_count'>uid_count</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_call_data'>call_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/CallData.html" title="Rex::Proto::Rmi::Model::CallData (class)">CallData</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/Element.html#initialize-instance_method" title="Rex::Proto::Rmi::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
<span class='label'>object_number:</span> <span class='id identifier rubyid_object_number'>object_number</span><span class='comma'>,</span>
<span class='label'>uid:</span> <span class='id identifier rubyid_uid'>uid</span><span class='comma'>,</span>
<span class='label'>operation:</span> <span class='id identifier rubyid_operation'>operation</span><span class='comma'>,</span>
<span class='label'>hash:</span> <span class='id identifier rubyid_hash'>hash</span><span class='comma'>,</span>
<span class='label'>arguments:</span> <span class='id identifier rubyid_arguments'>arguments</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_call'>call</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/Call.html" title="Rex::Proto::Rmi::Model::Call (class)">Call</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/Element.html#initialize-instance_method" title="Rex::Proto::Rmi::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
<span class='label'>message_id:</span> <span class='id identifier rubyid_message_id'>message_id</span><span class='comma'>,</span>
<span class='label'>call_data:</span> <span class='id identifier rubyid_call_data'>call_data</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_call'>call</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="build_dgc_ack-instance_method">
#<strong>build_dgc_ack</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/DgcAck.html" title="Rex::Proto::Rmi::Model::DgcAck (class)">Rex::Proto::Rmi::Model::DgcAck</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Builds a RMI dgc ack 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{Symbol =&gt; &lt;Integer, String&gt;}</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">:stream_id</span>
<span class="type">(<tt>Integer</tt>)</span>
<span class="default">
</span>
</li>
<li>
<span class="name">:unique_identifier</span>
<span class="type">(<tt>String</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/DgcAck.html" title="Rex::Proto::Rmi::Model::DgcAck (class)">Rex::Proto::Rmi::Model::DgcAck</a></span></tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
84
85
86
87
88
89
90
91
92
93
94</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/builder.rb', line 84</span>
<span class='kw'>def</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='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='id identifier rubyid_stream_id'>stream_id</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:stream_id</span><span class='rbracket'>]</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.html#DGC_ACK_MESSAGE-constant" title="Rex::Proto::Rmi::Model::DGC_ACK_MESSAGE (constant)">DGC_ACK_MESSAGE</a></span></span>
<span class='id identifier rubyid_unique_identifier'>unique_identifier</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:unique_identifier</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00</span><span class='tstring_end'>&quot;</span></span>
<span class='id identifier rubyid_dgc_ack'>dgc_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/DgcAck.html" title="Rex::Proto::Rmi::Model::DgcAck (class)">DgcAck</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/Element.html#initialize-instance_method" title="Rex::Proto::Rmi::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
<span class='label'>stream_id:</span> <span class='id identifier rubyid_stream_id'>stream_id</span><span class='comma'>,</span>
<span class='label'>unique_identifier:</span> <span class='id identifier rubyid_unique_identifier'>unique_identifier</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_dgc_ack'>dgc_ack</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="build_header-instance_method">
#<strong>build_header</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/OutputHeader.html" title="Rex::Proto::Rmi::Model::OutputHeader (class)">Rex::Proto::Rmi::Model::OutputHeader</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Builds 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{Symbol =&gt; &lt;String, Integer&gt;}</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">:signature</span>
<span class="type">(<tt>String</tt>)</span>
<span class="default">
</span>
</li>
<li>
<span class="name">:version</span>
<span class="type">(<tt>Integer</tt>)</span>
<span class="default">
</span>
</li>
<li>
<span class="name">:protocol</span>
<span class="type">(<tt>Integer</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/OutputHeader.html" title="Rex::Proto::Rmi::Model::OutputHeader (class)">Rex::Proto::Rmi::Model::OutputHeader</a></span></tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
18
19
20
21
22
23
24
25
26
27
28
29</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/builder.rb', line 18</span>
<span class='kw'>def</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='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='id identifier rubyid_signature'>signature</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:signature</span><span class='rbracket'>]</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.html#SIGNATURE-constant" title="Rex::Proto::Rmi::Model::SIGNATURE (constant)">SIGNATURE</a></span></span>
<span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:version</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>2</span>
<span class='id identifier rubyid_protocol'>protocol</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:protocol</span><span class='rbracket'>]</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.html#STREAM_PROTOCOL-constant" title="Rex::Proto::Rmi::Model::STREAM_PROTOCOL (constant)">STREAM_PROTOCOL</a></span></span>
<span class='id identifier rubyid_header'>header</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/OutputHeader.html" title="Rex::Proto::Rmi::Model::OutputHeader (class)">OutputHeader</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Rmi/Model/Element.html#initialize-instance_method" title="Rex::Proto::Rmi::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
<span class='label'>signature:</span> <span class='id identifier rubyid_signature'>signature</span><span class='comma'>,</span>
<span class='label'>version:</span> <span class='id identifier rubyid_version'>version</span><span class='comma'>,</span>
<span class='label'>protocol:</span> <span class='id identifier rubyid_protocol'>protocol</span><span class='rparen'>)</span>
<span class='id identifier rubyid_header'>header</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:02:22 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>
+1412
View File
@@ -0,0 +1,1412 @@
<!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
&mdash; 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> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span>
&raquo;
<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 = {}) &#x21d2; 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> &#x21d2; 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 = {}) &#x21d2; 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 = {}) &#x21d2; 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> &#x21d2; 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> &#x21d2; 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) &#x21d2; 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 = {}) &#x21d2; 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 = {}) &#x21d2; 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 = {}) &#x21d2; 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 = {}) &#x21d2; <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'>&#39;</span><span class='tstring_content'>RmiReadLoopTimeout</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>Maximum number of seconds to wait for data between read iterations</span><span class='tstring_end'>&#39;</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> &#x21d2; <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'>&#39;</span><span class='tstring_content'>RmiReadLoopTimeout</span><span class='tstring_end'>&#39;</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 = {}) &#x21d2; <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>
&mdash;
<div class='inline'>
<p>if success</p>
</div>
</li>
<li>
<span class='type'>(<tt>NilClass</tt>)</span>
&mdash;
<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 = {}) &#x21d2; <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>
&mdash;
<div class='inline'>
<p>if success</p>
</div>
</li>
<li>
<span class='type'>(<tt>NilClass</tt>)</span>
&mdash;
<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> &#x21d2; <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'>&#39;</span><span class='tstring_content'>RHOST</span><span class='tstring_end'>&#39;</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> &#x21d2; <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'>&#39;</span><span class='tstring_content'>RPORT</span><span class='tstring_end'>&#39;</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) &#x21d2; <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'>&#39;</span><span class='tstring_end'>&#39;</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'>&amp;&amp;</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'>&lt;&lt;</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'>&lt;&lt;</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 = {}) &#x21d2; <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>
&mdash;
<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 = {}) &#x21d2; <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>
&mdash;
<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 = {}) &#x21d2; <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>
&mdash;
<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'>&quot;</span><span class='tstring_content'>\x00\x00\x00\x00\x00\x00</span><span class='tstring_end'>&quot;</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>
@@ -0,0 +1,218 @@
<!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::Jmx
&mdash; 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::Jmx";
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 (J)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span>
&raquo;
<span class="title">Jmx</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::Jmx
</h1>
<div class="box_info">
<dl>
<dt>Includes:</dt>
<dd><span class='object_link'><a href="Jmx/Connection.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection (module)">Connection</a></span>, <span class='object_link'><a href="Jmx/Server.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server (module)">Server</a></span></dd>
</dl>
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Msf::Exploit::Remote::Java::Rmi::Client</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/client/jmx.rb<span class="defines">,<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/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="Jmx/Connection.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection (module)">Connection</a></span>, <span class='object_link'><a href="Jmx/Server.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server (module)">Server</a></span>
</p>
<h2>
Constant Summary
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
</h2>
<dl class="constants">
<dt id="OBJECT_NAME_UID-constant" class="">OBJECT_NAME_UID =
</dt>
<dd><pre class="code"><span class='int'>1081892073854801359</span></pre></dd>
<dt id="BYTE_ARRAY_UID-constant" class="">BYTE_ARRAY_UID =
</dt>
<dd><pre class="code"><span class='op'>-</span><span class='int'>5984413125824719648</span></pre></dd>
<dt id="MARSHALLED_OBJECT_UID-constant" class="">MARSHALLED_OBJECT_UID =
</dt>
<dd><pre class="code"><span class='int'>8988374069173025854</span></pre></dd>
<dt id="STRING_ARRAY_UID-constant" class="">STRING_ARRAY_UID =
</dt>
<dd><pre class="code"><span class='op'>-</span><span class='int'>5921575005990323385</span></pre></dd>
<dt id="OBJECT_ARRAY_UID-constant" class="">OBJECT_ARRAY_UID =
</dt>
<dd><pre class="code"><span class='op'>-</span><span class='int'>8012369246846506644</span></pre></dd>
</dl>
<h2>Method Summary</h2>
<h3 class="inherited">Methods included from <span class='object_link'><a href="Jmx/Connection.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection (module)">Connection</a></span></h3>
<p class="inherited"><span class='object_link'><a href="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="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="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="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="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="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="Jmx/Connection/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection::Builder (module)">Connection::Builder</a></span></h3>
<p class="inherited"><span class='object_link'><a href="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="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="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="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="Jmx/Server.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server (module)">Server</a></span></h3>
<p class="inherited"><span class='object_link'><a href="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="Jmx/Server/Parser.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Parser (module)">Server::Parser</a></span></h3>
<p class="inherited"><span class='object_link'><a href="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="Jmx/Server/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Builder (module)">Server::Builder</a></span></h3>
<p class="inherited"><span class='object_link'><a href="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="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>
</div>
<div id="footer">
Generated on Fri May 8 17:02:28 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>
@@ -0,0 +1,1256 @@
<!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::Jmx::Connection
&mdash; 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::Jmx::Connection";
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> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span>
&raquo;
<span class="title">Connection</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::Jmx::Connection
</h1>
<div class="box_info">
<dl>
<dt>Includes:</dt>
<dd><span class='object_link'><a href="Connection/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection::Builder (module)">Builder</a></span></dd>
</dl>
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Msf::Exploit::Remote::Java::Rmi::Client::Jmx</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/client/jmx/connection.rb<span class="defines">,<br />
lib/msf/core/exploit/remote/java/rmi/client/jmx/connection/builder.rb</span>
</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>This mixin provides methods to simulate calls to the Java javax/management/remote/rmi/RMIConnectionImpl_Stub interface</p>
</div>
</div>
<div class="tags">
</div><h2>Defined Under Namespace</h2>
<p class="children">
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Connection/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection::Builder (module)">Builder</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="#build_invoke_arguments_obj_bytes-instance_method" title="#build_invoke_arguments_obj_bytes (instance method)">#<strong>build_invoke_arguments_obj_bytes</strong>(args = {}) &#x21d2; Rex::Java::Serialization::Model::Stream </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds a Rex::Java::Serialization::Model::Stream with the arguments to simulate a call to the Java javax/management/remote/rmi/RMIConnectionImpl_Stub#invoke() method.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#build_jmx_invoke-instance_method" title="#build_jmx_invoke (instance method)">#<strong>build_jmx_invoke</strong>(opts = {}) &#x21d2; Rex::Proto::Rmi::Model::Call </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds an RMI call to javax/management/remote/rmi/RMIConnectionImpl_Stub#invoke() used to invoke an MBean method.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#build_jmx_invoke_args-instance_method" title="#build_jmx_invoke_args (instance method)">#<strong>build_jmx_invoke_args</strong>(opts = {}) &#x21d2; Array </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds an an array of arguments o build a call to javax/management/remote/rmi/RMIConnectionImpl_Stub#invoke().</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#send_jmx_create_mbean-instance_method" title="#send_jmx_create_mbean (instance method)">#<strong>send_jmx_create_mbean</strong>(opts = {}) &#x21d2; TrueClass, NilClass </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Sends a call to the JMXRMI endpoint to create an MBean instance.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#send_jmx_get_object_instance-instance_method" title="#send_jmx_get_object_instance (instance method)">#<strong>send_jmx_get_object_instance</strong>(opts = {}) &#x21d2; TrueClass, NilClass </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Sends a call to the JMXRMI endpoint to retrieve an MBean instance.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#send_jmx_invoke-instance_method" title="#send_jmx_invoke (instance method)">#<strong>send_jmx_invoke</strong>(opts = {}) &#x21d2; TrueClass, NilClass </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Sends a call to the JMXRMI endpoint to invoke an MBean method.</p>
</div></span>
</li>
</ul>
<h3 class="inherited">Methods included from <span class='object_link'><a href="Connection/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection::Builder (module)">Builder</a></span></h3>
<p class="inherited"><span class='object_link'><a href="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="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="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="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>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="build_invoke_arguments_obj_bytes-instance_method">
#<strong>build_invoke_arguments_obj_bytes</strong>(args = {}) &#x21d2; <tt>Rex::Java::Serialization::Model::Stream</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Builds a Rex::Java::Serialization::Model::Stream with the arguments to simulate a call to the Java javax/management/remote/rmi/RMIConnectionImpl_Stub#invoke() method.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>args</span>
<span class='type'>(<tt>Hash</tt>)</span>
<em class="default">(defaults to: <tt>{}</tt>)</em>
&mdash;
<div class='inline'>
<p>the arguments of the method to invoke</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Rex::Java::Serialization::Model::Stream</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/connection/builder.rb', line 215</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_invoke_arguments_obj_bytes'>build_invoke_arguments_obj_bytes</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='id identifier rubyid_builder'>builder</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Builder</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_new_array'>new_array</span> <span class='op'>=</span> <span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_new_array'>new_array</span><span class='lparen'>(</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>[Ljava.lang.Object;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>serial:</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="../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Jmx.html#OBJECT_ARRAY_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::OBJECT_ARRAY_UID (constant)">OBJECT_ARRAY_UID</a></span></span><span class='comma'>,</span> <span class='comment'># serialVersionUID
</span> <span class='label'>annotations:</span> <span class='lbracket'>[</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>EndBlockData</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='rbracket'>]</span><span class='comma'>,</span>
<span class='label'>values_type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.lang.Object;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>values:</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_arg'>arg</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_stream'>stream</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Stream</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_contents'>contents</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_new_array'>new_array</span>
<span class='id identifier rubyid_stream'>stream</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="build_jmx_invoke-instance_method">
#<strong>build_jmx_invoke</strong>(opts = {}) &#x21d2; <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>
</h3><div class="docstring">
<div class="discussion">
<p>Builds an RMI call to javax/management/remote/rmi/RMIConnectionImpl_Stub#invoke() used to invoke an MBean method</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">:name</span>
<span class="type">(<tt>String</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>the MBean name</p>
</div>
</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/Call.html" title="Rex::Proto::Rmi::Model::Call (class)">Rex::Proto::Rmi::Model::Call</a></span></tt>)</span>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Builder.build_call</li>
<li><span class='object_link'><a href="#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></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/connection/builder.rb', line 123</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_jmx_invoke'>build_jmx_invoke</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_object_number'>object_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:object_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_number'>uid_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_time'>uid_time</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_time</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_count'>uid_count</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_count</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_method_hash'>method_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_calculate_method_hash'>calculate_method_hash</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>invoke(Ljavax/management/ObjectName;Ljava/lang/String;Ljava/rmi/MarshalledObject;[Ljava/lang/String;Ljavax/security/auth/Subject;)Ljava/lang/Object;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_build_jmx_invoke_args'>build_jmx_invoke_args</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
<span class='id identifier rubyid_call'>call</span> <span class='op'>=</span> <span class='id identifier rubyid_build_call'>build_call</span><span class='lparen'>(</span>
<span class='label'>object_number:</span> <span class='id identifier rubyid_object_number'>object_number</span><span class='comma'>,</span>
<span class='label'>uid_number:</span> <span class='id identifier rubyid_uid_number'>uid_number</span><span class='comma'>,</span>
<span class='label'>uid_time:</span> <span class='id identifier rubyid_uid_time'>uid_time</span><span class='comma'>,</span>
<span class='label'>uid_count:</span> <span class='id identifier rubyid_uid_count'>uid_count</span><span class='comma'>,</span>
<span class='label'>operation:</span> <span class='op'>-</span><span class='int'>1</span><span class='comma'>,</span>
<span class='label'>hash:</span> <span class='id identifier rubyid_method_hash'>method_hash</span><span class='comma'>,</span>
<span class='label'>arguments:</span> <span class='id identifier rubyid_arguments'>arguments</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_call'>call</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="build_jmx_invoke_args-instance_method">
#<strong>build_jmx_invoke_args</strong>(opts = {}) &#x21d2; <tt>Array</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Builds an an array of arguments o build a call to javax/management/remote/rmi/RMIConnectionImpl_Stub#invoke()</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">:object</span>
<span class="type">(<tt>String</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>the MBean name</p>
</div>
</li>
<li>
<span class="name">:method</span>
<span class="type">(<tt>String</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>the method name</p>
</div>
</li>
<li>
<span class="name">:args</span>
<span class="type">(<tt>Hash</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>the method arguments</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/connection/builder.rb', line 154</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_jmx_invoke_args'>build_jmx_invoke_args</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_object_name'>object_name</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:object</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_method_name'>method_name</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:method</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:args</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='id identifier rubyid_builder'>builder</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Builder</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_new_object'>new_object</span> <span class='op'>=</span> <span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_new_object'>new_object</span><span class='lparen'>(</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>javax.management.ObjectName</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>serial:</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="../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Jmx.html#OBJECT_NAME_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::OBJECT_NAME_UID (constant)">OBJECT_NAME_UID</a></span></span><span class='comma'>,</span> <span class='comment'># serialVersionUID
</span> <span class='label'>flags:</span> <span class='int'>3</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_data_binary'>data_binary</span> <span class='op'>=</span> <span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_new_array'>new_array</span><span class='lparen'>(</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>[B</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>serial:</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="../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Jmx.html#BYTE_ARRAY_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::BYTE_ARRAY_UID (constant)">BYTE_ARRAY_UID</a></span></span><span class='comma'>,</span> <span class='comment'># serialVersionUID
</span> <span class='label'>values_type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>byte</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>values:</span> <span class='id identifier rubyid_build_invoke_arguments_obj_bytes'>build_invoke_arguments_obj_bytes</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='period'>.</span><span class='id identifier rubyid_unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>C*</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_marshall_object'>marshall_object</span> <span class='op'>=</span> <span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_new_object'>new_object</span><span class='lparen'>(</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.MarshalledObject</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>serial:</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="../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Jmx.html#MARSHALLED_OBJECT_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::MARSHALLED_OBJECT_UID (constant)">MARSHALLED_OBJECT_UID</a></span></span><span class='comma'>,</span> <span class='comment'># serialVersionUID
</span> <span class='label'>fields:</span> <span class='lbracket'>[</span>
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>int</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>hash</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>array</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>locBytes</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>[B</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>array</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>objBytes</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>[B</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='rbracket'>]</span><span class='comma'>,</span>
<span class='label'>data:</span> <span class='lbracket'>[</span>
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>int</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='int'>1919492550</span><span class='rbracket'>]</span><span class='comma'>,</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>NullReference</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span>
<span class='id identifier rubyid_data_binary'>data_binary</span>
<span class='rbracket'>]</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_new_array'>new_array</span> <span class='op'>=</span> <span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_new_array'>new_array</span><span class='lparen'>(</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>[Ljava.lang.String;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>serial:</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="../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Jmx.html#STRING_ARRAY_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::STRING_ARRAY_UID (constant)">STRING_ARRAY_UID</a></span></span><span class='comma'>,</span> <span class='comment'># serialVersionUID
</span> <span class='label'>values_type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.lang.String;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>values:</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='lbracket'>[</span>
<span class='id identifier rubyid_new_object'>new_object</span><span class='comma'>,</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_object_name'>object_name</span><span class='rparen'>)</span><span class='comma'>,</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>EndBlockData</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_method_name'>method_name</span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='id identifier rubyid_marshall_object'>marshall_object</span><span class='comma'>,</span>
<span class='id identifier rubyid_new_array'>new_array</span><span class='comma'>,</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>NullReference</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='rbracket'>]</span>
<span class='id identifier rubyid_arguments'>arguments</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="send_jmx_create_mbean-instance_method">
#<strong>send_jmx_create_mbean</strong>(opts = {}) &#x21d2; <tt>TrueClass</tt>, <tt>NilClass</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Sends a call to the JMXRMI endpoint to create an MBean instance. Simulates a call to the Java javax/management/remote/rmi/RMIConnectionImpl_Stub#createMBean() method.</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>TrueClass</tt>, <tt>NilClass</tt>)</span>
&mdash;
<div class='inline'>
<p>true if success, nil otherwise</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../../../../../../../Rex/Proto/Rmi/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Rex::Proto::Rmi::Exception</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the endpoint raises a remote exception</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Registry::Builder.build_jmx_create_mbean</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/connection.rb', line 61</span>
<span class='kw'>def</span> <span class='id identifier rubyid_send_jmx_create_mbean'>send_jmx_create_mbean</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_send_call'>send_call</span><span class='lparen'>(</span>
<span class='label'>sock:</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='comma'>,</span>
<span class='label'>call:</span> <span class='id identifier rubyid_build_jmx_create_mbean'>build_jmx_create_mbean</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_return_value'>return_value</span> <span class='op'>=</span> <span class='id identifier rubyid_recv_return'>recv_return</span><span class='lparen'>(</span>
<span class='label'>sock:</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='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_is_exception?'>is_exception?</span>
<span class='id identifier rubyid_raise'>raise</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/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Exception</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_get_class_name'>get_class_name</span>
<span class='kw'>end</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_get_class_name'>get_class_name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>javax.management.ObjectInstance</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>true</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="send_jmx_get_object_instance-instance_method">
#<strong>send_jmx_get_object_instance</strong>(opts = {}) &#x21d2; <tt>TrueClass</tt>, <tt>NilClass</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Sends a call to the JMXRMI endpoint to retrieve an MBean instance. Simulates a call to the Java javax/management/remote/rmi/RMIConnectionImpl_Stub#getObjectInstance() method.</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>TrueClass</tt>, <tt>NilClass</tt>)</span>
&mdash;
<div class='inline'>
<p>true if success, nil otherwise</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../../../../../../../Rex/Proto/Rmi/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Rex::Proto::Rmi::Exception</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the endpoint raises a remote exception</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Registry::Builder.build_jmx_get_object_instance</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/connection.rb', line 27</span>
<span class='kw'>def</span> <span class='id identifier rubyid_send_jmx_get_object_instance'>send_jmx_get_object_instance</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_send_call'>send_call</span><span class='lparen'>(</span>
<span class='label'>sock:</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='comma'>,</span>
<span class='label'>call:</span> <span class='id identifier rubyid_build_jmx_get_object_instance'>build_jmx_get_object_instance</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_return_value'>return_value</span> <span class='op'>=</span> <span class='id identifier rubyid_recv_return'>recv_return</span><span class='lparen'>(</span>
<span class='label'>sock:</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='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_is_exception?'>is_exception?</span>
<span class='id identifier rubyid_raise'>raise</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/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Exception</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_get_class_name'>get_class_name</span>
<span class='kw'>end</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_get_class_name'>get_class_name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>javax.management.ObjectInstance</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>true</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="send_jmx_invoke-instance_method">
#<strong>send_jmx_invoke</strong>(opts = {}) &#x21d2; <tt>TrueClass</tt>, <tt>NilClass</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Sends a call to the JMXRMI endpoint to invoke an MBean method. Simulates a call to the Java javax/management/remote/rmi/RMIConnectionImpl_Stub#invoke() method.</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>TrueClass</tt>, <tt>NilClass</tt>)</span>
&mdash;
<div class='inline'>
<p>true if success, nil otherwise</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../../../../../../../Rex/Proto/Rmi/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Rex::Proto::Rmi::Exception</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the endpoint raises a remote exception</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Registry::Builder.build_jmx_invoke</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/connection.rb', line 95</span>
<span class='kw'>def</span> <span class='id identifier rubyid_send_jmx_invoke'>send_jmx_invoke</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_send_call'>send_call</span><span class='lparen'>(</span>
<span class='label'>sock:</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='comma'>,</span>
<span class='label'>call:</span> <span class='id identifier rubyid_build_jmx_invoke'>build_jmx_invoke</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_return_value'>return_value</span> <span class='op'>=</span> <span class='id identifier rubyid_recv_return'>recv_return</span><span class='lparen'>(</span>
<span class='label'>sock:</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='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_is_exception?'>is_exception?</span>
<span class='id identifier rubyid_raise'>raise</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/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Exception</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_get_class_name'>get_class_name</span>
<span class='kw'>end</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_get_class_name'>get_class_name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.util.HashSet</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>true</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:02:48 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>
@@ -0,0 +1,697 @@
<!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::Jmx::Connection::Builder
&mdash; 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::Jmx::Connection::Builder";
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 (B)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Connection.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection (module)">Connection</a></span></span>
&raquo;
<span class="title">Builder</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::Jmx::Connection::Builder
</h1>
<div class="box_info">
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="../Connection.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection (module)">Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Connection</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/client/jmx/connection/builder.rb</dd>
</dl>
</div>
<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="#build_jmx_create_mbean-instance_method" title="#build_jmx_create_mbean (instance method)">#<strong>build_jmx_create_mbean</strong>(opts = {}) &#x21d2; Rex::Proto::Rmi::Model::Call </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds an RMI call to javax/management/remote/rmi/RMIConnectionImpl_Stub#createMBean() used to retrieve an MBean instance.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#build_jmx_create_mbean_args-instance_method" title="#build_jmx_create_mbean_args (instance method)">#<strong>build_jmx_create_mbean_args</strong>(name = &#39;&#39;) &#x21d2; Array </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds an an array of arguments o build a call to javax/management/remote/rmi/RMIConnectionImpl_Stub#createMBean().</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#build_jmx_get_object_instance-instance_method" title="#build_jmx_get_object_instance (instance method)">#<strong>build_jmx_get_object_instance</strong>(opts = {}) &#x21d2; Rex::Proto::Rmi::Model::Call </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds an RMI call to javax/management/remote/rmi/RMIConnectionImpl_Stub#getObjectInstance() used to retrieve an MBean instance.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#build_jmx_get_object_instance_args-instance_method" title="#build_jmx_get_object_instance_args (instance method)">#<strong>build_jmx_get_object_instance_args</strong>(name = &#39;&#39;) &#x21d2; Array </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds an an array of arguments o build a call to javax/management/remote/rmi/RMIConnectionImpl_Stub#getObjectInstance().</p>
</div></span>
</li>
</ul>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="build_jmx_create_mbean-instance_method">
#<strong>build_jmx_create_mbean</strong>(opts = {}) &#x21d2; <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>
</h3><div class="docstring">
<div class="discussion">
<p>Builds an RMI call to javax/management/remote/rmi/RMIConnectionImpl_Stub#createMBean() used to retrieve an MBean instance</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">:name</span>
<span class="type">(<tt>String</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>the MBean name</p>
</div>
</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/Call.html" title="Rex::Proto::Rmi::Model::Call (class)">Rex::Proto::Rmi::Model::Call</a></span></tt>)</span>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Builder.build_call</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/connection/builder.rb', line 74</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_jmx_create_mbean'>build_jmx_create_mbean</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_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_object_number'>object_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:object_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_number'>uid_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_time'>uid_time</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_time</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_count'>uid_count</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_count</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_method_hash'>method_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_calculate_method_hash'>calculate_method_hash</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>createMBean(Ljava/lang/String;Ljavax/management/ObjectName;Ljavax/security/auth/Subject;)Ljavax/management/ObjectInstance;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_build_jmx_create_mbean_args'>build_jmx_create_mbean_args</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
<span class='id identifier rubyid_call'>call</span> <span class='op'>=</span> <span class='id identifier rubyid_build_call'>build_call</span><span class='lparen'>(</span>
<span class='label'>object_number:</span> <span class='id identifier rubyid_object_number'>object_number</span><span class='comma'>,</span>
<span class='label'>uid_number:</span> <span class='id identifier rubyid_uid_number'>uid_number</span><span class='comma'>,</span>
<span class='label'>uid_time:</span> <span class='id identifier rubyid_uid_time'>uid_time</span><span class='comma'>,</span>
<span class='label'>uid_count:</span> <span class='id identifier rubyid_uid_count'>uid_count</span><span class='comma'>,</span>
<span class='label'>operation:</span> <span class='op'>-</span><span class='int'>1</span><span class='comma'>,</span>
<span class='label'>hash:</span> <span class='id identifier rubyid_method_hash'>method_hash</span><span class='comma'>,</span>
<span class='label'>arguments:</span> <span class='id identifier rubyid_arguments'>arguments</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_call'>call</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="build_jmx_create_mbean_args-instance_method">
#<strong>build_jmx_create_mbean_args</strong>(name = &#39;&#39;) &#x21d2; <tt>Array</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Builds an an array of arguments o build a call to javax/management/remote/rmi/RMIConnectionImpl_Stub#createMBean()</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>name</span>
<span class='type'>(<tt>Hash</tt>)</span>
<em class="default">(defaults to: <tt>&#39;&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the MBean name</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
103
104
105
106
107
108
109
110
111</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/connection/builder.rb', line 103</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_jmx_create_mbean_args'>build_jmx_create_mbean_args</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='lbracket'>[</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='comma'>,</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>NullReference</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>NullReference</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='rbracket'>]</span>
<span class='id identifier rubyid_arguments'>arguments</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="build_jmx_get_object_instance-instance_method">
#<strong>build_jmx_get_object_instance</strong>(opts = {}) &#x21d2; <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>
</h3><div class="docstring">
<div class="discussion">
<p>Builds an RMI call to javax/management/remote/rmi/RMIConnectionImpl_Stub#getObjectInstance() used to retrieve an MBean instance</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">:name</span>
<span class="type">(<tt>String</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>the MBean name</p>
</div>
</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/Call.html" title="Rex::Proto::Rmi::Model::Call (class)">Rex::Proto::Rmi::Model::Call</a></span></tt>)</span>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Builder.build_call</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/connection/builder.rb', line 19</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_jmx_get_object_instance'>build_jmx_get_object_instance</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_object_number'>object_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:object_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_number'>uid_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_time'>uid_time</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_time</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_count'>uid_count</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_count</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_build_jmx_get_object_instance_args'>build_jmx_get_object_instance_args</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
<span class='id identifier rubyid_method_hash'>method_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_calculate_method_hash'>calculate_method_hash</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>getObjectInstance(Ljavax/management/ObjectName;Ljavax/security/auth/Subject;)Ljavax/management/ObjectInstance;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_call'>call</span> <span class='op'>=</span> <span class='id identifier rubyid_build_call'>build_call</span><span class='lparen'>(</span>
<span class='label'>object_number:</span> <span class='id identifier rubyid_object_number'>object_number</span><span class='comma'>,</span>
<span class='label'>uid_number:</span> <span class='id identifier rubyid_uid_number'>uid_number</span><span class='comma'>,</span>
<span class='label'>uid_time:</span> <span class='id identifier rubyid_uid_time'>uid_time</span><span class='comma'>,</span>
<span class='label'>uid_count:</span> <span class='id identifier rubyid_uid_count'>uid_count</span><span class='comma'>,</span>
<span class='label'>operation:</span> <span class='op'>-</span><span class='int'>1</span><span class='comma'>,</span>
<span class='label'>hash:</span> <span class='id identifier rubyid_method_hash'>method_hash</span><span class='comma'>,</span>
<span class='label'>arguments:</span> <span class='id identifier rubyid_arguments'>arguments</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_call'>call</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="build_jmx_get_object_instance_args-instance_method">
#<strong>build_jmx_get_object_instance_args</strong>(name = &#39;&#39;) &#x21d2; <tt>Array</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Builds an an array of arguments o build a call to javax/management/remote/rmi/RMIConnectionImpl_Stub#getObjectInstance()</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>name</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the MBean name</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/connection/builder.rb', line 48</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_jmx_get_object_instance_args'>build_jmx_get_object_instance_args</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_builder'>builder</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Builder</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_new_object'>new_object</span> <span class='op'>=</span> <span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_new_object'>new_object</span><span class='lparen'>(</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>javax.management.ObjectName</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>serial:</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="../../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Jmx.html#OBJECT_NAME_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::OBJECT_NAME_UID (constant)">OBJECT_NAME_UID</a></span></span><span class='comma'>,</span> <span class='comment'># serialVersionUID
</span> <span class='label'>flags:</span> <span class='int'>3</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='lbracket'>[</span>
<span class='id identifier rubyid_new_object'>new_object</span><span class='comma'>,</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='comma'>,</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>EndBlockData</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>NullReference</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='rbracket'>]</span>
<span class='id identifier rubyid_arguments'>arguments</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:02:51 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>
@@ -0,0 +1,359 @@
<!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::Jmx::Server
&mdash; 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::Jmx::Server";
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 (S)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span>
&raquo;
<span class="title">Server</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::Jmx::Server
</h1>
<div class="box_info">
<dl>
<dt>Includes:</dt>
<dd><span class='object_link'><a href="Server/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Builder (module)">Builder</a></span>, <span class='object_link'><a href="Server/Parser.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Parser (module)">Parser</a></span></dd>
</dl>
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Msf::Exploit::Remote::Java::Rmi::Client::Jmx</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/client/jmx/server.rb<span class="defines">,<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</span>
</dd>
</dl>
</div>
<h2>Defined Under Namespace</h2>
<p class="children">
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Server/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Builder (module)">Builder</a></span>, <span class='object_link'><a href="Server/Parser.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Parser (module)">Parser</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="#send_new_client-instance_method" title="#send_new_client (instance method)">#<strong>send_new_client</strong>(opts = {}) &#x21d2; Hash, NilClass </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Sends a call to the JMXRMI endpoint to retrieve an MBean instance.</p>
</div></span>
</li>
</ul>
<h3 class="inherited">Methods included from <span class='object_link'><a href="Server/Parser.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Parser (module)">Parser</a></span></h3>
<p class="inherited"><span class='object_link'><a href="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="Server/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server::Builder (module)">Builder</a></span></h3>
<p class="inherited"><span class='object_link'><a href="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="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>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="send_new_client-instance_method">
#<strong>send_new_client</strong>(opts = {}) &#x21d2; <tt>Hash</tt>, <tt>NilClass</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Sends a call to the JMXRMI endpoint to retrieve an MBean instance. Simulates a call to the Java javax/management/remote/rmi/RMIServer_Stub#newClient() method.</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>Hash</tt>, <tt>NilClass</tt>)</span>
&mdash;
<div class='inline'>
<p>The connection information if success, nil otherwise</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../../../../../../../Rex/Proto/Rmi/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Rex::Proto::Rmi::Exception</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the endpoint raises a remote exception</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Registry::Builder.build_jmx_new_client</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/server.rb', line 24</span>
<span class='kw'>def</span> <span class='id identifier rubyid_send_new_client'>send_new_client</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_send_call'>send_call</span><span class='lparen'>(</span>
<span class='label'>sock:</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='comma'>,</span>
<span class='label'>call:</span> <span class='id identifier rubyid_build_jmx_new_client'>build_jmx_new_client</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_return_value'>return_value</span> <span class='op'>=</span> <span class='id identifier rubyid_recv_return'>recv_return</span><span class='lparen'>(</span>
<span class='label'>sock:</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='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_is_exception?'>is_exception?</span>
<span class='id identifier rubyid_raise'>raise</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/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Exception</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_get_class_name'>get_class_name</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_remote_object'>remote_object</span> <span class='op'>=</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_get_class_name'>get_class_name</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_remote_object'>remote_object</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_remote_object'>remote_object</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>javax.management.remote.rmi.RMIConnectionImpl_Stub</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_reference'>reference</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_jmx_new_client_endpoint'>parse_jmx_new_client_endpoint</span><span class='lparen'>(</span><span class='id identifier rubyid_return_value'>return_value</span><span class='rparen'>)</span>
<span class='id identifier rubyid_reference'>reference</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:02:40 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>
@@ -0,0 +1,452 @@
<!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::Jmx::Server::Builder
&mdash; 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::Jmx::Server::Builder";
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 (B)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Server.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server (module)">Server</a></span></span>
&raquo;
<span class="title">Builder</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::Jmx::Server::Builder
</h1>
<div class="box_info">
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="../Server.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server (module)">Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/client/jmx/server/builder.rb</dd>
</dl>
</div>
<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="#build_jmx_new_client-instance_method" title="#build_jmx_new_client (instance method)">#<strong>build_jmx_new_client</strong>(opts = {}) &#x21d2; Rex::Proto::Rmi::Model::Call </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds an RMI call to javax/management/remote/rmi/RMIServer_Stub#newClient() used to enumerate the names bound in a registry.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#build_jmx_new_client_args-instance_method" title="#build_jmx_new_client_args (instance method)">#<strong>build_jmx_new_client_args</strong>(username = &#39;&#39;, password = &#39;&#39;) &#x21d2; Array&lt;Rex::Java::Serialization::Model::NewArray&gt; </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds a Rex::Java::Serialization::Model::NewArray with credentials to make an javax/management/remote/rmi/RMIServer_Stub#newClient call.</p>
</div></span>
</li>
</ul>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="build_jmx_new_client-instance_method">
#<strong>build_jmx_new_client</strong>(opts = {}) &#x21d2; <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>
</h3><div class="docstring">
<div class="discussion">
<p>Builds an RMI call to javax/management/remote/rmi/RMIServer_Stub#newClient() used to enumerate the names bound in a registry</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">:username</span>
<span class="type">(<tt>String</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>the JMX role to establish the connection if needed</p>
</div>
</li>
<li>
<span class="name">:password</span>
<span class="type">(<tt>String</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>the JMX password to establish the connection if needed</p>
</div>
</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/Call.html" title="Rex::Proto::Rmi::Model::Call (class)">Rex::Proto::Rmi::Model::Call</a></span></tt>)</span>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Builder.build_call</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/server/builder.rb', line 21</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_jmx_new_client'>build_jmx_new_client</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_object_number'>object_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:object_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_number'>uid_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_time'>uid_time</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_time</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_count'>uid_count</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_count</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_username'>username</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:username</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_password'>password</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:password</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>if</span> <span class='id identifier rubyid_username'>username</span>
<span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_build_jmx_new_client_args'>build_jmx_new_client_args</span><span class='lparen'>(</span><span class='id identifier rubyid_username'>username</span><span class='comma'>,</span> <span class='id identifier rubyid_password'>password</span><span class='rparen'>)</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='lbracket'>[</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>NullReference</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='rbracket'>]</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_call'>call</span> <span class='op'>=</span> <span class='id identifier rubyid_build_call'>build_call</span><span class='lparen'>(</span>
<span class='label'>object_number:</span> <span class='id identifier rubyid_object_number'>object_number</span><span class='comma'>,</span>
<span class='label'>uid_number:</span> <span class='id identifier rubyid_uid_number'>uid_number</span><span class='comma'>,</span>
<span class='label'>uid_time:</span> <span class='id identifier rubyid_uid_time'>uid_time</span><span class='comma'>,</span>
<span class='label'>uid_count:</span> <span class='id identifier rubyid_uid_count'>uid_count</span><span class='comma'>,</span>
<span class='label'>operation:</span> <span class='op'>-</span><span class='int'>1</span><span class='comma'>,</span>
<span class='label'>hash:</span> <span class='op'>-</span><span class='int'>1089742558549201240</span><span class='comma'>,</span> <span class='comment'># javax.management.remote.rmi.RMIServer.newClient
</span> <span class='label'>arguments:</span> <span class='id identifier rubyid_arguments'>arguments</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_call'>call</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="build_jmx_new_client_args-instance_method">
#<strong>build_jmx_new_client_args</strong>(username = &#39;&#39;, password = &#39;&#39;) &#x21d2; <tt>Array&lt;Rex::Java::Serialization::Model::NewArray&gt;</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Builds a Rex::Java::Serialization::Model::NewArray with credentials to make an javax/management/remote/rmi/RMIServer_Stub#newClient call</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>username</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>The username (role) to authenticate with</p>
</div>
</li>
<li>
<span class='name'>password</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>The password to authenticate with</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array&lt;Rex::Java::Serialization::Model::NewArray&gt;</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/server/builder.rb', line 54</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_jmx_new_client_args'>build_jmx_new_client_args</span><span class='lparen'>(</span><span class='id identifier rubyid_username'>username</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_password'>password</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_builder'>builder</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Builder</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_auth_array'>auth_array</span> <span class='op'>=</span> <span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_new_array'>new_array</span><span class='lparen'>(</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>[Ljava.lang.String;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>serial:</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="../../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Jmx.html#STRING_ARRAY_UID-constant" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::STRING_ARRAY_UID (constant)">STRING_ARRAY_UID</a></span></span><span class='comma'>,</span> <span class='comment'># serialVersionUID
</span> <span class='label'>values_type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.lang.String;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>values:</span> <span class='lbracket'>[</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_username'>username</span><span class='rparen'>)</span><span class='comma'>,</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_password'>password</span><span class='rparen'>)</span>
<span class='rbracket'>]</span>
<span class='rparen'>)</span>
<span class='lbracket'>[</span><span class='id identifier rubyid_auth_array'>auth_array</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:02:49 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>
@@ -0,0 +1,247 @@
<!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::Jmx::Server::Parser
&mdash; 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::Jmx::Server::Parser";
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 (P)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Jmx.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx (module)">Jmx</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Server.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server (module)">Server</a></span></span>
&raquo;
<span class="title">Parser</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::Jmx::Server::Parser
</h1>
<div class="box_info">
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="../Server.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server (module)">Msf::Exploit::Remote::Java::Rmi::Client::Jmx::Server</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/client/jmx/server/parser.rb</dd>
</dl>
</div>
<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="#parse_jmx_new_client_endpoint-instance_method" title="#parse_jmx_new_client_endpoint (instance method)">#<strong>parse_jmx_new_client_endpoint</strong>(return_value) &#x21d2; Hash, NilClass </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parses a javax/management/remote/rmi/RMIServer_Stub#newClient() return value to find out the remote reference information.</p>
</div></span>
</li>
</ul>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="parse_jmx_new_client_endpoint-instance_method">
#<strong>parse_jmx_new_client_endpoint</strong>(return_value) &#x21d2; <tt>Hash</tt>, <tt>NilClass</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parses a javax/management/remote/rmi/RMIServer_Stub#newClient() return value to find out the remote reference information.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>return_value</span>
<span class='type'>(<tt>Rex::Java::Serialization::Model::ReturnValue</tt>)</span>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Hash</tt>, <tt>NilClass</tt>)</span>
&mdash;
<div class='inline'>
<p>The remote interface information if success, nil otherwise</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
17
18
19
20
21
22
23
24
25
26
27
28
29
30</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/jmx/server/parser.rb', line 17</span>
<span class='kw'>def</span> <span class='id identifier rubyid_parse_jmx_new_client_endpoint'>parse_jmx_new_client_endpoint</span><span class='lparen'>(</span><span class='id identifier rubyid_return_value'>return_value</span><span class='rparen'>)</span>
<span class='id identifier rubyid_values_size'>values_size</span> <span class='op'>=</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
<span class='id identifier rubyid_end_point_block_data'>end_point_block_data</span> <span class='op'>=</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lbracket'>[</span><span class='id identifier rubyid_values_size'>values_size</span> <span class='op'>-</span> <span class='int'>2</span><span class='rbracket'>]</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_end_point_block_data'>end_point_block_data</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>BlockData</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_return_io'>return_io</span> <span class='op'>=</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_end_point_block_data'>end_point_block_data</span><span class='period'>.</span><span class='id identifier rubyid_contents'>contents</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>rb</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_reference'>reference</span> <span class='op'>=</span> <span class='id identifier rubyid_extract_reference'>extract_reference</span><span class='lparen'>(</span><span class='id identifier rubyid_return_io'>return_io</span><span class='rparen'>)</span>
<span class='id identifier rubyid_reference'>reference</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:02:49 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>
@@ -0,0 +1,702 @@
<!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::Registry
&mdash; 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::Registry";
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 (R)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span>
&raquo;
<span class="title">Registry</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::Registry
</h1>
<div class="box_info">
<dl>
<dt>Includes:</dt>
<dd><span class='object_link'><a href="Registry/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Builder (module)">Builder</a></span>, <span class='object_link'><a href="Registry/Parser.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Parser (module)">Parser</a></span></dd>
</dl>
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Msf::Exploit::Remote::Java::Rmi::Client</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/client/registry.rb<span class="defines">,<br />
lib/msf/core/exploit/remote/java/rmi/client/registry/parser.rb,<br /> lib/msf/core/exploit/remote/java/rmi/client/registry/builder.rb</span>
</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>This mixin provides methods to simulate calls to the Java java/rmi/registry/RegistryImpl_Stub interface</p>
</div>
</div>
<div class="tags">
</div><h2>Defined Under Namespace</h2>
<p class="children">
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Registry/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Builder (module)">Builder</a></span>, <span class='object_link'><a href="Registry/Parser.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Parser (module)">Parser</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="#registry_interface_hash-instance_method" title="#registry_interface_hash (instance method)">#<strong>registry_interface_hash</strong> &#x21d2; Integer </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Calculates the hash to make RMI calls for the java/rmi/registry/RegistryImpl_Stub interface.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#send_registry_list-instance_method" title="#send_registry_list (instance method)">#<strong>send_registry_list</strong>(opts = {}) &#x21d2; Array, NilClass </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Sends a Registry list call to the RMI endpoint.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#send_registry_lookup-instance_method" title="#send_registry_lookup (instance method)">#<strong>send_registry_lookup</strong>(opts = {}) &#x21d2; Hash, NilClass </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Sends a Registry lookup call to the RMI endpoint.</p>
</div></span>
</li>
</ul>
<h3 class="inherited">Methods included from <span class='object_link'><a href="Registry/Parser.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Parser (module)">Parser</a></span></h3>
<p class="inherited"><span class='object_link'><a href="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="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="Registry/Builder.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry::Builder (module)">Builder</a></span></h3>
<p class="inherited"><span class='object_link'><a href="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="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>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="registry_interface_hash-instance_method">
#<strong>registry_interface_hash</strong> &#x21d2; <tt>Integer</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Calculates the hash to make RMI calls for the java/rmi/registry/RegistryImpl_Stub interface</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Integer</tt>)</span>
&mdash;
<div class='inline'>
<p>The interface's hash</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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/registry.rb', line 92</span>
<span class='kw'>def</span> <span class='id identifier rubyid_registry_interface_hash'>registry_interface_hash</span>
<span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='id identifier rubyid_calculate_interface_hash'>calculate_interface_hash</span><span class='lparen'>(</span>
<span class='lbracket'>[</span>
<span class='lbrace'>{</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>bind</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>descriptor:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>(Ljava/lang/String;Ljava/rmi/Remote;)V</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>exceptions:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.AccessException</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.AlreadyBoundException</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.RemoteException</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='rbrace'>}</span><span class='comma'>,</span>
<span class='lbrace'>{</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>list</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>descriptor:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>()[Ljava/lang/String;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>exceptions:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.AccessException</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.RemoteException</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='rbrace'>}</span><span class='comma'>,</span>
<span class='lbrace'>{</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>lookup</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>descriptor:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>(Ljava/lang/String;)Ljava/rmi/Remote;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>exceptions:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.AccessException</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.NotBoundException</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.RemoteException</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='rbrace'>}</span><span class='comma'>,</span>
<span class='lbrace'>{</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>rebind</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>descriptor:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>(Ljava/lang/String;Ljava/rmi/Remote;)V</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>exceptions:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.AccessException</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.RemoteException</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='rbrace'>}</span><span class='comma'>,</span>
<span class='lbrace'>{</span>
<span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>unbind</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>descriptor:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>(Ljava/lang/String;)V</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>exceptions:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.AccessException</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.NotBoundException</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.rmi.RemoteException</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='rbrace'>}</span>
<span class='rbracket'>]</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_hash'>hash</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="send_registry_list-instance_method">
#<strong>send_registry_list</strong>(opts = {}) &#x21d2; <tt>Array</tt>, <tt>NilClass</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Sends a Registry list call to the RMI endpoint. Simulates a call to the Java java/rmi/registry/RegistryImpl_Stub#list() method</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>Array</tt>, <tt>NilClass</tt>)</span>
&mdash;
<div class='inline'>
<p>The set of names if success, nil otherwise</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../../../../../../Rex/Proto/Rmi/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Rex::Proto::Rmi::Exception</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the endpoint raises a remote exception</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Msf::Exploit::Remote::Java::Rmi::Client::Registry::Builder.build_registry_list</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/registry.rb', line 65</span>
<span class='kw'>def</span> <span class='id identifier rubyid_send_registry_list'>send_registry_list</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_send_call'>send_call</span><span class='lparen'>(</span>
<span class='label'>sock:</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='comma'>,</span>
<span class='label'>call:</span> <span class='id identifier rubyid_build_registry_list'>build_registry_list</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_return_value'>return_value</span> <span class='op'>=</span> <span class='id identifier rubyid_recv_return'>recv_return</span><span class='lparen'>(</span>
<span class='label'>sock:</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='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_is_exception?'>is_exception?</span>
<span class='id identifier rubyid_raise'>raise</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/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Exception</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_get_class_name'>get_class_name</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_registry_list'>parse_registry_list</span><span class='lparen'>(</span><span class='id identifier rubyid_return_value'>return_value</span><span class='rparen'>)</span>
<span class='id identifier rubyid_names'>names</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="send_registry_lookup-instance_method">
#<strong>send_registry_lookup</strong>(opts = {}) &#x21d2; <tt>Hash</tt>, <tt>NilClass</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Sends a Registry lookup call to the RMI endpoint. Simulates a call to the Java java/rmi/registry/RegistryImpl_Stub#lookup() method.</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>Hash</tt>, <tt>NilClass</tt>)</span>
&mdash;
<div class='inline'>
<p>The remote reference information if success, nil otherwise</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../../../../../../Rex/Proto/Rmi/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Rex::Proto::Rmi::Exception</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the endpoint raises a remote exception</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Msf::Exploit::Remote::Java::Rmi::Client::Registry::Builder.build_registry_lookup</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/registry.rb', line 24</span>
<span class='kw'>def</span> <span class='id identifier rubyid_send_registry_lookup'>send_registry_lookup</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_send_call'>send_call</span><span class='lparen'>(</span>
<span class='label'>sock:</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='comma'>,</span>
<span class='label'>call:</span> <span class='id identifier rubyid_build_registry_lookup'>build_registry_lookup</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_return_value'>return_value</span> <span class='op'>=</span> <span class='id identifier rubyid_recv_return'>recv_return</span><span class='lparen'>(</span>
<span class='label'>sock:</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='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_is_exception?'>is_exception?</span>
<span class='id identifier rubyid_raise'>raise</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/Exception.html" title="Rex::Proto::Rmi::Exception (class)">Exception</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_get_class_name'>get_class_name</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_remote_object'>remote_object</span> <span class='op'>=</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_get_class_name'>get_class_name</span>
<span class='kw'>if</span> <span class='id identifier rubyid_remote_object'>remote_object</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_remote_location'>remote_location</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_registry_lookup_endpoint'>parse_registry_lookup_endpoint</span><span class='lparen'>(</span><span class='id identifier rubyid_return_value'>return_value</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_remote_location'>remote_location</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_remote_location'>remote_location</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='label'>object:</span> <span class='id identifier rubyid_remote_object'>remote_object</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:38 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>
@@ -0,0 +1,415 @@
<!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::Registry::Builder
&mdash; 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::Registry::Builder";
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 (B)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Registry.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry (module)">Registry</a></span></span>
&raquo;
<span class="title">Builder</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::Registry::Builder
</h1>
<div class="box_info">
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="../Registry.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry (module)">Msf::Exploit::Remote::Java::Rmi::Client::Registry</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/client/registry/builder.rb</dd>
</dl>
</div>
<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="#build_registry_list-instance_method" title="#build_registry_list (instance method)">#<strong>build_registry_list</strong>(opts = {}) &#x21d2; Rex::Proto::Rmi::Model::Call </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds an RMI call to java/rmi/registry/RegistryImpl_Stub#list() used to enumerate the names bound in a registry.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#build_registry_lookup-instance_method" title="#build_registry_lookup (instance method)">#<strong>build_registry_lookup</strong>(opts = {}) &#x21d2; Rex::Proto::Rmi::Model::Call </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds an RMI call to java/rmi/registry/RegistryImpl_Stub#lookup() used to retrieve the remote reference bound to a name.</p>
</div></span>
</li>
</ul>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="build_registry_list-instance_method">
#<strong>build_registry_list</strong>(opts = {}) &#x21d2; <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>
</h3><div class="docstring">
<div class="discussion">
<p>Builds an RMI call to java/rmi/registry/RegistryImpl_Stub#list() used to enumerate the names bound in a registry</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">Returns:</p>
<ul class="return">
<li>
<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>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Builder.build_call</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/registry/builder.rb', line 45</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_registry_list'>build_registry_list</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_object_number'>object_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:object_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_number'>uid_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_time'>uid_time</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_time</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_count'>uid_count</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_count</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_call'>call</span> <span class='op'>=</span> <span class='id identifier rubyid_build_call'>build_call</span><span class='lparen'>(</span>
<span class='label'>object_number:</span> <span class='id identifier rubyid_object_number'>object_number</span><span class='comma'>,</span>
<span class='label'>uid_number:</span> <span class='id identifier rubyid_uid_number'>uid_number</span><span class='comma'>,</span>
<span class='label'>uid_time:</span> <span class='id identifier rubyid_uid_time'>uid_time</span><span class='comma'>,</span>
<span class='label'>uid_count:</span> <span class='id identifier rubyid_uid_count'>uid_count</span><span class='comma'>,</span>
<span class='label'>operation:</span> <span class='int'>1</span><span class='comma'>,</span> <span class='comment'># java.lang.String list()[]
</span> <span class='label'>hash:</span> <span class='id identifier rubyid_registry_interface_hash'>registry_interface_hash</span><span class='comma'>,</span>
<span class='label'>arguments:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_call'>call</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="build_registry_lookup-instance_method">
#<strong>build_registry_lookup</strong>(opts = {}) &#x21d2; <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>
</h3><div class="docstring">
<div class="discussion">
<p>Builds an RMI call to java/rmi/registry/RegistryImpl_Stub#lookup() used to retrieve the remote reference bound to a name.</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">:name</span>
<span class="type">(<tt>String</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>the name to lookup</p>
</div>
</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/Call.html" title="Rex::Proto::Rmi::Model::Call (class)">Rex::Proto::Rmi::Model::Call</a></span></tt>)</span>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Builder.build_call</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/registry/builder.rb', line 19</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_registry_lookup'>build_registry_lookup</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_object_number'>object_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:object_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_number'>uid_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_number</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_time'>uid_time</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_time</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_uid_count'>uid_count</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uid_count</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_call'>call</span> <span class='op'>=</span> <span class='id identifier rubyid_build_call'>build_call</span><span class='lparen'>(</span>
<span class='label'>object_number:</span> <span class='id identifier rubyid_object_number'>object_number</span><span class='comma'>,</span>
<span class='label'>uid_number:</span> <span class='id identifier rubyid_uid_number'>uid_number</span><span class='comma'>,</span>
<span class='label'>uid_time:</span> <span class='id identifier rubyid_uid_time'>uid_time</span><span class='comma'>,</span>
<span class='label'>uid_count:</span> <span class='id identifier rubyid_uid_count'>uid_count</span><span class='comma'>,</span>
<span class='label'>operation:</span> <span class='int'>2</span><span class='comma'>,</span> <span class='comment'># java.rmi.Remote lookup(java.lang.String)
</span> <span class='label'>hash:</span> <span class='id identifier rubyid_registry_interface_hash'>registry_interface_hash</span><span class='comma'>,</span>
<span class='label'>arguments:</span> <span class='lbracket'>[</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='rbracket'>]</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_call'>call</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:02:49 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>
@@ -0,0 +1,359 @@
<!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::Registry::Parser
&mdash; 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::Registry::Parser";
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 (P)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Registry.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry (module)">Registry</a></span></span>
&raquo;
<span class="title">Parser</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::Registry::Parser
</h1>
<div class="box_info">
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="../Registry.html" title="Msf::Exploit::Remote::Java::Rmi::Client::Registry (module)">Msf::Exploit::Remote::Java::Rmi::Client::Registry</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/client/registry/parser.rb</dd>
</dl>
</div>
<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="#parse_registry_list-instance_method" title="#parse_registry_list (instance method)">#<strong>parse_registry_list</strong>(return_value) &#x21d2; Array, NilClass </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parses a java/rmi/registry/RegistryImpl_Stub#list() return value to find out the list of names registered.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parse_registry_lookup_endpoint-instance_method" title="#parse_registry_lookup_endpoint (instance method)">#<strong>parse_registry_lookup_endpoint</strong>(return_value) &#x21d2; Hash, NilClass </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parses a java/rmi/registry/RegistryImpl_Stub#lookup() return value to find out the remote reference information.</p>
</div></span>
</li>
</ul>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="parse_registry_list-instance_method">
#<strong>parse_registry_list</strong>(return_value) &#x21d2; <tt>Array</tt>, <tt>NilClass</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parses a java/rmi/registry/RegistryImpl_Stub#list() return value to find out the list of names registered.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>return_value</span>
<span class='type'>(<tt>Rex::Java::Serialization::Model::ReturnValue</tt>)</span>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array</tt>, <tt>NilClass</tt>)</span>
&mdash;
<div class='inline'>
<p>The list of names registered if success, nil otherwise</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
35
36
37
38
39
40
41
42
43
44
45</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/registry/parser.rb', line 35</span>
<span class='kw'>def</span> <span class='id identifier rubyid_parse_registry_list'>parse_registry_list</span><span class='lparen'>(</span><span class='id identifier rubyid_return_value'>return_value</span><span class='rparen'>)</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>NewArray</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>java.lang.String;</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_val'>val</span><span class='op'>|</span> <span class='id identifier rubyid_val'>val</span><span class='period'>.</span><span class='id identifier rubyid_contents'>contents</span> <span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="parse_registry_lookup_endpoint-instance_method">
#<strong>parse_registry_lookup_endpoint</strong>(return_value) &#x21d2; <tt>Hash</tt>, <tt>NilClass</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parses a java/rmi/registry/RegistryImpl_Stub#lookup() return value to find out the remote reference information.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>return_value</span>
<span class='type'>(<tt>Rex::Java::Serialization::Model::ReturnValue</tt>)</span>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Hash</tt>, <tt>NilClass</tt>)</span>
&mdash;
<div class='inline'>
<p>The remote interface information if success, nil otherwise</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
16
17
18
19
20
21
22
23
24
25
26
27
28</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/client/registry/parser.rb', line 16</span>
<span class='kw'>def</span> <span class='id identifier rubyid_parse_registry_lookup_endpoint'>parse_registry_lookup_endpoint</span><span class='lparen'>(</span><span class='id identifier rubyid_return_value'>return_value</span><span class='rparen'>)</span>
<span class='id identifier rubyid_values_size'>values_size</span> <span class='op'>=</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
<span class='id identifier rubyid_end_point_block_data'>end_point_block_data</span> <span class='op'>=</span> <span class='id identifier rubyid_return_value'>return_value</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lbracket'>[</span><span class='id identifier rubyid_values_size'>values_size</span> <span class='op'>-</span> <span class='int'>2</span><span class='rbracket'>]</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_end_point_block_data'>end_point_block_data</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>BlockData</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_return_io'>return_io</span> <span class='op'>=</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_end_point_block_data'>end_point_block_data</span><span class='period'>.</span><span class='id identifier rubyid_contents'>contents</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>rb</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_reference'>reference</span> <span class='op'>=</span> <span class='id identifier rubyid_extract_reference'>extract_reference</span><span class='lparen'>(</span><span class='id identifier rubyid_return_io'>return_io</span><span class='rparen'>)</span>
<span class='id identifier rubyid_reference'>reference</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:02:48 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>
+1098
View File
@@ -0,0 +1,1098 @@
<!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::Util
&mdash; 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::Util";
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 (U)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Java.html" title="Msf::Exploit::Remote::Java (module)">Java</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Rmi.html" title="Msf::Exploit::Remote::Java::Rmi (module)">Rmi</a></span></span>
&raquo;
<span class="title">Util</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::Util
</h1>
<div class="box_info">
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="Client.html" title="Msf::Exploit::Remote::Java::Rmi::Client (module)">Client</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/java/rmi/util.rb</dd>
</dl>
</div>
<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="#calculate_interface_hash-instance_method" title="#calculate_interface_hash (instance method)">#<strong>calculate_interface_hash</strong>(methods) &#x21d2; Integer </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Calculates an interface hash to make RMI calls as defined by the JDK 1.1.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#calculate_method_hash-instance_method" title="#calculate_method_hash (instance method)">#<strong>calculate_method_hash</strong>(signature) &#x21d2; Integer </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Calculates a method hash to make RMI calls as defined by the JDK 1.2.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#extract_byte-instance_method" title="#extract_byte (instance method)">#<strong>extract_byte</strong>(io) &#x21d2; Byte<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Extracts a byte from an IO.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#extract_int-instance_method" title="#extract_int (instance method)">#<strong>extract_int</strong>(io) &#x21d2; Integer<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Extracts an int from an IO.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#extract_long-instance_method" title="#extract_long (instance method)">#<strong>extract_long</strong>(io) &#x21d2; Integer<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Extracts a long from an IO.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#extract_reference-instance_method" title="#extract_reference (instance method)">#<strong>extract_reference</strong>(io) &#x21d2; Hash<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Extract an RMI interface reference from an IO.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#extract_string-instance_method" title="#extract_string (instance method)">#<strong>extract_string</strong>(io) &#x21d2; String<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Extracts an string from an IO.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#register_common_rmi_ports_and_services-instance_method" title="#register_common_rmi_ports_and_services (instance method)">#<strong>register_common_rmi_ports_and_services</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Register ports and services for autofilter support.</p>
</div></span>
</li>
</ul>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="calculate_interface_hash-instance_method">
#<strong>calculate_interface_hash</strong>(methods) &#x21d2; <tt>Integer</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Calculates an interface hash to make RMI calls as defined by the JDK 1.1</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>methods</span>
<span class='type'>(<tt>Array</tt>)</span>
&mdash;
<div class='inline'>
<p>set of method names and their descriptors</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Integer</tt>)</span>
&mdash;
<div class='inline'>
<p>The interface hash</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li><a href="http://docs.oracle.com/javase/8/docs/platform/rmi/spec/rmi-stubs24.html" target="_parent" title="The RemoteRef Interface documentation to understand how interface hashes are calculated">The RemoteRef Interface documentation to understand how interface hashes are calculated</a></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/util.rb', line 29</span>
<span class='kw'>def</span> <span class='id identifier rubyid_calculate_interface_hash'>calculate_interface_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_methods'>methods</span><span class='rparen'>)</span>
<span class='id identifier rubyid_stream'>stream</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_pack'>pack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>N</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='comment'># stub version number
</span>
<span class='id identifier rubyid_methods'>methods</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span>
<span class='id identifier rubyid_utf_method'>utf_method</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_m'>m</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='id identifier rubyid_utf_descriptor'>utf_descriptor</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_m'>m</span><span class='lbracket'>[</span><span class='symbol'>:descriptor</span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_utf_method'>utf_method</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span>
<span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_utf_descriptor'>utf_descriptor</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span>
<span class='id identifier rubyid_m'>m</span><span class='lbracket'>[</span><span class='symbol'>:exceptions</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_e'>e</span><span class='op'>|</span>
<span class='id identifier rubyid_utf_exception'>utf_exception</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span>
<span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_utf_exception'>utf_exception</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_sha1'>sha1</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'>Text</span><span class='period'>.</span><span class='id identifier rubyid_sha1_raw'>sha1_raw</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span>
<span class='id identifier rubyid_sha1'>sha1</span><span class='period'>.</span><span class='id identifier rubyid_unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Q&lt;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="calculate_method_hash-instance_method">
#<strong>calculate_method_hash</strong>(signature) &#x21d2; <tt>Integer</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Calculates a method hash to make RMI calls as defined by the JDK 1.2</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>signature</span>
<span class='type'>(<tt>String</tt>)</span>
&mdash;
<div class='inline'>
<p>The remote method signature as specified by the JDK 1.2, method name + method descriptor (as explained in the Java Virtual Machine Specification)</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Integer</tt>)</span>
&mdash;
<div class='inline'>
<p>The method hash</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li><a href="http://docs.oracle.com/javase/8/docs/platform/rmi/spec/rmi-stubs24.html" target="_parent" title="The RemoteRef Interface documentation to understand how method hashes are calculated">The RemoteRef Interface documentation to understand how method hashes are calculated</a></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
17
18
19
20
21
22</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/util.rb', line 17</span>
<span class='kw'>def</span> <span class='id identifier rubyid_calculate_method_hash'>calculate_method_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_signature'>signature</span><span class='rparen'>)</span>
<span class='id identifier rubyid_utf'>utf</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'>Java</span><span class='op'>::</span><span class='const'>Serialization</span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Utf</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_signature'>signature</span><span class='rparen'>)</span>
<span class='id identifier rubyid_sha1'>sha1</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'>Text</span><span class='period'>.</span><span class='id identifier rubyid_sha1_raw'>sha1_raw</span><span class='lparen'>(</span><span class='id identifier rubyid_utf'>utf</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='rparen'>)</span>
<span class='id identifier rubyid_sha1'>sha1</span><span class='period'>.</span><span class='id identifier rubyid_unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Q&lt;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="extract_byte-instance_method">
#<strong>extract_byte</strong>(io) &#x21d2; <tt>Byte</tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>Extracts a byte from an IO</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>io</span>
<span class='type'>(<tt>IO</tt>)</span>
&mdash;
<div class='inline'>
<p>the io to extract the byte from</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Byte</tt>, <tt>nil</tt>)</span>
&mdash;
<div class='inline'>
<p>the extracted byte if success, nil otherwise</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
86
87
88
89
90
91
92
93
94
95</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/util.rb', line 86</span>
<span class='kw'>def</span> <span class='id identifier rubyid_extract_byte'>extract_byte</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
<span class='id identifier rubyid_byte_raw'>byte_raw</span> <span class='op'>=</span> <span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='int'>1</span><span class='rparen'>)</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_byte_raw'>byte_raw</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_byte_raw'>byte_raw</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>1</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_byte'>byte</span> <span class='op'>=</span> <span class='id identifier rubyid_byte_raw'>byte_raw</span><span class='period'>.</span><span class='id identifier rubyid_unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>C</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_byte'>byte</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="extract_int-instance_method">
#<strong>extract_int</strong>(io) &#x21d2; <tt>Integer</tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>Extracts an int from an IO</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>io</span>
<span class='type'>(<tt>IO</tt>)</span>
&mdash;
<div class='inline'>
<p>the io to extract the int from</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Integer</tt>, <tt>nil</tt>)</span>
&mdash;
<div class='inline'>
<p>the extracted int if success, nil otherwise</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
72
73
74
75
76
77
78
79
80</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/util.rb', line 72</span>
<span class='kw'>def</span> <span class='id identifier rubyid_extract_int'>extract_int</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
<span class='id identifier rubyid_int_raw'>int_raw</span> <span class='op'>=</span> <span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='int'>4</span><span class='rparen'>)</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_int_raw'>int_raw</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_int_raw'>int_raw</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>4</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_int'>int</span> <span class='op'>=</span> <span class='id identifier rubyid_int_raw'>int_raw</span><span class='period'>.</span><span class='id identifier rubyid_unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>l&gt;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_int'>int</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="extract_long-instance_method">
#<strong>extract_long</strong>(io) &#x21d2; <tt>Integer</tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>Extracts a long from an IO</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>io</span>
<span class='type'>(<tt>IO</tt>)</span>
&mdash;
<div class='inline'>
<p>the io to extract the long from</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Integer</tt>, <tt>nil</tt>)</span>
&mdash;
<div class='inline'>
<p>the extracted int if success, nil otherwise</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
101
102
103
104
105
106
107
108
109</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/util.rb', line 101</span>
<span class='kw'>def</span> <span class='id identifier rubyid_extract_long'>extract_long</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
<span class='id identifier rubyid_int_raw'>int_raw</span> <span class='op'>=</span> <span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='int'>8</span><span class='rparen'>)</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_int_raw'>int_raw</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_int_raw'>int_raw</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>8</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_int'>int</span> <span class='op'>=</span> <span class='id identifier rubyid_int_raw'>int_raw</span><span class='period'>.</span><span class='id identifier rubyid_unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>q&gt;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_int'>int</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="extract_reference-instance_method">
#<strong>extract_reference</strong>(io) &#x21d2; <tt>Hash</tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>Extract an RMI interface reference from an IO</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>io</span>
<span class='type'>(<tt>IO</tt>)</span>
&mdash;
<div class='inline'>
<p>the io to extract the reference from, should contain the data inside a BlockData with the reference information.</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Hash</tt>, <tt>nil</tt>)</span>
&mdash;
<div class='inline'>
<p>the extracted reference if success, nil otherwise</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Client::Jmx:Server::Parser#parse_jmx_new_client_endpoint</li>
<li><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)">Client::Registry::Parser#parse_registry_lookup_endpoint</a></span></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/util.rb', line 118</span>
<span class='kw'>def</span> <span class='id identifier rubyid_extract_reference'>extract_reference</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
<span class='id identifier rubyid_ref'>ref</span> <span class='op'>=</span> <span class='id identifier rubyid_extract_string'>extract_string</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_ref'>ref</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='id identifier rubyid_ref'>ref</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>UnicastRef</span><span class='tstring_end'>&#39;</span></span> <span class='op'>||</span> <span class='id identifier rubyid_ref'>ref</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>UnicastRef2</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_ref'>ref</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>UnicastRef2</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_form'>form</span> <span class='op'>=</span> <span class='id identifier rubyid_extract_byte'>extract_byte</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_form'>form</span> <span class='op'>==</span> <span class='int'>0</span> <span class='op'>||</span> <span class='id identifier rubyid_form'>form</span> <span class='op'>==</span> <span class='int'>1</span> <span class='comment'># FORMAT_HOST_PORT or FORMAT_HOST_PORT_FACTORY
</span> <span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_address'>address</span> <span class='op'>=</span> <span class='id identifier rubyid_extract_string'>extract_string</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_address'>address</span>
<span class='id identifier rubyid_port'>port</span> <span class='op'>=</span> <span class='id identifier rubyid_extract_int'>extract_int</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_port'>port</span>
<span class='id identifier rubyid_object_number'>object_number</span> <span class='op'>=</span> <span class='id identifier rubyid_extract_long'>extract_long</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
<span class='id identifier rubyid_uid'>uid</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/UniqueIdentifier.html" title="Rex::Proto::Rmi::Model::UniqueIdentifier (class)">UniqueIdentifier</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='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
<span class='lbrace'>{</span><span class='label'>address:</span> <span class='id identifier rubyid_address'>address</span><span class='comma'>,</span> <span class='label'>port:</span> <span class='id identifier rubyid_port'>port</span><span class='comma'>,</span> <span class='label'>object_number:</span> <span class='id identifier rubyid_object_number'>object_number</span><span class='comma'>,</span> <span class='label'>uid:</span> <span class='id identifier rubyid_uid'>uid</span><span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="extract_string-instance_method">
#<strong>extract_string</strong>(io) &#x21d2; <tt>String</tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>Extracts an string from an IO</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>io</span>
<span class='type'>(<tt>IO</tt>)</span>
&mdash;
<div class='inline'>
<p>the io to extract the string from</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
&mdash;
<div class='inline'>
<p>the extracted string if success, nil otherwise</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
53
54
55
56
57
58
59
60
61
62
63
64
65
66</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/util.rb', line 53</span>
<span class='kw'>def</span> <span class='id identifier rubyid_extract_string'>extract_string</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
<span class='id identifier rubyid_raw_length'>raw_length</span> <span class='op'>=</span> <span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='int'>2</span><span class='rparen'>)</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_raw_length'>raw_length</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_raw_length'>raw_length</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>2</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_length'>length</span> <span class='op'>=</span> <span class='id identifier rubyid_raw_length'>raw_length</span><span class='period'>.</span><span class='id identifier rubyid_unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>s&gt;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_string'>string</span> <span class='op'>=</span> <span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_length'>length</span><span class='rparen'>)</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_string'>string</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='id identifier rubyid_length'>length</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_string'>string</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="register_common_rmi_ports_and_services-instance_method">
#<strong>register_common_rmi_ports_and_services</strong> &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Register ports and services for autofilter support</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
147
148
149
150
151
152
153
154
155
156
157
158</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/java/rmi/util.rb', line 147</span>
<span class='kw'>def</span> <span class='id identifier rubyid_register_common_rmi_ports_and_services'>register_common_rmi_ports_and_services</span>
<span class='id identifier rubyid_register_autofilter_ports'>register_autofilter_ports</span><span class='lparen'>(</span><span class='lbracket'>[</span>
<span class='int'>999</span><span class='comma'>,</span> <span class='int'>1090</span><span class='comma'>,</span> <span class='int'>1098</span><span class='comma'>,</span> <span class='int'>1099</span><span class='comma'>,</span> <span class='int'>1100</span><span class='comma'>,</span> <span class='int'>1101</span><span class='comma'>,</span> <span class='int'>1102</span><span class='comma'>,</span> <span class='int'>1103</span><span class='comma'>,</span> <span class='int'>1129</span><span class='comma'>,</span> <span class='int'>1030</span><span class='comma'>,</span> <span class='int'>1035</span><span class='comma'>,</span> <span class='int'>1199</span><span class='comma'>,</span> <span class='int'>1234</span><span class='comma'>,</span> <span class='int'>1440</span><span class='comma'>,</span> <span class='int'>3273</span><span class='comma'>,</span> <span class='int'>3333</span><span class='comma'>,</span> <span class='int'>3900</span><span class='comma'>,</span>
<span class='int'>2199</span><span class='comma'>,</span> <span class='int'>2809</span><span class='comma'>,</span> <span class='int'>5520</span><span class='comma'>,</span> <span class='int'>5580</span><span class='comma'>,</span> <span class='int'>5521</span><span class='comma'>,</span> <span class='int'>5999</span><span class='comma'>,</span> <span class='int'>6060</span><span class='comma'>,</span> <span class='int'>6789</span><span class='comma'>,</span> <span class='int'>6996</span><span class='comma'>,</span> <span class='int'>7700</span><span class='comma'>,</span> <span class='int'>7800</span><span class='comma'>,</span> <span class='int'>7878</span><span class='comma'>,</span> <span class='int'>7890</span><span class='comma'>,</span> <span class='int'>7801</span><span class='comma'>,</span> <span class='int'>8050</span><span class='comma'>,</span> <span class='int'>8051</span><span class='comma'>,</span> <span class='int'>8085</span><span class='comma'>,</span>
<span class='int'>8091</span><span class='comma'>,</span> <span class='int'>8205</span><span class='comma'>,</span> <span class='int'>8303</span><span class='comma'>,</span> <span class='int'>8642</span><span class='comma'>,</span> <span class='int'>8701</span><span class='comma'>,</span> <span class='int'>8686</span><span class='comma'>,</span> <span class='int'>8888</span><span class='comma'>,</span> <span class='int'>8889</span><span class='comma'>,</span> <span class='int'>8890</span><span class='comma'>,</span> <span class='int'>8901</span><span class='comma'>,</span> <span class='int'>8902</span><span class='comma'>,</span> <span class='int'>8903</span><span class='comma'>,</span> <span class='int'>8999</span><span class='comma'>,</span> <span class='int'>9001</span><span class='comma'>,</span> <span class='int'>9003</span><span class='comma'>,</span> <span class='int'>9004</span><span class='comma'>,</span> <span class='int'>9005</span><span class='comma'>,</span>
<span class='int'>9050</span><span class='comma'>,</span> <span class='int'>9090</span><span class='comma'>,</span> <span class='int'>9099</span><span class='comma'>,</span> <span class='int'>9300</span><span class='comma'>,</span> <span class='int'>9500</span><span class='comma'>,</span> <span class='int'>9711</span><span class='comma'>,</span> <span class='int'>9809</span><span class='comma'>,</span> <span class='int'>9810</span><span class='comma'>,</span> <span class='int'>9811</span><span class='comma'>,</span> <span class='int'>9812</span><span class='comma'>,</span> <span class='int'>9813</span><span class='comma'>,</span> <span class='int'>9814</span><span class='comma'>,</span> <span class='int'>9815</span><span class='comma'>,</span> <span class='int'>9875</span><span class='comma'>,</span> <span class='int'>9910</span><span class='comma'>,</span> <span class='int'>9991</span><span class='comma'>,</span> <span class='int'>9999</span><span class='comma'>,</span>
<span class='int'>10001</span><span class='comma'>,</span> <span class='int'>10162</span><span class='comma'>,</span> <span class='int'>10098</span><span class='comma'>,</span> <span class='int'>10099</span><span class='comma'>,</span> <span class='int'>11001</span><span class='comma'>,</span> <span class='int'>11099</span><span class='comma'>,</span> <span class='int'>11333</span><span class='comma'>,</span> <span class='int'>12000</span><span class='comma'>,</span> <span class='int'>13013</span><span class='comma'>,</span> <span class='int'>14000</span><span class='comma'>,</span> <span class='int'>15000</span><span class='comma'>,</span> <span class='int'>15001</span><span class='comma'>,</span> <span class='int'>15200</span><span class='comma'>,</span> <span class='int'>16000</span><span class='comma'>,</span>
<span class='int'>17200</span><span class='comma'>,</span> <span class='int'>18980</span><span class='comma'>,</span> <span class='int'>20000</span><span class='comma'>,</span> <span class='int'>23791</span><span class='comma'>,</span> <span class='int'>26256</span><span class='comma'>,</span> <span class='int'>31099</span><span class='comma'>,</span> <span class='int'>33000</span><span class='comma'>,</span> <span class='int'>32913</span><span class='comma'>,</span> <span class='int'>37718</span><span class='comma'>,</span> <span class='int'>45230</span><span class='comma'>,</span> <span class='int'>47001</span><span class='comma'>,</span> <span class='int'>47002</span><span class='comma'>,</span> <span class='int'>50050</span><span class='comma'>,</span> <span class='int'>50500</span><span class='comma'>,</span>
<span class='int'>50501</span><span class='comma'>,</span> <span class='int'>50502</span><span class='comma'>,</span> <span class='int'>50503</span><span class='comma'>,</span> <span class='int'>50504</span>
<span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='id identifier rubyid_register_autofilter_services'>register_autofilter_services</span><span class='lparen'>(</span><span class='words_beg'>%W{</span><span class='words_sep'> </span><span class='tstring_content'>rmi</span><span class='words_sep'> </span><span class='tstring_content'>rmid</span><span class='words_sep'> </span><span class='tstring_content'>java-rmi</span><span class='words_sep'> </span><span class='tstring_content'>rmiregistry</span><span class='words_sep'> </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:09 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>