691 lines
24 KiB
HTML
691 lines
24 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>
|
|
Class: Msf::Exploit::Remote::Relay::NTLM::Target::MSSQL::Client
|
|
|
|
— Documentation by YARD 0.9.37
|
|
|
|
</title>
|
|
|
|
<link rel="stylesheet" href="../../../../../../../css/style.css" type="text/css" />
|
|
|
|
<link rel="stylesheet" href="../../../../../../../css/common.css" type="text/css" />
|
|
|
|
<script type="text/javascript">
|
|
pathId = "Msf::Exploit::Remote::Relay::NTLM::Target::MSSQL::Client";
|
|
relpath = '../../../../../../../';
|
|
</script>
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8" src="../../../../../../../js/jquery.js"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8" src="../../../../../../../js/app.js"></script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<div class="nav_wrap">
|
|
<iframe id="nav" src="../../../../../../../class_list.html?1"></iframe>
|
|
<div id="resizer"></div>
|
|
</div>
|
|
|
|
<div id="main" tabindex="-1">
|
|
<div id="header">
|
|
<div id="menu">
|
|
|
|
<a href="../../../../../../../_index.html">Index (C)</a> »
|
|
<span class='title'><span class='object_link'><a href="../../../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> » <span class='title'><span class='object_link'><a href="../../../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> » <span class='title'><span class='object_link'><a href="../../../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> » <span class='title'><span class='object_link'><a href="../../../../Relay.html" title="Msf::Exploit::Remote::Relay (module)">Relay</a></span></span> » <span class='title'>NTLM</span> » <span class='title'>Target</span> » <span class='title'><span class='object_link'><a href="../MSSQL.html" title="Msf::Exploit::Remote::Relay::NTLM::Target::MSSQL (module)">MSSQL</a></span></span>
|
|
»
|
|
<span class="title">Client</span>
|
|
|
|
</div>
|
|
|
|
<div id="search">
|
|
|
|
<a class="full_list_link" id="class_list_link"
|
|
href="../../../../../../../class_list.html">
|
|
|
|
<svg width="24" height="24">
|
|
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
</svg>
|
|
</a>
|
|
|
|
</div>
|
|
<div class="clear"></div>
|
|
</div>
|
|
|
|
<div id="content"><h1>Class: Msf::Exploit::Remote::Relay::NTLM::Target::MSSQL::Client
|
|
|
|
|
|
|
|
</h1>
|
|
<div class="box_info">
|
|
|
|
<dl>
|
|
<dt>Inherits:</dt>
|
|
<dd>
|
|
<span class="inheritName">Rex::Proto::MSSQL::Client</span>
|
|
|
|
<ul class="fullTree">
|
|
<li>Object</li>
|
|
|
|
<li class="next">Rex::Proto::MSSQL::Client</li>
|
|
|
|
<li class="next">Msf::Exploit::Remote::Relay::NTLM::Target::MSSQL::Client</li>
|
|
|
|
</ul>
|
|
<a href="#" class="inheritanceTree">show all</a>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Defined in:</dt>
|
|
<dd>lib/msf/core/exploit/remote/relay/ntlm/target/mssql/client.rb</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
<ul class="summary">
|
|
|
|
<li class="protected ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#logger-instance_method" title="#logger (instance method)">#<strong>logger</strong> ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<span class="note title readonly">readonly</span>
|
|
|
|
|
|
|
|
<span class="note title protected">protected</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Returns the value of attribute logger.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#target-instance_method" title="#target (instance method)">#<strong>target</strong> ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<span class="note title readonly">readonly</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Returns the value of attribute target.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
<h2>
|
|
Class Method Summary
|
|
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
</h2>
|
|
|
|
<ul class="summary">
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#create-class_method" title="create (class method)">.<strong>create</strong>(provider, target, logger, timeout, framework_module:) ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<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>(framework_module, proxies = nil, provider: nil, target: nil, logger: nil, timeout: 30) ⇒ Client </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span class="note title constructor">constructor</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>A new instance of Client.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#relay_ntlmssp_type1-instance_method" title="#relay_ntlmssp_type1 (instance method)">#<strong>relay_ntlmssp_type1</strong>(client_type1_msg) ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#relay_ntlmssp_type3-instance_method" title="#relay_ntlmssp_type3 (instance method)">#<strong>relay_ntlmssp_type3</strong>(client_type3_msg) ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div id="constructor_details" class="method_details_list">
|
|
<h2>Constructor Details</h2>
|
|
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="initialize-instance_method">
|
|
|
|
#<strong>initialize</strong>(framework_module, proxies = nil, provider: nil, target: nil, logger: nil, timeout: 30) ⇒ <tt><span class='object_link'><a href="" title="Msf::Exploit::Remote::Relay::NTLM::Target::MSSQL::Client (class)">Client</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Returns a new instance of Client.</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/relay/ntlm/target/mssql/client.rb', line 5</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_framework_module'>framework_module</span><span class='comma'>,</span> <span class='id identifier rubyid_proxies'>proxies</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>provider:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>target:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>logger:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='int'>30</span><span class='rparen'>)</span>
|
|
<span class='ivar'>@logger</span> <span class='op'>=</span> <span class='id identifier rubyid_logger'>logger</span>
|
|
<span class='ivar'>@provider</span> <span class='op'>=</span> <span class='id identifier rubyid_provider'>provider</span>
|
|
<span class='ivar'>@target</span> <span class='op'>=</span> <span class='id identifier rubyid_target'>target</span>
|
|
<span class='ivar'>@timeout</span> <span class='op'>=</span> <span class='id identifier rubyid_timeout'>timeout</span>
|
|
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_framework_module'>framework_module</span><span class='comma'>,</span> <span class='id identifier rubyid_framework_module'>framework_module</span><span class='period'>.</span><span class='id identifier rubyid_framework'>framework</span><span class='comma'>,</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_ip'>ip</span><span class='comma'>,</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span><span class='comma'>,</span> <span class='id identifier rubyid_proxies'>proxies</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="instance_attr_details" class="attr_details">
|
|
<h2>Instance Attribute Details</h2>
|
|
|
|
|
|
<span id=""></span>
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="logger-instance_method">
|
|
|
|
#<strong>logger</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly, protected)</span>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Returns the value of attribute logger.</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
81
|
|
82
|
|
83</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/relay/ntlm/target/mssql/client.rb', line 81</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
|
|
<span class='ivar'>@logger</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<span id=""></span>
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="target-instance_method">
|
|
|
|
#<strong>target</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Returns the value of attribute target.</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
3
|
|
4
|
|
5</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/relay/ntlm/target/mssql/client.rb', line 3</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_target'>target</span>
|
|
<span class='ivar'>@target</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div id="class_method_details" class="method_details_list">
|
|
<h2>Class Method Details</h2>
|
|
|
|
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="create-class_method">
|
|
|
|
.<strong>create</strong>(provider, target, logger, timeout, framework_module:) ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
13
|
|
14
|
|
15
|
|
16
|
|
17
|
|
18
|
|
19
|
|
20
|
|
21</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/relay/ntlm/target/mssql/client.rb', line 13</span>
|
|
|
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_provider'>provider</span><span class='comma'>,</span> <span class='id identifier rubyid_target'>target</span><span class='comma'>,</span> <span class='id identifier rubyid_logger'>logger</span><span class='comma'>,</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='comma'>,</span> <span class='label'>framework_module:</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='id identifier rubyid_framework_module'>framework_module</span><span class='comma'>,</span>
|
|
<span class='label'>provider:</span> <span class='id identifier rubyid_provider'>provider</span><span class='comma'>,</span>
|
|
<span class='label'>target:</span> <span class='id identifier rubyid_target'>target</span><span class='comma'>,</span>
|
|
<span class='label'>logger:</span> <span class='id identifier rubyid_logger'>logger</span><span class='comma'>,</span>
|
|
<span class='label'>timeout:</span> <span class='id identifier rubyid_timeout'>timeout</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="instance_method_details" class="method_details_list">
|
|
<h2>Instance Method Details</h2>
|
|
|
|
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="relay_ntlmssp_type1-instance_method">
|
|
|
|
#<strong>relay_ntlmssp_type1</strong>(client_type1_msg) ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>client_type1_msg</span>
|
|
|
|
|
|
<span class='type'>(<tt>String</tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
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/relay/ntlm/target/mssql/client.rb', line 26</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_relay_ntlmssp_type1'>relay_ntlmssp_type1</span><span class='lparen'>(</span><span class='id identifier rubyid_client_type1_msg'>client_type1_msg</span><span class='rparen'>)</span>
|
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_initial_connection_info'>initial_connection_info</span><span class='lbracket'>[</span><span class='symbol'>:prelogin_data</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_mssql_prelogin'>mssql_prelogin</span>
|
|
|
|
<span class='id identifier rubyid_pkt_hdr'>pkt_hdr</span> <span class='op'>=</span> <span class='const'>MsTdsHeader</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>packet_type:</span> <span class='const'>MsTdsType</span><span class='op'>::</span><span class='const'>TDS7_LOGIN</span><span class='comma'>,</span>
|
|
<span class='label'>packet_id:</span> <span class='int'>1</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pkt_body'>pkt_body</span> <span class='op'>=</span> <span class='const'>MsTdsLogin7</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>option_flags_2:</span> <span class='lbrace'>{</span>
|
|
<span class='label'>f_int_security:</span> <span class='int'>1</span>
|
|
<span class='rbrace'>}</span><span class='comma'>,</span>
|
|
<span class='label'>server_name:</span> <span class='ivar'>@target</span><span class='period'>.</span><span class='id identifier rubyid_ip'>ip</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pkt_body'>pkt_body</span><span class='period'>.</span><span class='id identifier rubyid_sspi'>sspi</span> <span class='op'>=</span> <span class='id identifier rubyid_client_type1_msg'>client_type1_msg</span><span class='period'>.</span><span class='id identifier rubyid_bytes'>bytes</span>
|
|
|
|
<span class='id identifier rubyid_pkt_hdr'>pkt_hdr</span><span class='period'>.</span><span class='id identifier rubyid_packet_length'>packet_length</span> <span class='op'>+=</span> <span class='id identifier rubyid_pkt_body'>pkt_body</span><span class='period'>.</span><span class='id identifier rubyid_num_bytes'>num_bytes</span>
|
|
<span class='id identifier rubyid_pkt'>pkt</span> <span class='op'>=</span> <span class='id identifier rubyid_pkt_hdr'>pkt_hdr</span><span class='period'>.</span><span class='id identifier rubyid_to_binary_s'>to_binary_s</span> <span class='op'>+</span> <span class='id identifier rubyid_pkt_body'>pkt_body</span><span class='period'>.</span><span class='id identifier rubyid_to_binary_s'>to_binary_s</span>
|
|
|
|
<span class='ivar'>@mstds_channel</span><span class='period'>.</span><span class='id identifier rubyid_starttls'>starttls</span> <span class='kw'>if</span> <span class='id identifier rubyid_tdsencryption'>tdsencryption</span>
|
|
|
|
<span class='id identifier rubyid_resp'>resp</span> <span class='op'>=</span> <span class='id identifier rubyid_mssql_send_recv'>mssql_send_recv</span><span class='lparen'>(</span><span class='id identifier rubyid_pkt'>pkt</span><span class='comma'>,</span> <span class='ivar'>@timeout</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_server_type2_message'>server_type2_message</span> <span class='op'>=</span> <span class='id identifier rubyid_resp'>resp</span><span class='lbracket'>[</span><span class='int'>3</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</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="../../../../Relay.html" title="Msf::Exploit::Remote::Relay (module)">Relay</a></span></span><span class='op'>::</span><span class='const'>NTLM</span><span class='op'>::</span><span class='const'>Target</span><span class='op'>::</span><span class='const'>RelayResult</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>message:</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>NTLM</span><span class='op'>::</span><span class='const'>Message</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_server_type2_message'>server_type2_message</span><span class='rparen'>)</span><span class='comma'>,</span>
|
|
<span class='label'>nt_status:</span> <span class='const'><span class='object_link'><a href="../../../../../../WindowsError.html" title="Msf::WindowsError (class)">WindowsError</a></span></span><span class='op'>::</span><span class='const'>NTStatus</span><span class='op'>::</span><span class='const'>STATUS_MORE_PROCESSING_REQUIRED</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="relay_ntlmssp_type3-instance_method">
|
|
|
|
#<strong>relay_ntlmssp_type3</strong>(client_type3_msg) ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>client_type3_msg</span>
|
|
|
|
|
|
<span class='type'>(<tt>String</tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
59
|
|
60
|
|
61
|
|
62
|
|
63
|
|
64
|
|
65
|
|
66
|
|
67
|
|
68
|
|
69
|
|
70
|
|
71
|
|
72
|
|
73
|
|
74
|
|
75
|
|
76
|
|
77</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/relay/ntlm/target/mssql/client.rb', line 59</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_relay_ntlmssp_type3'>relay_ntlmssp_type3</span><span class='lparen'>(</span><span class='id identifier rubyid_client_type3_msg'>client_type3_msg</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_pkt_hdr'>pkt_hdr</span> <span class='op'>=</span> <span class='const'>MsTdsHeader</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>type:</span> <span class='const'>MsTdsType</span><span class='op'>::</span><span class='const'>SSPI_MESSAGE</span><span class='comma'>,</span>
|
|
<span class='label'>packet_id:</span> <span class='int'>1</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pkt_hdr'>pkt_hdr</span><span class='period'>.</span><span class='id identifier rubyid_packet_length'>packet_length</span> <span class='op'>+=</span> <span class='id identifier rubyid_client_type3_msg'>client_type3_msg</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
|
|
<span class='id identifier rubyid_pkt'>pkt</span> <span class='op'>=</span> <span class='id identifier rubyid_pkt_hdr'>pkt_hdr</span><span class='period'>.</span><span class='id identifier rubyid_to_binary_s'>to_binary_s</span> <span class='op'>+</span> <span class='id identifier rubyid_client_type3_msg'>client_type3_msg</span>
|
|
|
|
<span class='id identifier rubyid_resp'>resp</span> <span class='op'>=</span> <span class='id identifier rubyid_mssql_send_recv'>mssql_send_recv</span><span class='lparen'>(</span><span class='id identifier rubyid_pkt'>pkt</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_info'>info</span> <span class='op'>=</span> <span class='id identifier rubyid_mssql_parse_reply'>mssql_parse_reply</span><span class='lparen'>(</span><span class='id identifier rubyid_resp'>resp</span><span class='rparen'>)</span>
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_info'>info</span><span class='lbracket'>[</span><span class='symbol'>:login_ack</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_nt_status'>nt_status</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../../../WindowsError.html" title="Msf::WindowsError (class)">WindowsError</a></span></span><span class='op'>::</span><span class='const'>NTStatus</span><span class='op'>::</span><span class='const'>STATUS_SUCCESS</span>
|
|
<span class='kw'>else</span>
|
|
<span class='id identifier rubyid_nt_status'>nt_status</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../../../WindowsError.html" title="Msf::WindowsError (class)">WindowsError</a></span></span><span class='op'>::</span><span class='const'>NTStatus</span><span class='op'>::</span><span class='const'>STATUS_LOGON_FAILURE</span>
|
|
<span class='kw'>end</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="../../../../Relay.html" title="Msf::Exploit::Remote::Relay (module)">Relay</a></span></span><span class='op'>::</span><span class='const'>NTLM</span><span class='op'>::</span><span class='const'>Target</span><span class='op'>::</span><span class='const'>RelayResult</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>nt_status:</span> <span class='id identifier rubyid_nt_status'>nt_status</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:05:34 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> |