Files
metasploit-gs/api/Msf/Exploit/Remote/Java/Rmi/Client/Jmx/Server.html
T

359 lines
12 KiB
HTML
Raw Normal View History

2026-05-08 17:08:43 +00:00
<!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>