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
@@ -0,0 +1,284 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Module: Msf::Exploit::Remote::SMB::Client::Authenticated
&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::SMB::Client::Authenticated";
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 (A)</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="../../SMB.html" title="Msf::Exploit::Remote::SMB (module)">SMB</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Client</a></span></span>
&raquo;
<span class="title">Authenticated</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::SMB::Client::Authenticated
</h1>
<div class="box_info">
<dl>
<dt>Includes:</dt>
<dd><span class='object_link'><a href="../../Kerberos/ServiceAuthenticator/Options.html" title="Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::Options (module)">Kerberos::ServiceAuthenticator::Options</a></span>, <span class='object_link'><a href="../../Kerberos/Ticket/Storage.html" title="Msf::Exploit::Remote::Kerberos::Ticket::Storage (module)">Kerberos::Ticket::Storage</a></span>, <span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Msf::Exploit::Remote::SMB::Client</a></span></dd>
</dl>
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="Ipc.html" title="Msf::Exploit::Remote::SMB::Client::Ipc (module)">Ipc</a></span>, <span class='object_link'><a href="Psexec.html" title="Msf::Exploit::Remote::SMB::Client::Psexec (module)">Psexec</a></span>, <span class='object_link'><a href="WebExec.html" title="Msf::Exploit::Remote::SMB::Client::WebExec (module)">WebExec</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/smb/client/authenticated.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>Mini-mixin for making SMBUser/SMBPass/SMBDomain regular options vs advanced Included when the module needs credentials to function</p>
</div>
</div>
<div class="tags">
</div>
<h2>Constant Summary</h2>
<h3 class="inherited">Constants included
from <span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Msf::Exploit::Remote::SMB::Client</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../Client.html#CONST-constant" title="Msf::Exploit::Remote::SMB::Client::CONST (constant)">CONST</a></span>, <span class='object_link'><a href="../Client.html#DCERPCClient-constant" title="Msf::Exploit::Remote::SMB::Client::DCERPCClient (constant)">DCERPCClient</a></span>, <span class='object_link'><a href="../Client.html#DCERPCPacket-constant" title="Msf::Exploit::Remote::SMB::Client::DCERPCPacket (constant)">DCERPCPacket</a></span>, <span class='object_link'><a href="../Client.html#DCERPCResponse-constant" title="Msf::Exploit::Remote::SMB::Client::DCERPCResponse (constant)">DCERPCResponse</a></span>, <span class='object_link'><a href="../Client.html#DCERPCUUID-constant" title="Msf::Exploit::Remote::SMB::Client::DCERPCUUID (constant)">DCERPCUUID</a></span>, <span class='object_link'><a href="../Client.html#NDR-constant" title="Msf::Exploit::Remote::SMB::Client::NDR (constant)">NDR</a></span>, <span class='object_link'><a href="../Client.html#SIMPLE-constant" title="Msf::Exploit::Remote::SMB::Client::SIMPLE (constant)">SIMPLE</a></span>, <span class='object_link'><a href="../Client.html#XCEPT-constant" title="Msf::Exploit::Remote::SMB::Client::XCEPT (constant)">XCEPT</a></span></p>
<h2>Instance Attribute Summary</h2>
<h3 class="inherited">Attributes included from <span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Msf::Exploit::Remote::SMB::Client</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../Client.html#simple-instance_method" title="Msf::Exploit::Remote::SMB::Client#simple (method)">#simple</a></span></p>
<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>
</ul>
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../Kerberos/ServiceAuthenticator/Options.html" title="Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::Options (module)">Kerberos::ServiceAuthenticator::Options</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../../Kerberos/ServiceAuthenticator/Options.html#kerberos_auth_options-instance_method" title="Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::Options#kerberos_auth_options (method)">#kerberos_auth_options</a></span>, <span class='object_link'><a href="../../Kerberos/ServiceAuthenticator/Options.html#kerberos_clock_skew_seconds-instance_method" title="Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::Options#kerberos_clock_skew_seconds (method)">#kerberos_clock_skew_seconds</a></span></p>
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../Kerberos/Ticket/Storage.html" title="Msf::Exploit::Remote::Kerberos::Ticket::Storage (module)">Kerberos::Ticket::Storage</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../../Kerberos/Ticket/Storage.html#kerberos_storage_options-instance_method" title="Msf::Exploit::Remote::Kerberos::Ticket::Storage#kerberos_storage_options (method)">#kerberos_storage_options</a></span>, <span class='object_link'><a href="../../Kerberos/Ticket/Storage.html#kerberos_ticket_storage-instance_method" title="Msf::Exploit::Remote::Kerberos::Ticket::Storage#kerberos_ticket_storage (method)">#kerberos_ticket_storage</a></span>, <span class='object_link'><a href="../../Kerberos/Ticket/Storage.html#store_ccache-class_method" title="Msf::Exploit::Remote::Kerberos::Ticket::Storage.store_ccache (method)">store_ccache</a></span></p>
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Msf::Exploit::Remote::SMB::Client</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../Client.html#connect-instance_method" title="Msf::Exploit::Remote::SMB::Client#connect (method)">#connect</a></span>, <span class='object_link'><a href="../Client.html#domain-instance_method" title="Msf::Exploit::Remote::SMB::Client#domain (method)">#domain</a></span>, <span class='object_link'><a href="../Client.html#domain_username_split-instance_method" title="Msf::Exploit::Remote::SMB::Client#domain_username_split (method)">#domain_username_split</a></span>, <span class='object_link'><a href="../Client.html#smb_create-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_create (method)">#smb_create</a></span>, <span class='object_link'><a href="../Client.html#smb_direct-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_direct (method)">#smb_direct</a></span>, <span class='object_link'><a href="../Client.html#smb_enumprinters-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_enumprinters (method)">#smb_enumprinters</a></span>, <span class='object_link'><a href="../Client.html#smb_enumprintproviders-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_enumprintproviders (method)">#smb_enumprintproviders</a></span>, <span class='object_link'><a href="../Client.html#smb_file_exist%3F-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_file_exist? (method)">#smb_file_exist?</a></span>, <span class='object_link'><a href="../Client.html#smb_file_rm-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_file_rm (method)">#smb_file_rm</a></span>, <span class='object_link'><a href="../Client.html#smb_fingerprint-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_fingerprint (method)">#smb_fingerprint</a></span>, <span class='object_link'><a href="../Client.html#smb_fingerprint_windows_lang-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_fingerprint_windows_lang (method)">#smb_fingerprint_windows_lang</a></span>, <span class='object_link'><a href="../Client.html#smb_fingerprint_windows_sp-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_fingerprint_windows_sp (method)">#smb_fingerprint_windows_sp</a></span>, <span class='object_link'><a href="../Client.html#smb_hostname-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_hostname (method)">#smb_hostname</a></span>, <span class='object_link'><a href="../Client.html#smb_lanman_netshareenumall-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_lanman_netshareenumall (method)">#smb_lanman_netshareenumall</a></span>, <span class='object_link'><a href="../Client.html#smb_login-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_login (method)">#smb_login</a></span>, <span class='object_link'><a href="../Client.html#smb_lookup_share_type-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_lookup_share_type (method)">#smb_lookup_share_type</a></span>, <span class='object_link'><a href="../Client.html#smb_netshareenumall-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_netshareenumall (method)">#smb_netshareenumall</a></span>, <span class='object_link'><a href="../Client.html#smb_netsharegetinfo-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_netsharegetinfo (method)">#smb_netsharegetinfo</a></span>, <span class='object_link'><a href="../Client.html#smb_open-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_open (method)">#smb_open</a></span>, <span class='object_link'><a href="../Client.html#smb_peer_lm-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_peer_lm (method)">#smb_peer_lm</a></span>, <span class='object_link'><a href="../Client.html#smb_peer_os-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_peer_os (method)">#smb_peer_os</a></span>, <span class='object_link'><a href="../Client.html#smb_srvsvc_netshareenumall-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_srvsvc_netshareenumall (method)">#smb_srvsvc_netshareenumall</a></span>, <span class='object_link'><a href="../Client.html#smb_srvsvc_netsharegetinfo-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_srvsvc_netsharegetinfo (method)">#smb_srvsvc_netsharegetinfo</a></span>, <span class='object_link'><a href="../Client.html#smbhost-instance_method" title="Msf::Exploit::Remote::SMB::Client#smbhost (method)">#smbhost</a></span>, <span class='object_link'><a href="../Client.html#splitname-instance_method" title="Msf::Exploit::Remote::SMB::Client#splitname (method)">#splitname</a></span>, <span class='object_link'><a href="../Client.html#unicode-instance_method" title="Msf::Exploit::Remote::SMB::Client#unicode (method)">#unicode</a></span></p>
<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#rhost-instance_method" title="Msf::Exploit::Remote::Tcp#rhost (method)">#rhost</a></span>, <span class='object_link'><a href="../../Tcp.html#rport-instance_method" title="Msf::Exploit::Remote::Tcp#rport (method)">#rport</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>
<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">
13
14
15
16
17
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/smb/client/authenticated.rb', line 13</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_options'>register_options</span><span class='lparen'>(</span>
<span class='lbracket'>[</span>
<span class='const'><span class='object_link'><a href="../../../../OptString.html" title="Msf::OptString (class)">OptString</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../OptString.html#initialize-instance_method" title="Msf::OptString#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SMBUser</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbracket'>[</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>The username to authenticate as</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>fallbacks:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>USERNAME</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='const'><span class='object_link'><a href="../../../../OptString.html" title="Msf::OptString (class)">OptString</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../OptString.html#initialize-instance_method" title="Msf::OptString#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SMBPass</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbracket'>[</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>The password for the specified username</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>fallbacks:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>PASSWORD</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='const'><span class='object_link'><a href="../../../../OptString.html" title="Msf::OptString (class)">OptString</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../OptString.html#initialize-instance_method" title="Msf::OptString#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SMBDomain</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbracket'>[</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>The Windows domain to use for authentication</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'>.</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>fallbacks:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>DOMAIN</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</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="../../SMB.html" title="Msf::Exploit::Remote::SMB (module)">SMB</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Client</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Msf::Exploit::Remote::SMB::Client::Authenticated (module)">Authenticated</a></span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_register_advanced_options'>register_advanced_options</span><span class='lparen'>(</span>
<span class='lbracket'>[</span>
<span class='op'>*</span><span class='id identifier rubyid_kerberos_storage_options'>kerberos_storage_options</span><span class='lparen'>(</span><span class='label'>protocol:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SMB</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='op'>*</span><span class='id identifier rubyid_kerberos_auth_options'>kerberos_auth_options</span><span class='lparen'>(</span><span class='label'>protocol:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SMB</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>auth_methods:</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="../../AuthOption.html" title="Msf::Exploit::Remote::AuthOption (module)">AuthOption</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../AuthOption.html#SMB_OPTIONS-constant" title="Msf::Exploit::Remote::AuthOption::SMB_OPTIONS (constant)">SMB_OPTIONS</a></span></span><span class='rparen'>)</span><span class='comma'>,</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="../../SMB.html" title="Msf::Exploit::Remote::SMB (module)">SMB</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Client</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Msf::Exploit::Remote::SMB::Client::Authenticated (module)">Authenticated</a></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: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>
File diff suppressed because one or more lines are too long
@@ -0,0 +1,132 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Exception: Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcAuthenticationError
&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::SMB::Client::Ipc::SmbIpcAuthenticationError";
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="../../../SMB.html" title="Msf::Exploit::Remote::SMB (module)">SMB</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Client</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Ipc.html" title="Msf::Exploit::Remote::SMB::Client::Ipc (module)">Ipc</a></span></span>
&raquo;
<span class="title">SmbIpcAuthenticationError</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>Exception: Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcAuthenticationError
</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd>
<span class="inheritName"><span class='object_link'><a href="SmbIpcError.html" title="Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcError (class)">SmbIpcError</a></span></span>
<ul class="fullTree">
<li>Object</li>
<li class="next">StandardError</li>
<li class="next"><span class='object_link'><a href="SmbIpcError.html" title="Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcError (class)">SmbIpcError</a></span></li>
<li class="next">Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcAuthenticationError</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/smb/client/ipc.rb</dd>
</dl>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:03: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,132 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Exception: Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcConnectionError
&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::SMB::Client::Ipc::SmbIpcConnectionError";
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="../../../SMB.html" title="Msf::Exploit::Remote::SMB (module)">SMB</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Client</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Ipc.html" title="Msf::Exploit::Remote::SMB::Client::Ipc (module)">Ipc</a></span></span>
&raquo;
<span class="title">SmbIpcConnectionError</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>Exception: Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcConnectionError
</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd>
<span class="inheritName"><span class='object_link'><a href="SmbIpcError.html" title="Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcError (class)">SmbIpcError</a></span></span>
<ul class="fullTree">
<li>Object</li>
<li class="next">StandardError</li>
<li class="next"><span class='object_link'><a href="SmbIpcError.html" title="Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcError (class)">SmbIpcError</a></span></li>
<li class="next">Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcConnectionError</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/smb/client/ipc.rb</dd>
</dl>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:03: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,128 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Exception: Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcError
&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::SMB::Client::Ipc::SmbIpcError";
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="../../../SMB.html" title="Msf::Exploit::Remote::SMB (module)">SMB</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Client</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Ipc.html" title="Msf::Exploit::Remote::SMB::Client::Ipc (module)">Ipc</a></span></span>
&raquo;
<span class="title">SmbIpcError</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>Exception: Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcError
</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd>
<span class="inheritName">StandardError</span>
<ul class="fullTree">
<li>Object</li>
<li class="next">StandardError</li>
<li class="next">Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcError</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/smb/client/ipc.rb</dd>
</dl>
</div>
<div id="subclasses">
<h2>Direct Known Subclasses</h2>
<p class="children"><span class='object_link'><a href="SmbIpcAuthenticationError.html" title="Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcAuthenticationError (class)">SmbIpcAuthenticationError</a></span>, <span class='object_link'><a href="SmbIpcConnectionError.html" title="Msf::Exploit::Remote::SMB::Client::Ipc::SmbIpcConnectionError (class)">SmbIpcConnectionError</a></span></p>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:03: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,996 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Module: Msf::Exploit::Remote::SMB::Client::KerberosAuthentication
&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::SMB::Client::KerberosAuthentication";
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 (K)</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="../../SMB.html" title="Msf::Exploit::Remote::SMB (module)">SMB</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Client</a></span></span>
&raquo;
<span class="title">KerberosAuthentication</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::SMB::Client::KerberosAuthentication
</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/smb/client/kerberos_authentication.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>This class implements an override for RubySMBs default authentication method to instead use a kerberos authenticator</p>
</div>
</div>
<div class="tags">
</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="#authenticate-instance_method" title="#authenticate (instance method)">#<strong>authenticate</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#kerberos_authenticator=-instance_method" title="#kerberos_authenticator= (instance method)">#<strong>kerberos_authenticator=</strong>(kerberos_authenticator) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#smb1_authenticate-instance_method" title="#smb1_authenticate (instance method)">#<strong>smb1_authenticate</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Handles SMB1 Kerberos Authentication by delegating to a kerberos_authenticator implementation to generate a GSS security blob with an embedded AP_REQ.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#smb1_kerberos_authenticate-instance_method" title="#smb1_kerberos_authenticate (instance method)">#<strong>smb1_kerberos_authenticate</strong>(security_buffer) &#x21d2; String </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>The raw binary response from the server.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#smb1_kerberos_authenticate_packet-instance_method" title="#smb1_kerberos_authenticate_packet (instance method)">#<strong>smb1_kerberos_authenticate_packet</strong>(security_blob) &#x21d2; RubySMB::SMB1::Packet::SessionSetupRequest </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Generates the RubySMB::SMB1::Packet::SessionSetupRequest packet with the NTLM Type 3 (Auth) message in the security_blob field.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#smb2_authenticate-instance_method" title="#smb2_authenticate (instance method)">#<strong>smb2_authenticate</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Handles SMB2 Kerberos Authentication by delegating to a kerberos_authenticator implementation to generate a GSS security blob with an embedded AP_REQ.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#smb2_kerberos_authenticate-instance_method" title="#smb2_kerberos_authenticate (instance method)">#<strong>smb2_kerberos_authenticate</strong>(security_blob) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#smb2_kerberos_authenticate_packet-instance_method" title="#smb2_kerberos_authenticate_packet (instance method)">#<strong>smb2_kerberos_authenticate_packet</strong>(security_blob) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></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="authenticate-instance_method">
#<strong>authenticate</strong> &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt>::RubySMB::Error::AuthenticationFailure</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/kerberos_authentication.rb', line 13</span>
<span class='kw'>def</span> <span class='id identifier rubyid_authenticate'>authenticate</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>RubySMB</span><span class='op'>::</span><span class='const'>Error</span><span class='op'>::</span><span class='const'>AuthenticationFailure</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Missing negotiation security buffer</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_negotiation_security_buffer'>negotiation_security_buffer</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>begin</span>
<span class='id identifier rubyid_gss_api'>gss_api</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='period'>.</span><span class='id identifier rubyid_decode'>decode</span><span class='lparen'>(</span><span class='id identifier rubyid_negotiation_security_buffer'>negotiation_security_buffer</span><span class='rparen'>)</span>
<span class='id identifier rubyid_mech_types'>mech_types</span> <span class='op'>=</span> <span class='const'>RubySMB</span><span class='op'>::</span><span class='const'>Gss</span><span class='period'>.</span><span class='id identifier rubyid_asn1dig'>asn1dig</span><span class='lparen'>(</span><span class='id identifier rubyid_gss_api'>gss_api</span><span class='comma'>,</span> <span class='int'>1</span><span class='comma'>,</span> <span class='int'>0</span><span class='comma'>,</span> <span class='int'>0</span><span class='comma'>,</span> <span class='int'>0</span><span class='rparen'>)</span><span class='op'>&amp;.</span><span class='id identifier rubyid_value'>value</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_has_kerberos_gss_mech_type'>has_kerberos_gss_mech_type</span> <span class='op'>=</span> <span class='id identifier rubyid_mech_types'>mech_types</span><span class='op'>&amp;.</span><span class='id identifier rubyid_any?'>any?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_mech_type'>mech_type</span><span class='op'>|</span> <span class='id identifier rubyid_mech_type'>mech_type</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='op'>==</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/Gss.html" title="Rex::Proto::Gss (module)">Gss</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Gss.html#OID_MICROSOFT_KERBEROS_5-constant" title="Rex::Proto::Gss::OID_MICROSOFT_KERBEROS_5 (constant)">OID_MICROSOFT_KERBEROS_5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='rbrace'>}</span>
<span class='kw'>rescue</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>ASN1Error</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/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model.html" title="Rex::Proto::Kerberos::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Error.html" title="Rex::Proto::Kerberos::Model::Error (module)">Error</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Error/KerberosDecodingError.html" title="Rex::Proto::Kerberos::Model::Error::KerberosDecodingError (class)">KerberosDecodingError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Error/KerberosDecodingError.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Error::KerberosDecodingError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Invalid GSS Response</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_error'>error</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unable to negotiate kerberos with the remote host. Expected oid </span><span class='embexpr_beg'>#{</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/Gss.html" title="Rex::Proto::Gss (module)">Gss</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Gss.html#OID_MICROSOFT_KERBEROS_5-constant" title="Rex::Proto::Gss::OID_MICROSOFT_KERBEROS_5 (constant)">OID_MICROSOFT_KERBEROS_5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_content'> in </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_mech_types'>mech_types</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:value</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
<span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>RubySMB</span><span class='op'>::</span><span class='const'>Error</span><span class='op'>::</span><span class='const'>AuthenticationFailure</span><span class='comma'>,</span> <span class='id identifier rubyid_error'>error</span> <span class='kw'>unless</span> <span class='id identifier rubyid_has_kerberos_gss_mech_type'>has_kerberos_gss_mech_type</span>
<span class='ivar'>@mech_type</span> <span class='op'>=</span> <span class='symbol'>:kerberos</span>
<span class='kw'>if</span> <span class='id identifier rubyid_smb1'>smb1</span>
<span class='id identifier rubyid_smb1_authenticate'>smb1_authenticate</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_smb2_authenticate'>smb2_authenticate</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="kerberos_authenticator=-instance_method">
#<strong>kerberos_authenticator=</strong>(kerberos_authenticator) &#x21d2; <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'>kerberos_authenticator</span>
<span class='type'>(<tt><span class='object_link'><a href="../../Kerberos/ServiceAuthenticator/SMB.html" title="Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::SMB (class)">Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::SMB</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>The authenticator to make the required Kerberos requests</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
9
10
11</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/kerberos_authentication.rb', line 9</span>
<span class='kw'>def</span> <span class='id identifier rubyid_kerberos_authenticator='>kerberos_authenticator=</span><span class='lparen'>(</span><span class='id identifier rubyid_kerberos_authenticator'>kerberos_authenticator</span><span class='rparen'>)</span>
<span class='ivar'>@kerberos_authenticator</span> <span class='op'>=</span> <span class='id identifier rubyid_kerberos_authenticator'>kerberos_authenticator</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="smb1_authenticate-instance_method">
#<strong>smb1_authenticate</strong> &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Handles SMB1 Kerberos Authentication by delegating to a kerberos_authenticator implementation to generate a GSS security blob with an embedded AP_REQ. On success information is stored about the peer/server.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt>::RubySMB::Error::AuthenticationFailure</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
42
43
44
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/smb/client/kerberos_authentication.rb', line 42</span>
<span class='kw'>def</span> <span class='id identifier rubyid_smb1_authenticate'>smb1_authenticate</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>RubySMB</span><span class='op'>::</span><span class='const'>Error</span><span class='op'>::</span><span class='const'>AuthenticationFailure</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Missing kerberos authenticator</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='ivar'>@kerberos_authenticator</span>
<span class='id identifier rubyid_kerberos_result'>kerberos_result</span> <span class='op'>=</span> <span class='ivar'>@kerberos_authenticator</span><span class='period'>.</span><span class='id identifier rubyid_authenticate'>authenticate</span>
<span class='ivar'>@application_key</span> <span class='op'>=</span> <span class='ivar'>@session_key</span> <span class='op'>=</span> <span class='id identifier rubyid_kerberos_result'>kerberos_result</span><span class='lbracket'>[</span><span class='symbol'>:session_key</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>...</span><span class='int'>16</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_raw_kerberos_response'>raw_kerberos_response</span> <span class='op'>=</span> <span class='id identifier rubyid_smb1_kerberos_authenticate'>smb1_kerberos_authenticate</span><span class='lparen'>(</span><span class='id identifier rubyid_kerberos_result'>kerberos_result</span><span class='lbracket'>[</span><span class='symbol'>:security_blob</span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_smb1_session_setup_response'>smb1_session_setup_response</span><span class='lparen'>(</span><span class='id identifier rubyid_raw_kerberos_response'>raw_kerberos_response</span><span class='rparen'>)</span>
<span class='ivar'>@kerberos_authenticator</span><span class='period'>.</span><span class='id identifier rubyid_validate_response!'>validate_response!</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_data_block'>data_block</span><span class='period'>.</span><span class='id identifier rubyid_security_blob'>security_blob</span><span class='rparen'>)</span>
<span class='id identifier rubyid_response_code'>response_code</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_status_code'>status_code</span>
<span class='comment'># Store the available OS information before going forward.
</span> <span class='ivar'>@peer_native_os</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_data_block'>data_block</span><span class='period'>.</span><span class='id identifier rubyid_native_os'>native_os</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
<span class='ivar'>@peer_native_lm</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_data_block'>data_block</span><span class='period'>.</span><span class='id identifier rubyid_native_lan_man'>native_lan_man</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
<span class='ivar'>@user_id</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_smb_header'>smb_header</span><span class='period'>.</span><span class='id identifier rubyid_uid'>uid</span> <span class='kw'>if</span> <span class='id identifier rubyid_response_code'>response_code</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='id identifier rubyid_response_code'>response_code</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="smb1_kerberos_authenticate-instance_method">
#<strong>smb1_kerberos_authenticate</strong>(security_buffer) &#x21d2; <tt>String</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the raw binary response from the server.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>type3_message</span>
<span class='type'>(<tt>String</tt>)</span>
&mdash;
<div class='inline'>
<p>the NTLM Type 3 message</p>
</div>
</li>
<li>
<span class='name'>user_id</span>
<span class='type'>(<tt>Integer</tt>)</span>
&mdash;
<div class='inline'>
<p>the temporary user ID from the Type 2 response</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>String</tt>)</span>
&mdash;
<div class='inline'>
<p>the raw binary response from the server</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
68
69
70
71</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/kerberos_authentication.rb', line 68</span>
<span class='kw'>def</span> <span class='id identifier rubyid_smb1_kerberos_authenticate'>smb1_kerberos_authenticate</span><span class='lparen'>(</span><span class='id identifier rubyid_security_buffer'>security_buffer</span><span class='rparen'>)</span>
<span class='id identifier rubyid_packet'>packet</span> <span class='op'>=</span> <span class='id identifier rubyid_smb1_kerberos_authenticate_packet'>smb1_kerberos_authenticate_packet</span><span class='lparen'>(</span><span class='id identifier rubyid_security_buffer'>security_buffer</span><span class='rparen'>)</span>
<span class='id identifier rubyid_send_recv'>send_recv</span><span class='lparen'>(</span><span class='id identifier rubyid_packet'>packet</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="smb1_kerberos_authenticate_packet-instance_method">
#<strong>smb1_kerberos_authenticate_packet</strong>(security_blob) &#x21d2; <tt>RubySMB::SMB1::Packet::SessionSetupRequest</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Generates the RubySMB::SMB1::Packet::SessionSetupRequest packet with the NTLM Type 3 (Auth) message in the security_blob field.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>type3_message</span>
<span class='type'>(<tt>String</tt>)</span>
&mdash;
<div class='inline'>
<p>the NTLM Type 3 message</p>
</div>
</li>
<li>
<span class='name'>user_id</span>
<span class='type'>(<tt>Integer</tt>)</span>
&mdash;
<div class='inline'>
<p>the temporary user ID from the Type 2 response</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>RubySMB::SMB1::Packet::SessionSetupRequest</tt>)</span>
&mdash;
<div class='inline'>
<p>the second authentication packet to send</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
79
80
81
82
83
84
85
86
87</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/kerberos_authentication.rb', line 79</span>
<span class='kw'>def</span> <span class='id identifier rubyid_smb1_kerberos_authenticate_packet'>smb1_kerberos_authenticate_packet</span><span class='lparen'>(</span><span class='id identifier rubyid_security_blob'>security_blob</span><span class='rparen'>)</span>
<span class='id identifier rubyid_packet'>packet</span> <span class='op'>=</span> <span class='const'>RubySMB</span><span class='op'>::</span><span class='const'>SMB1</span><span class='op'>::</span><span class='const'>Packet</span><span class='op'>::</span><span class='const'>SessionSetupRequest</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='comment'># packet.smb_header.uid = user_id
</span> <span class='id identifier rubyid_packet'>packet</span><span class='period'>.</span><span class='id identifier rubyid_set_security_buffer'>set_security_buffer</span><span class='lparen'>(</span><span class='id identifier rubyid_security_blob'>security_blob</span><span class='rparen'>)</span>
<span class='id identifier rubyid_packet'>packet</span><span class='period'>.</span><span class='id identifier rubyid_parameter_block'>parameter_block</span><span class='period'>.</span><span class='id identifier rubyid_max_buffer_size'>max_buffer_size</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_max_buffer_size'>max_buffer_size</span>
<span class='id identifier rubyid_packet'>packet</span><span class='period'>.</span><span class='id identifier rubyid_parameter_block'>parameter_block</span><span class='period'>.</span><span class='id identifier rubyid_max_mpx_count'>max_mpx_count</span> <span class='op'>=</span> <span class='int'>50</span>
<span class='id identifier rubyid_packet'>packet</span><span class='period'>.</span><span class='id identifier rubyid_smb_header'>smb_header</span><span class='period'>.</span><span class='id identifier rubyid_flags2'>flags2</span><span class='period'>.</span><span class='id identifier rubyid_extended_security'>extended_security</span> <span class='op'>=</span> <span class='int'>1</span>
<span class='id identifier rubyid_packet'>packet</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="smb2_authenticate-instance_method">
#<strong>smb2_authenticate</strong> &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Handles SMB2 Kerberos Authentication by delegating to a kerberos_authenticator implementation to generate a GSS security blob with an embedded AP_REQ. On success information is stored about the peer/server.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt>::RubySMB::Error::AuthenticationFailure</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/kerberos_authentication.rb', line 96</span>
<span class='kw'>def</span> <span class='id identifier rubyid_smb2_authenticate'>smb2_authenticate</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>RubySMB</span><span class='op'>::</span><span class='const'>Error</span><span class='op'>::</span><span class='const'>AuthenticationFailure</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Missing kerberos authenticator</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='ivar'>@kerberos_authenticator</span>
<span class='id identifier rubyid_kerberos_result'>kerberos_result</span> <span class='op'>=</span> <span class='ivar'>@kerberos_authenticator</span><span class='period'>.</span><span class='id identifier rubyid_authenticate'>authenticate</span>
<span class='id identifier rubyid_raw_kerberos_response'>raw_kerberos_response</span> <span class='op'>=</span> <span class='id identifier rubyid_smb2_kerberos_authenticate'>smb2_kerberos_authenticate</span><span class='lparen'>(</span><span class='id identifier rubyid_kerberos_result'>kerberos_result</span><span class='lbracket'>[</span><span class='symbol'>:security_blob</span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_smb2_session_setup_response'>smb2_session_setup_response</span><span class='lparen'>(</span><span class='id identifier rubyid_raw_kerberos_response'>raw_kerberos_response</span><span class='rparen'>)</span>
<span class='ivar'>@kerberos_authenticator</span><span class='period'>.</span><span class='id identifier rubyid_validate_response!'>validate_response!</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_buffer'>buffer</span><span class='rparen'>)</span>
<span class='ivar'>@session_id</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_smb2_header'>smb2_header</span><span class='period'>.</span><span class='id identifier rubyid_session_id'>session_id</span>
<span class='kw'>if</span> <span class='ivar'>@encryption_algorithm</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
<span class='id identifier rubyid_key_len'>key_len</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>Cipher</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@encryption_algorithm</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_key_len'>key_len</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_key_len'>key_len</span> <span class='op'>=</span> <span class='int'>16</span>
<span class='kw'>end</span>
<span class='ivar'>@application_key</span> <span class='op'>=</span> <span class='ivar'>@session_key</span> <span class='op'>=</span> <span class='id identifier rubyid_kerberos_result'>kerberos_result</span><span class='lbracket'>[</span><span class='symbol'>:session_key</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>...</span><span class='id identifier rubyid_key_len'>key_len</span><span class='rbracket'>]</span>
<span class='ivar'>@session_is_guest</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_session_flags'>session_flags</span><span class='period'>.</span><span class='id identifier rubyid_guest'>guest</span> <span class='op'>==</span> <span class='int'>1</span>
<span class='kw'>if</span> <span class='ivar'>@smb3</span>
<span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_session_flags'>session_flags</span><span class='period'>.</span><span class='id identifier rubyid_encrypt_data'>encrypt_data</span> <span class='op'>==</span> <span class='int'>1</span>
<span class='comment'># if the server indicates that encryption is required, enable it
</span> <span class='ivar'>@session_encrypt_data</span> <span class='op'>=</span> <span class='kw'>true</span>
<span class='kw'>elsif</span> <span class='lparen'>(</span><span class='ivar'>@session_is_guest</span> <span class='op'>&amp;&amp;</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='op'>||</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='op'>&amp;&amp;</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='comment'># disable encryption when necessary
</span> <span class='ivar'>@session_encrypt_data</span> <span class='op'>=</span> <span class='kw'>false</span>
<span class='kw'>end</span>
<span class='comment'># see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/7fd079ca-17e6-4f02-8449-46b606ea289c
</span> <span class='kw'>if</span> <span class='ivar'>@dialect</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0x0300</span><span class='tstring_end'>&#39;</span></span> <span class='op'>||</span> <span class='ivar'>@dialect</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0x0302</span><span class='tstring_end'>&#39;</span></span>
<span class='ivar'>@application_key</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/Crypto.html" title="Rex::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Crypto/KeyDerivation.html" title="Rex::Crypto::KeyDerivation (module)">KeyDerivation</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Crypto/KeyDerivation/NIST_SP_800_108.html" title="Rex::Crypto::KeyDerivation::NIST_SP_800_108 (module)">NIST_SP_800_108</a></span></span><span class='period'>.</span><span class='id identifier rubyid_counter_hmac'><span class='object_link'><a href="../../../../../Rex/Crypto/KeyDerivation/NIST_SP_800_108.html#counter_hmac-class_method" title="Rex::Crypto::KeyDerivation::NIST_SP_800_108.counter_hmac (method)">counter_hmac</a></span></span><span class='lparen'>(</span>
<span class='ivar'>@session_key</span><span class='comma'>,</span>
<span class='int'>16</span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SHA256</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>SMB2APP\x00</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
<span class='label'>context:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>SmbRpc\x00</span><span class='tstring_end'>&quot;</span></span>
<span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
<span class='kw'>else</span>
<span class='ivar'>@application_key</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/Crypto.html" title="Rex::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Crypto/KeyDerivation.html" title="Rex::Crypto::KeyDerivation (module)">KeyDerivation</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Crypto/KeyDerivation/NIST_SP_800_108.html" title="Rex::Crypto::KeyDerivation::NIST_SP_800_108 (module)">NIST_SP_800_108</a></span></span><span class='period'>.</span><span class='id identifier rubyid_counter_hmac'><span class='object_link'><a href="../../../../../Rex/Crypto/KeyDerivation/NIST_SP_800_108.html#counter_hmac-class_method" title="Rex::Crypto::KeyDerivation::NIST_SP_800_108.counter_hmac (method)">counter_hmac</a></span></span><span class='lparen'>(</span>
<span class='ivar'>@session_key</span><span class='comma'>,</span>
<span class='int'>16</span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SHA256</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
<span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>SMBAppKey\x00</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
<span class='label'>context:</span> <span class='ivar'>@preauth_integrity_hash_value</span>
<span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
<span class='kw'>end</span>
<span class='comment'># otherwise, leave encryption to the default value that it was initialized to
</span> <span class='kw'>end</span>
<span class='comment'>######
</span> <span class='comment'># DEBUG
</span> <span class='comment'>#puts &quot;Session ID = #{@session_id.to_binary_s.each_byte.map {|e| &#39;%02x&#39; % e}.join}&quot;
</span> <span class='comment'>#puts &quot;Session key = #{@session_key.each_byte.map {|e| &#39;%02x&#39; % e}.join}&quot;
</span> <span class='comment'>#puts &quot;PreAuthHash = #{@preauth_integrity_hash_value.each_byte.map {|e| &#39;%02x&#39; % e}.join}&quot; if @preauth_integrity_hash_value
</span> <span class='comment'>######
</span>
<span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_status_code'>status_code</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="smb2_kerberos_authenticate-instance_method">
#<strong>smb2_kerberos_authenticate</strong>(security_blob) &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
161
162
163
164
165
166
167
168</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/kerberos_authentication.rb', line 161</span>
<span class='kw'>def</span> <span class='id identifier rubyid_smb2_kerberos_authenticate'>smb2_kerberos_authenticate</span><span class='lparen'>(</span><span class='id identifier rubyid_security_blob'>security_blob</span><span class='rparen'>)</span>
<span class='id identifier rubyid_packet'>packet</span> <span class='op'>=</span> <span class='id identifier rubyid_smb2_kerberos_authenticate_packet'>smb2_kerberos_authenticate_packet</span><span class='lparen'>(</span><span class='id identifier rubyid_security_blob'>security_blob</span><span class='rparen'>)</span>
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_send_recv'>send_recv</span><span class='lparen'>(</span><span class='id identifier rubyid_packet'>packet</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='ivar'>@dialect</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0x0311</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_update_preauth_hash'>update_preauth_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_packet'>packet</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_response'>response</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="smb2_kerberos_authenticate_packet-instance_method">
#<strong>smb2_kerberos_authenticate_packet</strong>(security_blob) &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
154
155
156
157
158
159</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/kerberos_authentication.rb', line 154</span>
<span class='kw'>def</span> <span class='id identifier rubyid_smb2_kerberos_authenticate_packet'>smb2_kerberos_authenticate_packet</span><span class='lparen'>(</span><span class='id identifier rubyid_security_blob'>security_blob</span><span class='rparen'>)</span>
<span class='id identifier rubyid_packet'>packet</span> <span class='op'>=</span> <span class='const'>RubySMB</span><span class='op'>::</span><span class='const'>SMB2</span><span class='op'>::</span><span class='const'>Packet</span><span class='op'>::</span><span class='const'>SessionSetupRequest</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_packet'>packet</span><span class='period'>.</span><span class='id identifier rubyid_set_security_buffer'>set_security_buffer</span><span class='lparen'>(</span><span class='id identifier rubyid_security_blob'>security_blob</span><span class='rparen'>)</span>
<span class='id identifier rubyid_packet'>packet</span><span class='period'>.</span><span class='id identifier rubyid_security_mode'>security_mode</span><span class='period'>.</span><span class='id identifier rubyid_signing_enabled'>signing_enabled</span> <span class='op'>=</span> <span class='int'>1</span>
<span class='id identifier rubyid_packet'>packet</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:02:50 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,323 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Module: Msf::Exploit::Remote::SMB::Client::LocalPaths
&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::SMB::Client::LocalPaths";
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 (L)</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="../../SMB.html" title="Msf::Exploit::Remote::SMB (module)">SMB</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Client</a></span></span>
&raquo;
<span class="title">LocalPaths</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::SMB::Client::LocalPaths
</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/smb/client/local_paths.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>Mixin for handling options related to local files in SMB modules</p>
</div>
</div>
<div class="tags">
</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="#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="#local_paths-instance_method" title="#local_paths (instance method)">#<strong>local_paths</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#validate_lpaths!-instance_method" title="#validate_lpaths! (instance method)">#<strong>validate_lpaths!</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></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="initialize-instance_method">
#<strong>initialize</strong>(info = {}) &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8
9
10
11
12
13</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/local_paths.rb', line 6</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_options'>register_options</span><span class='lparen'>(</span>
<span class='lbracket'>[</span>
<span class='const'><span class='object_link'><a href="../../../../OptString.html" title="Msf::OptString (class)">OptString</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../OptString.html#initialize-instance_method" title="Msf::OptString#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>LPATH</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='kw'>false</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>The path of the local file to utilize</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='const'><span class='object_link'><a href="../../../../OptPath.html" title="Msf::OptPath (class)">OptPath</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'>FILE_LPATHS</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='kw'>false</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>A file containing a list of local files to utilize</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="local_paths-instance_method">
#<strong>local_paths</strong> &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
27
28
29
30
31
32
33</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/local_paths.rb', line 27</span>
<span class='kw'>def</span> <span class='id identifier rubyid_local_paths'>local_paths</span>
<span class='kw'>if</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'>FILE_LPATHS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='const'>IO</span><span class='period'>.</span><span class='id identifier rubyid_readlines'>readlines</span><span class='lparen'>(</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'>FILE_LPATHS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:strip</span><span class='rparen'>)</span>
<span class='kw'>elsif</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'>LPATH</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='lbracket'>[</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'>LPATH</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rbracket'>]</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="validate_lpaths!-instance_method">
#<strong>validate_lpaths!</strong> &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
15
16
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/smb/client/local_paths.rb', line 15</span>
<span class='kw'>def</span> <span class='id identifier rubyid_validate_lpaths!'>validate_lpaths!</span>
<span class='kw'>unless</span> <span class='lparen'>(</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'>FILE_LPATHS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</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'>LPATH</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='op'>!</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'>FILE_LPATHS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</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'>LPATH</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='id identifier rubyid_validation_reason'>validation_reason</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>One and only one of FILE_LPATHS or LPATH must be specified</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_raise'>raise</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="../../../../OptionValidateError.html" title="Msf::OptionValidateError (class)">OptionValidateError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../OptionValidateError.html#initialize-instance_method" title="Msf::OptionValidateError#initialize (method)">new</a></span></span><span class='lparen'>(</span>
<span class='lbrace'>{</span>
<span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>FILE_LPATHS</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_validation_reason'>validation_reason</span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>LPATH</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_validation_reason'>validation_reason</span>
<span class='rbrace'>}</span>
<span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:02:37 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,432 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Module: Msf::Exploit::Remote::SMB::Client::PipeAuditor
&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::SMB::Client::PipeAuditor";
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="../../SMB.html" title="Msf::Exploit::Remote::SMB (module)">SMB</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Client</a></span></span>
&raquo;
<span class="title">PipeAuditor</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::SMB::Client::PipeAuditor
</h1>
<div class="box_info">
<dl>
<dt>Includes:</dt>
<dd><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Msf::Exploit::Remote::SMB::Client</a></span></dd>
</dl>
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="Psexec_MS17_010.html" title="Msf::Exploit::Remote::SMB::Client::Psexec_MS17_010 (module)">Psexec_MS17_010</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/smb/client/pipe_auditor.rb</dd>
</dl>
</div>
<h2>Constant Summary</h2>
<h3 class="inherited">Constants included
from <span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Msf::Exploit::Remote::SMB::Client</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../Client.html#CONST-constant" title="Msf::Exploit::Remote::SMB::Client::CONST (constant)">CONST</a></span>, <span class='object_link'><a href="../Client.html#DCERPCClient-constant" title="Msf::Exploit::Remote::SMB::Client::DCERPCClient (constant)">DCERPCClient</a></span>, <span class='object_link'><a href="../Client.html#DCERPCPacket-constant" title="Msf::Exploit::Remote::SMB::Client::DCERPCPacket (constant)">DCERPCPacket</a></span>, <span class='object_link'><a href="../Client.html#DCERPCResponse-constant" title="Msf::Exploit::Remote::SMB::Client::DCERPCResponse (constant)">DCERPCResponse</a></span>, <span class='object_link'><a href="../Client.html#DCERPCUUID-constant" title="Msf::Exploit::Remote::SMB::Client::DCERPCUUID (constant)">DCERPCUUID</a></span>, <span class='object_link'><a href="../Client.html#NDR-constant" title="Msf::Exploit::Remote::SMB::Client::NDR (constant)">NDR</a></span>, <span class='object_link'><a href="../Client.html#SIMPLE-constant" title="Msf::Exploit::Remote::SMB::Client::SIMPLE (constant)">SIMPLE</a></span>, <span class='object_link'><a href="../Client.html#XCEPT-constant" title="Msf::Exploit::Remote::SMB::Client::XCEPT (constant)">XCEPT</a></span></p>
<h2>Instance Attribute Summary</h2>
<h3 class="inherited">Attributes included from <span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Msf::Exploit::Remote::SMB::Client</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../Client.html#simple-instance_method" title="Msf::Exploit::Remote::SMB::Client#simple (method)">#simple</a></span></p>
<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="#check_named_pipes-instance_method" title="#check_named_pipes (instance method)">#<strong>check_named_pipes</strong>(check_first: [], return_first: false) &#x21d2; Array </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Check named pipes, returning the first optionally.</p>
</div></span>
</li>
<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>
</ul>
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Msf::Exploit::Remote::SMB::Client</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../Client.html#connect-instance_method" title="Msf::Exploit::Remote::SMB::Client#connect (method)">#connect</a></span>, <span class='object_link'><a href="../Client.html#domain-instance_method" title="Msf::Exploit::Remote::SMB::Client#domain (method)">#domain</a></span>, <span class='object_link'><a href="../Client.html#domain_username_split-instance_method" title="Msf::Exploit::Remote::SMB::Client#domain_username_split (method)">#domain_username_split</a></span>, <span class='object_link'><a href="../Client.html#smb_create-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_create (method)">#smb_create</a></span>, <span class='object_link'><a href="../Client.html#smb_direct-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_direct (method)">#smb_direct</a></span>, <span class='object_link'><a href="../Client.html#smb_enumprinters-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_enumprinters (method)">#smb_enumprinters</a></span>, <span class='object_link'><a href="../Client.html#smb_enumprintproviders-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_enumprintproviders (method)">#smb_enumprintproviders</a></span>, <span class='object_link'><a href="../Client.html#smb_file_exist%3F-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_file_exist? (method)">#smb_file_exist?</a></span>, <span class='object_link'><a href="../Client.html#smb_file_rm-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_file_rm (method)">#smb_file_rm</a></span>, <span class='object_link'><a href="../Client.html#smb_fingerprint-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_fingerprint (method)">#smb_fingerprint</a></span>, <span class='object_link'><a href="../Client.html#smb_fingerprint_windows_lang-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_fingerprint_windows_lang (method)">#smb_fingerprint_windows_lang</a></span>, <span class='object_link'><a href="../Client.html#smb_fingerprint_windows_sp-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_fingerprint_windows_sp (method)">#smb_fingerprint_windows_sp</a></span>, <span class='object_link'><a href="../Client.html#smb_hostname-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_hostname (method)">#smb_hostname</a></span>, <span class='object_link'><a href="../Client.html#smb_lanman_netshareenumall-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_lanman_netshareenumall (method)">#smb_lanman_netshareenumall</a></span>, <span class='object_link'><a href="../Client.html#smb_login-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_login (method)">#smb_login</a></span>, <span class='object_link'><a href="../Client.html#smb_lookup_share_type-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_lookup_share_type (method)">#smb_lookup_share_type</a></span>, <span class='object_link'><a href="../Client.html#smb_netshareenumall-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_netshareenumall (method)">#smb_netshareenumall</a></span>, <span class='object_link'><a href="../Client.html#smb_netsharegetinfo-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_netsharegetinfo (method)">#smb_netsharegetinfo</a></span>, <span class='object_link'><a href="../Client.html#smb_open-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_open (method)">#smb_open</a></span>, <span class='object_link'><a href="../Client.html#smb_peer_lm-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_peer_lm (method)">#smb_peer_lm</a></span>, <span class='object_link'><a href="../Client.html#smb_peer_os-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_peer_os (method)">#smb_peer_os</a></span>, <span class='object_link'><a href="../Client.html#smb_srvsvc_netshareenumall-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_srvsvc_netshareenumall (method)">#smb_srvsvc_netshareenumall</a></span>, <span class='object_link'><a href="../Client.html#smb_srvsvc_netsharegetinfo-instance_method" title="Msf::Exploit::Remote::SMB::Client#smb_srvsvc_netsharegetinfo (method)">#smb_srvsvc_netsharegetinfo</a></span>, <span class='object_link'><a href="../Client.html#smbhost-instance_method" title="Msf::Exploit::Remote::SMB::Client#smbhost (method)">#smbhost</a></span>, <span class='object_link'><a href="../Client.html#splitname-instance_method" title="Msf::Exploit::Remote::SMB::Client#splitname (method)">#splitname</a></span>, <span class='object_link'><a href="../Client.html#unicode-instance_method" title="Msf::Exploit::Remote::SMB::Client#unicode (method)">#unicode</a></span></p>
<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#rhost-instance_method" title="Msf::Exploit::Remote::Tcp#rhost (method)">#rhost</a></span>, <span class='object_link'><a href="../../Tcp.html#rport-instance_method" title="Msf::Exploit::Remote::Tcp#rport (method)">#rport</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>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="check_named_pipes-instance_method">
#<strong>check_named_pipes</strong>(check_first: [], return_first: false) &#x21d2; <tt>Array</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Check named pipes, returning the first optionally</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>check_first</span>
<span class='type'>(<tt>Array</tt>)</span>
<em class="default">(defaults to: <tt>[]</tt>)</em>
&mdash;
<div class='inline'>
<p>Check the specified pipes first</p>
</div>
</li>
<li>
<span class='name'>return_first</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>false</tt>)</em>
&mdash;
<div class='inline'>
<p>Return the first pipe name and handle</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array</tt>)</span>
&mdash;
<div class='inline'>
<p>The list of found pipes (name and handle)</p>
</div>
</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
51
52
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/smb/client/pipe_auditor.rb', line 27</span>
<span class='kw'>def</span> <span class='id identifier rubyid_check_named_pipes'>check_named_pipes</span><span class='lparen'>(</span><span class='label'>check_first:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>return_first:</span> <span class='kw'>false</span><span class='rparen'>)</span>
<span class='ivar'>@found_pipes</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='kw'>if</span> <span class='id identifier rubyid_check_first'>check_first</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
<span class='id identifier rubyid_check_first'>check_first</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_pipe'>pipe</span><span class='op'>|</span> <span class='id identifier rubyid_pipe'>pipe</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='rbrace'>}</span>
<span class='kw'>elsif</span> <span class='id identifier rubyid_check_first'>check_first</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_check_first'>check_first</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
<span class='id identifier rubyid_check_first'>check_first</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_check_first'>check_first</span><span class='rbracket'>]</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_check_first'>check_first</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_named_pipes'>named_pipes</span> <span class='op'>=</span> <span class='id identifier rubyid_check_first'>check_first</span> <span class='op'>+</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_readlines'>readlines</span><span class='lparen'>(</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'>NAMED_PIPES</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='id identifier rubyid_named_pipes'>named_pipes</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_pipe'>pipe</span><span class='op'>|</span>
<span class='kw'>begin</span>
<span class='id identifier rubyid_pipe_name'>pipe_name</span> <span class='op'>=</span> <span class='id identifier rubyid_pipe'>pipe</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
<span class='comment'># Samba 3.x requires a prefixed backslash
</span> <span class='comment'># Samba 4.x normalizes away backslashes
</span> <span class='comment'># Windows: honey badger don&#39;t care
</span> <span class='kw'>unless</span> <span class='id identifier rubyid_pipe_name'>pipe_name</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>\\</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_pipe_name'>pipe_name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\\</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pipe_name'>pipe_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
<span class='kw'>end</span>
<span class='id identifier rubyid_pipe_handle'>pipe_handle</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_simple'>simple</span><span class='period'>.</span><span class='id identifier rubyid_create_pipe'>create_pipe</span><span class='lparen'>(</span><span class='id identifier rubyid_pipe_name'>pipe_name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>o</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='comment'># If we make it this far, it succeeded
</span> <span class='id identifier rubyid_vprint_status'>vprint_status</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Connected to named pipe: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pipe_name'>pipe_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='comment'># This is for exploits like ms17_010_psexec
</span> <span class='kw'>return</span> <span class='id identifier rubyid_pipe_name'>pipe_name</span><span class='comma'>,</span> <span class='id identifier rubyid_pipe_handle'>pipe_handle</span> <span class='kw'>if</span> <span class='id identifier rubyid_return_first'>return_first</span>
<span class='ivar'>@found_pipes</span> <span class='op'>&lt;&lt;</span> <span class='lbracket'>[</span><span class='id identifier rubyid_pipe_name'>pipe_name</span><span class='comma'>,</span> <span class='id identifier rubyid_pipe_handle'>pipe_handle</span><span class='rbracket'>]</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/SMB.html" title="Rex::Proto::SMB (module)">SMB</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/SMB/Exceptions.html" title="Rex::Proto::SMB::Exceptions (module)">Exceptions</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/SMB/Exceptions/ErrorCode.html" title="Rex::Proto::SMB::Exceptions::ErrorCode (class)">ErrorCode</a></span></span><span class='comma'>,</span> <span class='const'>RubySMB</span><span class='op'>::</span><span class='const'>Error</span><span class='op'>::</span><span class='const'>RubySMBError</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
<span class='id identifier rubyid_vprint_error'>vprint_error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Inaccessible named pipe: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pipe_name'>pipe_name</span><span class='embexpr_end'>}</span><span class='tstring_content'> - </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='ivar'>@found_pipes</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="initialize-instance_method">
#<strong>initialize</strong>(info = {}) &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
12
13
14
15
16
17
18
19
20</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/pipe_auditor.rb', line 12</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_named_pipes'>named_pipes</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</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="../../../../Config.html" title="Msf::Config (class)">Config</a></span></span><span class='period'>.</span><span class='id identifier rubyid_data_directory'><span class='object_link'><a href="../../../../Config.html#data_directory-class_method" title="Msf::Config.data_directory (method)">data_directory</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>wordlists</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'>named_pipes.txt</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_register_options'>register_options</span><span class='lparen'>(</span><span class='lbracket'>[</span>
<span class='const'><span class='object_link'><a href="../../../../OptPath.html" title="Msf::OptPath (class)">OptPath</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'>NAMED_PIPES</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'>List of named pipes to check</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_named_pipes'>named_pipes</span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='rbracket'>]</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>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,135 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Exception: Msf::Exploit::Remote::SMB::Client::Psexec_MS17_010::MS17_010_Error
&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::SMB::Client::Psexec_MS17_010::MS17_010_Error";
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 (M)</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="../../../SMB.html" title="Msf::Exploit::Remote::SMB (module)">SMB</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Client</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Psexec_MS17_010.html" title="Msf::Exploit::Remote::SMB::Client::Psexec_MS17_010 (module)">Psexec_MS17_010</a></span></span>
&raquo;
<span class="title">MS17_010_Error</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>Exception: Msf::Exploit::Remote::SMB::Client::Psexec_MS17_010::MS17_010_Error
</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd>
<span class="inheritName">StandardError</span>
<ul class="fullTree">
<li>Object</li>
<li class="next">StandardError</li>
<li class="next">Msf::Exploit::Remote::SMB::Client::Psexec_MS17_010::MS17_010_Error</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/smb/client/psexec_ms17_010.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>used to abruptly abort exploit for a given host with error msg</p>
</div>
</div>
<div class="tags">
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:03:46 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,323 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Module: Msf::Exploit::Remote::SMB::Client::RemotePaths
&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::SMB::Client::RemotePaths";
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="../../SMB.html" title="Msf::Exploit::Remote::SMB (module)">SMB</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::SMB::Client (module)">Client</a></span></span>
&raquo;
<span class="title">RemotePaths</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::SMB::Client::RemotePaths
</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/remote/smb/client/remote_paths.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>Mixin for handling options related to remote files in SMB modules</p>
</div>
</div>
<div class="tags">
</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="#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="#remote_paths-instance_method" title="#remote_paths (instance method)">#<strong>remote_paths</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#validate_rpaths!-instance_method" title="#validate_rpaths! (instance method)">#<strong>validate_rpaths!</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></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="initialize-instance_method">
#<strong>initialize</strong>(info = {}) &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8
9
10
11
12
13</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/remote_paths.rb', line 6</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_options'>register_options</span><span class='lparen'>(</span>
<span class='lbracket'>[</span>
<span class='const'><span class='object_link'><a href="../../../../OptString.html" title="Msf::OptString (class)">OptString</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../OptString.html#initialize-instance_method" title="Msf::OptString#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>RPATH</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='kw'>false</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>The name of the remote file relative to the share to operate on</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='const'><span class='object_link'><a href="../../../../OptPath.html" title="Msf::OptPath (class)">OptPath</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'>FILE_RPATHS</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='kw'>false</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>A file containing a list remote files relative to the share to operate on</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="remote_paths-instance_method">
#<strong>remote_paths</strong> &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
27
28
29
30
31
32
33</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/smb/client/remote_paths.rb', line 27</span>
<span class='kw'>def</span> <span class='id identifier rubyid_remote_paths'>remote_paths</span>
<span class='kw'>if</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'>FILE_RPATHS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='const'>IO</span><span class='period'>.</span><span class='id identifier rubyid_readlines'>readlines</span><span class='lparen'>(</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'>FILE_RPATHS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:strip</span><span class='rparen'>)</span>
<span class='kw'>elsif</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'>RPATH</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='lbracket'>[</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'>RPATH</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rbracket'>]</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="validate_rpaths!-instance_method">
#<strong>validate_rpaths!</strong> &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
15
16
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/smb/client/remote_paths.rb', line 15</span>
<span class='kw'>def</span> <span class='id identifier rubyid_validate_rpaths!'>validate_rpaths!</span>
<span class='kw'>unless</span> <span class='lparen'>(</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'>FILE_RPATHS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</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'>RPATH</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='op'>!</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'>FILE_RPATHS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</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'>RPATH</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='id identifier rubyid_validation_reason'>validation_reason</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>One and only one of FILE_RPATHS or RPATH must be specified</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_raise'>raise</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="../../../../OptionValidateError.html" title="Msf::OptionValidateError (class)">OptionValidateError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../OptionValidateError.html#initialize-instance_method" title="Msf::OptionValidateError#initialize (method)">new</a></span></span><span class='lparen'>(</span>
<span class='lbrace'>{</span>
<span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>FILE_RPATHS</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_validation_reason'>validation_reason</span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>RPATH</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_validation_reason'>validation_reason</span>
<span class='rbrace'>}</span>
<span class='rparen'>)</span>
<span class='kw'>end</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>
File diff suppressed because one or more lines are too long