1903 lines
131 KiB
HTML
1903 lines
131 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>
|
|
Module: Msf::Exploit::Remote::Kerberos::Client::TgsRequest
|
|
|
|
— 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::Kerberos::Client::TgsRequest";
|
|
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 (T)</a> »
|
|
<span class='title'><span class='object_link'><a href="../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> » <span class='title'><span class='object_link'><a href="../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> » <span class='title'><span class='object_link'><a href="../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> » <span class='title'><span class='object_link'><a href="../../Kerberos.html" title="Msf::Exploit::Remote::Kerberos (module)">Kerberos</a></span></span> » <span class='title'><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::Kerberos::Client (module)">Client</a></span></span>
|
|
»
|
|
<span class="title">TgsRequest</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::Kerberos::Client::TgsRequest
|
|
|
|
|
|
|
|
</h1>
|
|
<div class="box_info">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Included in:</dt>
|
|
<dd><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::Kerberos::Client (module)">Msf::Exploit::Remote::Kerberos::Client</a></span></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Defined in:</dt>
|
|
<dd>lib/msf/core/exploit/remote/kerberos/client/tgs_request.rb</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2>
|
|
Instance Method Summary
|
|
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
</h2>
|
|
|
|
<ul class="summary">
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#build_ap_req-instance_method" title="#build_ap_req (instance method)">#<strong>build_ap_req</strong>(opts = {}) ⇒ Rex::Proto::Kerberos::Model::EncryptionKey </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Builds a KRB_AP_REQ message.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#build_authenticator-instance_method" title="#build_authenticator (instance method)">#<strong>build_authenticator</strong>(opts = {}) ⇒ Rex::Proto::Kerberos::Model::Authenticator </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Builds a kerberos authenticator for a TGS request.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#build_enc_auth_data-instance_method" title="#build_enc_auth_data (instance method)">#<strong>build_enc_auth_data</strong>(opts = {}) ⇒ Rex::Proto::Kerberos::Model::EncryptedData </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Builds the encrypted TGS authorization data.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#build_pa_for_user-instance_method" title="#build_pa_for_user (instance method)">#<strong>build_pa_for_user</strong>(opts = {}) ⇒ Rex::Proto::Kerberos::Model::PreAuthDataEntry </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Builds a Kerberos PA-FOR-USER pa-data.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#build_subkey-instance_method" title="#build_subkey (instance method)">#<strong>build_subkey</strong>(opts = {}) ⇒ Rex::Proto::Kerberos::Model::EncryptionKey </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Builds an encryption key to protect the data sent in the TGS request.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#build_tgs_body_checksum-instance_method" title="#build_tgs_body_checksum (instance method)">#<strong>build_tgs_body_checksum</strong>(opts = {}) ⇒ Rex::Proto::Kerberos::Model::Checksum </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Builds a Kerberos TGS Request body checksum.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#build_tgs_request-instance_method" title="#build_tgs_request (instance method)">#<strong>build_tgs_request</strong>(opts = {}) ⇒ Rex::Proto::Kerberos::Model::KdcRequest </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Builds the encrypted Kerberos TGS request.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#build_tgs_request_body-instance_method" title="#build_tgs_request_body (instance method)">#<strong>build_tgs_request_body</strong>(opts = {}) ⇒ Rex::Proto::Kerberos::Model::KdcRequestBody </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Builds a kerberos TGS request body.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<div id="instance_method_details" class="method_details_list">
|
|
<h2>Instance Method Details</h2>
|
|
|
|
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="build_ap_req-instance_method">
|
|
|
|
#<strong>build_ap_req</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Builds a KRB_AP_REQ message</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash{Symbol => <Integer, <span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Ticket.html" title="Rex::Proto::Kerberos::Model::Ticket (class)">Rex::Proto::Kerberos::Model::Ticket</a></span>, <span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">Rex::Proto::Kerberos::Model::EncryptedData</a></span>, <span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span>>}</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:pvno</span>
|
|
<span class="type">(<tt>Integer</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:msg_type</span>
|
|
<span class="type">(<tt>Integer</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:ap_req_options</span>
|
|
<span class="type">(<tt>Integer</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:ticket</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Ticket.html" title="Rex::Proto::Kerberos::Model::Ticket (class)">Rex::Proto::Kerberos::Model::Ticket</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:authenticator</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">Rex::Proto::Kerberos::Model::EncryptedData</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:session_key</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
<p class="tag_title">Raises:</p>
|
|
<ul class="raise">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Error/KerberosError.html" title="Rex::Proto::Kerberos::Model::Error::KerberosError (class)">Rex::Proto::Kerberos::Model::Error::KerberosError</a></span></tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>if ticket option isn't provided</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Ticket.html" title="Rex::Proto::Kerberos::Model::Ticket (class)">Rex::Proto::Kerberos::Model::Ticket</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">Rex::Proto::Kerberos::Model::EncryptedData</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
160
|
|
161
|
|
162
|
|
163
|
|
164
|
|
165
|
|
166
|
|
167
|
|
168
|
|
169
|
|
170
|
|
171
|
|
172
|
|
173
|
|
174
|
|
175
|
|
176
|
|
177
|
|
178
|
|
179
|
|
180
|
|
181
|
|
182
|
|
183
|
|
184
|
|
185
|
|
186
|
|
187
|
|
188
|
|
189
|
|
190</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/tgs_request.rb', line 160</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_ap_req'>build_ap_req</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_pvno'>pvno</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:pvno</span><span class='rparen'>)</span> <span class='lbrace'>{</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.html#VERSION-constant" title="Rex::Proto::Kerberos::Model::VERSION (constant)">VERSION</a></span></span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_msg_type'>msg_type</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:msg_type</span><span class='rparen'>)</span> <span class='lbrace'>{</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.html#AP_REQ-constant" title="Rex::Proto::Kerberos::Model::AP_REQ (constant)">AP_REQ</a></span></span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:ap_req_options</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='int'>0</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_ticket'>ticket</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ticket</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_authenticator'>authenticator</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:authenticator</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
|
<span class='id identifier rubyid_build_authenticator'>build_authenticator</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span>
|
|
<span class='label'>authenticator_enc_key_usage:</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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/KeyUsage.html" title="Rex::Proto::Kerberos::Crypto::KeyUsage (module)">KeyUsage</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/KeyUsage.html#AP_REQ_AUTHENTICATOR-constant" title="Rex::Proto::Kerberos::Crypto::KeyUsage::AP_REQ_AUTHENTICATOR (constant)">AP_REQ_AUTHENTICATOR</a></span></span>
|
|
<span class='rparen'>)</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
<span class='id identifier rubyid_session_key'>session_key</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:session_key</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_build_subkey'>build_subkey</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_ticket'>ticket</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</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/KerberosError.html" title="Rex::Proto::Kerberos::Model::Error::KerberosError (class)">KerberosError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Building a AP-REQ without ticket not supported</span><span class='tstring_end'>'</span></span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_enc_authenticator'>enc_authenticator</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/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">EncryptedData</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>etype:</span> <span class='id identifier rubyid_session_key'>session_key</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span>
|
|
<span class='label'>cipher:</span> <span class='id identifier rubyid_authenticator'>authenticator</span><span class='period'>.</span><span class='id identifier rubyid_encrypt'>encrypt</span><span class='lparen'>(</span><span class='id identifier rubyid_session_key'>session_key</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_session_key'>session_key</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_ap_req'>ap_req</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/ApReq.html" title="Rex::Proto::Kerberos::Model::ApReq (class)">ApReq</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>pvno:</span> <span class='id identifier rubyid_pvno'>pvno</span><span class='comma'>,</span>
|
|
<span class='label'>msg_type:</span> <span class='id identifier rubyid_msg_type'>msg_type</span><span class='comma'>,</span>
|
|
<span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span>
|
|
<span class='label'>ticket:</span> <span class='id identifier rubyid_ticket'>ticket</span><span class='comma'>,</span>
|
|
<span class='label'>authenticator:</span> <span class='id identifier rubyid_enc_authenticator'>enc_authenticator</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_ap_req'>ap_req</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="build_authenticator-instance_method">
|
|
|
|
#<strong>build_authenticator</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Authenticator.html" title="Rex::Proto::Kerberos::Model::Authenticator (class)">Rex::Proto::Kerberos::Model::Authenticator</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Builds a kerberos authenticator for a TGS request</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash{Symbol => <<span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PrincipalName.html" title="Rex::Proto::Kerberos::Model::PrincipalName (class)">Rex::Proto::Kerberos::Model::PrincipalName</a></span>, String, Time, <span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span>>}</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:cname</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PrincipalName.html" title="Rex::Proto::Kerberos::Model::PrincipalName (class)">Rex::Proto::Kerberos::Model::PrincipalName</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:realm</span>
|
|
<span class="type">(<tt>String</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:ctime</span>
|
|
<span class="type">(<tt>Time</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:cusec</span>
|
|
<span class="type">(<tt>Integer</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:checksum</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Checksum.html" title="Rex::Proto::Kerberos::Model::Checksum (class)">Rex::Proto::Kerberos::Model::Checksum</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:subkey</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Authenticator.html" title="Rex::Proto::Kerberos::Model::Authenticator (class)">Rex::Proto::Kerberos::Model::Authenticator</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PrincipalName.html" title="Rex::Proto::Kerberos::Model::PrincipalName (class)">Rex::Proto::Kerberos::Model::PrincipalName</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Checksum.html" title="Rex::Proto::Kerberos::Model::Checksum (class)">Rex::Proto::Kerberos::Model::Checksum</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Authenticator.html" title="Rex::Proto::Kerberos::Model::Authenticator (class)">Rex::Proto::Kerberos::Model::Authenticator</a></span></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
206
|
|
207
|
|
208
|
|
209
|
|
210
|
|
211
|
|
212
|
|
213
|
|
214
|
|
215
|
|
216
|
|
217
|
|
218
|
|
219
|
|
220
|
|
221
|
|
222
|
|
223
|
|
224
|
|
225
|
|
226
|
|
227
|
|
228
|
|
229
|
|
230
|
|
231</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/tgs_request.rb', line 206</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_authenticator'>build_authenticator</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_cname'>cname</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:cname</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_build_client_name'>build_client_name</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_realm'>realm</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:realm</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_ctime'>ctime</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:ctime</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_kerberos_time'>kerberos_time</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_cusec'>cusec</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:cusec</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_ctime'>ctime</span><span class='op'>&.</span><span class='id identifier rubyid_usec'>usec</span> <span class='op'>||</span> <span class='int'>0</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_sequence_number'>sequence_number</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:sequence_number</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_rand'>rand</span><span class='lparen'>(</span><span class='int'>1</span> <span class='op'><<</span> <span class='int'>32</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_checksum'>checksum</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:checksum</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_build_tgs_body_checksum'>build_tgs_body_checksum</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_subkey'>subkey</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:subkey</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_build_subkey'>build_subkey</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_authenticator_enc_key_usage'>authenticator_enc_key_usage</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:authenticator_enc_key_usage</span><span class='rparen'>)</span> <span class='kw'>do</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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/KeyUsage.html" title="Rex::Proto::Kerberos::Crypto::KeyUsage (module)">KeyUsage</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/KeyUsage.html#TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR-constant" title="Rex::Proto::Kerberos::Crypto::KeyUsage::TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR (constant)">TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR</a></span></span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_authenticator'>authenticator</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/Authenticator.html" title="Rex::Proto::Kerberos::Model::Authenticator (class)">Authenticator</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>vno:</span> <span class='int'>5</span><span class='comma'>,</span>
|
|
<span class='label'>crealm:</span> <span class='id identifier rubyid_realm'>realm</span><span class='comma'>,</span>
|
|
<span class='label'>cname:</span> <span class='id identifier rubyid_cname'>cname</span><span class='comma'>,</span>
|
|
<span class='label'>checksum:</span> <span class='id identifier rubyid_checksum'>checksum</span><span class='comma'>,</span>
|
|
<span class='label'>cusec:</span> <span class='id identifier rubyid_cusec'>cusec</span><span class='comma'>,</span>
|
|
<span class='label'>ctime:</span> <span class='id identifier rubyid_ctime'>ctime</span><span class='comma'>,</span>
|
|
<span class='label'>subkey:</span> <span class='id identifier rubyid_subkey'>subkey</span><span class='comma'>,</span>
|
|
<span class='label'>enc_key_usage:</span> <span class='id identifier rubyid_authenticator_enc_key_usage'>authenticator_enc_key_usage</span><span class='comma'>,</span>
|
|
<span class='label'>sequence_number:</span> <span class='id identifier rubyid_sequence_number'>sequence_number</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_authenticator'>authenticator</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="build_enc_auth_data-instance_method">
|
|
|
|
#<strong>build_enc_auth_data</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">Rex::Proto::Kerberos::Model::EncryptedData</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Builds the encrypted TGS authorization data</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash{Symbol => <<span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">Rex::Proto::Kerberos::Model::AuthorizationData</a></span>, <span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span>>}</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:auth_data</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">Rex::Proto::Kerberos::Model::AuthorizationData</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:subkey</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">Rex::Proto::Kerberos::Model::EncryptedData</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
<p class="tag_title">Raises:</p>
|
|
<ul class="raise">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Error/KerberosError.html" title="Rex::Proto::Kerberos::Model::Error::KerberosError (class)">Rex::Proto::Kerberos::Model::Error::KerberosError</a></span></tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>if auth_data option isn't provided</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">Rex::Proto::Kerberos::Model::AuthorizationData</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">Rex::Proto::Kerberos::Model::EncryptedData</a></span></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
127
|
|
128
|
|
129
|
|
130
|
|
131
|
|
132
|
|
133
|
|
134
|
|
135
|
|
136
|
|
137
|
|
138
|
|
139
|
|
140
|
|
141
|
|
142
|
|
143
|
|
144</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/tgs_request.rb', line 127</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_enc_auth_data'>build_enc_auth_data</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_auth_data'>auth_data</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:auth_data</span><span class='rbracket'>]</span>
|
|
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_auth_data'>auth_data</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</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/KerberosError.html" title="Rex::Proto::Kerberos::Model::Error::KerberosError (class)">KerberosError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>auth_data option required on #build_enc_auth_data</span><span class='tstring_end'>'</span></span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_subkey'>subkey</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:subkey</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_build_subkey'>build_subkey</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_encrypted'>encrypted</span> <span class='op'>=</span> <span class='id identifier rubyid_auth_data'>auth_data</span><span class='period'>.</span><span class='id identifier rubyid_encrypt'>encrypt</span><span class='lparen'>(</span><span class='id identifier rubyid_subkey'>subkey</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_subkey'>subkey</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_e_data'>e_data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/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/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">EncryptedData</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>etype:</span> <span class='id identifier rubyid_subkey'>subkey</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span>
|
|
<span class='label'>cipher:</span> <span class='id identifier rubyid_encrypted'>encrypted</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_e_data'>e_data</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="build_pa_for_user-instance_method">
|
|
|
|
#<strong>build_pa_for_user</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthDataEntry.html" title="Rex::Proto::Kerberos::Model::PreAuthDataEntry (class)">Rex::Proto::Kerberos::Model::PreAuthDataEntry</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Builds a Kerberos PA-FOR-USER pa-data</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:username</span>
|
|
<span class="type">(<tt>String</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
— <div class='inline'>
|
|
<p>The name of the user on whose behalf the service requests the service ticket</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:realm</span>
|
|
<span class="type">(<tt>String</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
— <div class='inline'>
|
|
<p>The realm in which the user account is located</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:session_key</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
— <div class='inline'>
|
|
<p>The session key of the TGT</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthDataEntry.html" title="Rex::Proto::Kerberos::Model::PreAuthDataEntry (class)">Rex::Proto::Kerberos::Model::PreAuthDataEntry</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li><a href="https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-sfu/aceb70de-40f0-4409-87fa-df00ca145f5a" target="_parent" title="https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-sfu/aceb70de-40f0-4409-87fa-df00ca145f5a">https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-sfu/aceb70de-40f0-4409-87fa-df00ca145f5a</a></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
330
|
|
331
|
|
332
|
|
333
|
|
334
|
|
335
|
|
336
|
|
337
|
|
338
|
|
339
|
|
340
|
|
341
|
|
342
|
|
343
|
|
344
|
|
345
|
|
346
|
|
347
|
|
348
|
|
349
|
|
350
|
|
351
|
|
352
|
|
353
|
|
354
|
|
355
|
|
356
|
|
357
|
|
358
|
|
359
|
|
360
|
|
361
|
|
362</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/tgs_request.rb', line 330</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_pa_for_user'>build_pa_for_user</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_auth_package'>auth_package</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Kerberos</span><span class='tstring_end'>'</span></span><span class='period'>.</span><span class='id identifier rubyid_b'>b</span>
|
|
|
|
<span class='id identifier rubyid_checksum_data'>checksum_data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><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/NameType.html" title="Rex::Proto::Kerberos::Model::NameType (module)">NameType</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/NameType.html#NT_PRINCIPAL-constant" title="Rex::Proto::Kerberos::Model::NameType::NT_PRINCIPAL (constant)">NT_PRINCIPAL</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_pack'>pack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>I<</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_checksum_data'>checksum_data</span> <span class='op'><<</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:username</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_b'>b</span>
|
|
<span class='id identifier rubyid_checksum_data'>checksum_data</span> <span class='op'><<</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:realm</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_b'>b</span>
|
|
<span class='id identifier rubyid_checksum_data'>checksum_data</span> <span class='op'><<</span> <span class='id identifier rubyid_auth_package'>auth_package</span>
|
|
|
|
<span class='id identifier rubyid_checksummer'>checksummer</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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Checksum.html" title="Rex::Proto::Kerberos::Crypto::Checksum (module)">Checksum</a></span></span><span class='period'>.</span><span class='id identifier rubyid_from_checksum_type'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Checksum.html#from_checksum_type-class_method" title="Rex::Proto::Kerberos::Crypto::Checksum.from_checksum_type (method)">from_checksum_type</a></span></span><span class='lparen'>(</span>
|
|
<span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Checksum.html" title="Rex::Proto::Kerberos::Crypto::Checksum (module)">Checksum</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Checksum.html#HMAC_MD5-constant" title="Rex::Proto::Kerberos::Crypto::Checksum::HMAC_MD5 (constant)">HMAC_MD5</a></span></span>
|
|
<span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_checksum'>checksum</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/Checksum.html" title="Rex::Proto::Kerberos::Model::Checksum (class)">Checksum</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span>
|
|
<span class='id identifier rubyid_checksum'>checksum</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Checksum.html" title="Rex::Proto::Kerberos::Crypto::Checksum (module)">Checksum</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Checksum.html#HMAC_MD5-constant" title="Rex::Proto::Kerberos::Crypto::Checksum::HMAC_MD5 (constant)">HMAC_MD5</a></span></span>
|
|
<span class='id identifier rubyid_checksum'>checksum</span><span class='period'>.</span><span class='id identifier rubyid_checksum'>checksum</span> <span class='op'>=</span> <span class='id identifier rubyid_checksummer'>checksummer</span><span class='period'>.</span><span class='id identifier rubyid_checksum'>checksum</span><span class='lparen'>(</span>
|
|
<span class='id identifier rubyid_opts'>opts</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='comma'>,</span>
|
|
<span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/KeyUsage.html" title="Rex::Proto::Kerberos::Crypto::KeyUsage (module)">KeyUsage</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/KeyUsage.html#KERB_NON_KERB_CKSUM_SALT-constant" title="Rex::Proto::Kerberos::Crypto::KeyUsage::KERB_NON_KERB_CKSUM_SALT (constant)">KERB_NON_KERB_CKSUM_SALT</a></span></span><span class='comma'>,</span>
|
|
<span class='id identifier rubyid_checksum_data'>checksum_data</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pa_for_user'>pa_for_user</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/PreAuthForUser.html" title="Rex::Proto::Kerberos::Model::PreAuthForUser (class)">PreAuthForUser</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span>
|
|
<span class='id identifier rubyid_pa_for_user'>pa_for_user</span><span class='period'>.</span><span class='id identifier rubyid_user_name'>user_name</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/PrincipalName.html" title="Rex::Proto::Kerberos::Model::PrincipalName (class)">PrincipalName</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>name_type:</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/NameType.html" title="Rex::Proto::Kerberos::Model::NameType (module)">NameType</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/NameType.html#NT_PRINCIPAL-constant" title="Rex::Proto::Kerberos::Model::NameType::NT_PRINCIPAL (constant)">NT_PRINCIPAL</a></span></span><span class='comma'>,</span>
|
|
<span class='label'>name_string:</span> <span class='lbracket'>[</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:username</span><span class='rbracket'>]</span> <span class='rbracket'>]</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_pa_for_user'>pa_for_user</span><span class='period'>.</span><span class='id identifier rubyid_user_realm'>user_realm</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:realm</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_pa_for_user'>pa_for_user</span><span class='period'>.</span><span class='id identifier rubyid_cksum'>cksum</span> <span class='op'>=</span> <span class='id identifier rubyid_checksum'>checksum</span>
|
|
<span class='id identifier rubyid_pa_for_user'>pa_for_user</span><span class='period'>.</span><span class='id identifier rubyid_auth_package'>auth_package</span> <span class='op'>=</span> <span class='id identifier rubyid_auth_package'>auth_package</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/PreAuthDataEntry.html" title="Rex::Proto::Kerberos::Model::PreAuthDataEntry (class)">PreAuthDataEntry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>type:</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/PreAuthType.html" title="Rex::Proto::Kerberos::Model::PreAuthType (module)">PreAuthType</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthType.html#PA_FOR_USER-constant" title="Rex::Proto::Kerberos::Model::PreAuthType::PA_FOR_USER (constant)">PA_FOR_USER</a></span></span><span class='comma'>,</span>
|
|
<span class='label'>value:</span> <span class='id identifier rubyid_pa_for_user'>pa_for_user</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="build_subkey-instance_method">
|
|
|
|
#<strong>build_subkey</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Builds an encryption key to protect the data sent in the TGS request.</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash{Symbol => <Integer, String>}</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:subkey_type</span>
|
|
<span class="type">(<tt>Integer</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:subkey_value</span>
|
|
<span class="type">(<tt>String</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
240
|
|
241
|
|
242
|
|
243
|
|
244
|
|
245
|
|
246
|
|
247
|
|
248
|
|
249
|
|
250</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/tgs_request.rb', line 240</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_subkey'>build_subkey</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_subkey_type'>subkey_type</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:subkey_type</span><span class='rparen'>)</span> <span class='lbrace'>{</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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Encryption.html" title="Rex::Proto::Kerberos::Crypto::Encryption (module)">Encryption</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Encryption.html#DefaultEncryptionType-constant" title="Rex::Proto::Kerberos::Crypto::Encryption::DefaultEncryptionType (constant)">DefaultEncryptionType</a></span></span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_subkey_value'>subkey_value</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:subkey_value</span><span class='rparen'>)</span> <span class='lbrace'>{</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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Encryption.html" title="Rex::Proto::Kerberos::Crypto::Encryption (module)">Encryption</a></span></span><span class='op'>::</span><span class='id identifier rubyid_from_etype'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Encryption.html#from_etype-class_method" title="Rex::Proto::Kerberos::Crypto::Encryption.from_etype (method)">from_etype</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_subkey_type'>subkey_type</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_string_to_key'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/BlockCipherBase.html#string_to_key-instance_method" title="Rex::Proto::Kerberos::Crypto::BlockCipherBase#string_to_key (method)">string_to_key</a></span></span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'>Text</span><span class='period'>.</span><span class='id identifier rubyid_rand_text_alphanumeric'>rand_text_alphanumeric</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
|
|
<span class='id identifier rubyid_subkey'>subkey</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/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">EncryptionKey</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>type:</span> <span class='id identifier rubyid_subkey_type'>subkey_type</span><span class='comma'>,</span>
|
|
<span class='label'>value:</span> <span class='id identifier rubyid_subkey_value'>subkey_value</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_subkey'>subkey</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="build_tgs_body_checksum-instance_method">
|
|
|
|
#<strong>build_tgs_body_checksum</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Checksum.html" title="Rex::Proto::Kerberos::Model::Checksum (class)">Rex::Proto::Kerberos::Model::Checksum</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Builds a Kerberos TGS Request body checksum</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash{Symbol => <<span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcRequestBody.html" title="Rex::Proto::Kerberos::Model::KdcRequestBody (class)">Rex::Proto::Kerberos::Model::KdcRequestBody</a></span>, Integer>}</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:body</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcRequestBody.html" title="Rex::Proto::Kerberos::Model::KdcRequestBody (class)">Rex::Proto::Kerberos::Model::KdcRequestBody</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Checksum.html" title="Rex::Proto::Kerberos::Model::Checksum (class)">Rex::Proto::Kerberos::Model::Checksum</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li><span class='object_link'><a href="#build_tgs_request_body-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsRequest#build_tgs_request_body (method)">#build_tgs_request_body</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Checksum.html" title="Rex::Proto::Kerberos::Model::Checksum (class)">Rex::Proto::Kerberos::Model::Checksum</a></span></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
306
|
|
307
|
|
308
|
|
309
|
|
310
|
|
311
|
|
312
|
|
313
|
|
314
|
|
315
|
|
316
|
|
317
|
|
318
|
|
319</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/tgs_request.rb', line 306</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_tgs_body_checksum'>build_tgs_body_checksum</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:body</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_build_tgs_request_body'>build_tgs_request_body</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_checksum_type'>checksum_type</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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Checksum.html" title="Rex::Proto::Kerberos::Crypto::Checksum (module)">Checksum</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Checksum.html#RSA_MD5-constant" title="Rex::Proto::Kerberos::Crypto::Checksum::RSA_MD5 (constant)">RSA_MD5</a></span></span>
|
|
<span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
|
<span class='id identifier rubyid_cksum_key_usage'>cksum_key_usage</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:cksum_key_usage</span><span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_checksum_body'>checksum_body</span> <span class='op'>=</span> <span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_checksum'>checksum</span><span class='lparen'>(</span><span class='id identifier rubyid_checksum_type'>checksum_type</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_cksum_key_usage'>cksum_key_usage</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_checksum'>checksum</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/Checksum.html" title="Rex::Proto::Kerberos::Model::Checksum (class)">Checksum</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>type:</span> <span class='id identifier rubyid_checksum_type'>checksum_type</span><span class='comma'>,</span>
|
|
<span class='label'>checksum:</span> <span class='id identifier rubyid_checksum_body'>checksum_body</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_checksum'>checksum</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="build_tgs_request-instance_method">
|
|
|
|
#<strong>build_tgs_request</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcRequest.html" title="Rex::Proto::Kerberos::Model::KdcRequest (class)">Rex::Proto::Kerberos::Model::KdcRequest</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Builds the encrypted Kerberos TGS request</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash{Symbol => <<span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html" title="Rex::Proto::Kerberos::Model::Element (class)">Rex::Proto::Kerberos::Model::Element</a></span>>}</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:auth_data</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">Rex::Proto::Kerberos::Model::AuthorizationData</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:enc_auth_data</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">Rex::Proto::Kerberos::Model::EncryptedData</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:subkey</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:checksum</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Checksum.html" title="Rex::Proto::Kerberos::Model::Checksum (class)">Rex::Proto::Kerberos::Model::Checksum</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:authenticator</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Authenticator.html" title="Rex::Proto::Kerberos::Model::Authenticator (class)">Rex::Proto::Kerberos::Model::Authenticator</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:pa_data</span>
|
|
<span class="type">(<tt>Array<<span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthDataEntry.html" title="Rex::Proto::Kerberos::Model::PreAuthDataEntry (class)">Rex::Proto::Kerberos::Model::PreAuthDataEntry</a></span>></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:impersonate_type</span>
|
|
<span class="type">(<tt>String</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcRequest.html" title="Rex::Proto::Kerberos::Model::KdcRequest (class)">Rex::Proto::Kerberos::Model::KdcRequest</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
<p class="tag_title">Raises:</p>
|
|
<ul class="raise">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>RuntimeError</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>if ticket isn't available</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">Rex::Proto::Kerberos::Model::AuthorizationData</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">Rex::Proto::Kerberos::Model::EncryptedData</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptionKey.html" title="Rex::Proto::Kerberos::Model::EncryptionKey (class)">Rex::Proto::Kerberos::Model::EncryptionKey</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Checksum.html" title="Rex::Proto::Kerberos::Model::Checksum (class)">Rex::Proto::Kerberos::Model::Checksum</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Authenticator.html" title="Rex::Proto::Kerberos::Model::Authenticator (class)">Rex::Proto::Kerberos::Model::Authenticator</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthDataEntry.html" title="Rex::Proto::Kerberos::Model::PreAuthDataEntry (class)">Rex::Proto::Kerberos::Model::PreAuthDataEntry</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcRequest.html" title="Rex::Proto::Kerberos::Model::KdcRequest (class)">Rex::Proto::Kerberos::Model::KdcRequest</a></span></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
29
|
|
30
|
|
31
|
|
32
|
|
33
|
|
34
|
|
35
|
|
36
|
|
37
|
|
38
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43
|
|
44
|
|
45
|
|
46
|
|
47
|
|
48
|
|
49
|
|
50
|
|
51
|
|
52
|
|
53
|
|
54
|
|
55
|
|
56
|
|
57
|
|
58
|
|
59
|
|
60
|
|
61
|
|
62
|
|
63
|
|
64
|
|
65
|
|
66
|
|
67
|
|
68
|
|
69
|
|
70
|
|
71
|
|
72
|
|
73
|
|
74
|
|
75
|
|
76
|
|
77
|
|
78
|
|
79
|
|
80
|
|
81
|
|
82
|
|
83
|
|
84
|
|
85
|
|
86
|
|
87
|
|
88
|
|
89
|
|
90
|
|
91
|
|
92
|
|
93
|
|
94
|
|
95
|
|
96
|
|
97
|
|
98
|
|
99
|
|
100
|
|
101
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
107
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112
|
|
113
|
|
114
|
|
115</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/tgs_request.rb', line 29</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_tgs_request'>build_tgs_request</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_subkey'>subkey</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:subkey</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_build_subkey'>build_subkey</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:enc_auth_data</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_enc_auth_data'>enc_auth_data</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:enc_auth_data</span><span class='rbracket'>]</span>
|
|
<span class='kw'>elsif</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:auth_data</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_enc_auth_data'>enc_auth_data</span> <span class='op'>=</span> <span class='id identifier rubyid_build_enc_auth_data'>build_enc_auth_data</span><span class='lparen'>(</span>
|
|
<span class='label'>auth_data:</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:auth_data</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
<span class='label'>subkey:</span> <span class='id identifier rubyid_subkey'>subkey</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='kw'>else</span>
|
|
<span class='id identifier rubyid_enc_auth_data'>enc_auth_data</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:body</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
|
<span class='id identifier rubyid_build_tgs_request_body'>build_tgs_request_body</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span>
|
|
<span class='label'>enc_auth_data:</span> <span class='id identifier rubyid_enc_auth_data'>enc_auth_data</span>
|
|
<span class='rparen'>)</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_checksum'>checksum</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:checksum</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
|
|
|
<span class='id identifier rubyid_build_tgs_body_checksum'>build_tgs_body_checksum</span><span class='lparen'>(</span><span class='label'>body:</span> <span class='id identifier rubyid_body'>body</span><span class='comma'>,</span>
|
|
<span class='label'>session_key:</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:session_key</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
<span class='label'>cksum_key_usage:</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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/KeyUsage.html" title="Rex::Proto::Kerberos::Crypto::KeyUsage (module)">KeyUsage</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/KeyUsage.html#TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR_CHKSUM-constant" title="Rex::Proto::Kerberos::Crypto::KeyUsage::TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR_CHKSUM (constant)">TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR_CHKSUM</a></span></span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_authenticator'>authenticator</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:authenticator</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
|
<span class='id identifier rubyid_build_authenticator'>build_authenticator</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span>
|
|
<span class='label'>subkey:</span> <span class='id identifier rubyid_subkey'>subkey</span><span class='comma'>,</span>
|
|
<span class='label'>checksum:</span> <span class='id identifier rubyid_checksum'>checksum</span><span class='comma'>,</span>
|
|
<span class='label'>body:</span> <span class='id identifier rubyid_body'>body</span><span class='comma'>,</span>
|
|
<span class='label'>authenticator_enc_key_usage:</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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/KeyUsage.html" title="Rex::Proto::Kerberos::Crypto::KeyUsage (module)">KeyUsage</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/KeyUsage.html#TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR-constant" title="Rex::Proto::Kerberos::Crypto::KeyUsage::TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR (constant)">TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR</a></span></span>
|
|
<span class='rparen'>)</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_ap_req'>ap_req</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:ap_req</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_build_ap_req'>build_ap_req</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='label'>authenticator:</span> <span class='id identifier rubyid_authenticator'>authenticator</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
|
|
<span class='id identifier rubyid_pa_ap_req'>pa_ap_req</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/PreAuthDataEntry.html" title="Rex::Proto::Kerberos::Model::PreAuthDataEntry (class)">PreAuthDataEntry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>type:</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/PreAuthType.html" title="Rex::Proto::Kerberos::Model::PreAuthType (module)">PreAuthType</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthType.html#PA_TGS_REQ-constant" title="Rex::Proto::Kerberos::Model::PreAuthType::PA_TGS_REQ (constant)">PA_TGS_REQ</a></span></span><span class='comma'>,</span>
|
|
<span class='label'>value:</span> <span class='id identifier rubyid_ap_req'>ap_req</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pa_data'>pa_data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_pa_data'>pa_data</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='id identifier rubyid_pa_ap_req'>pa_ap_req</span><span class='rparen'>)</span>
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:impersonate_type</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:impersonate_type</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>dmsa</span><span class='tstring_end'>'</span></span>
|
|
<span class='id identifier rubyid_x509_user'>x509_user</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/PreAuthS4uX509User.html" title="Rex::Proto::Kerberos::Model::PreAuthS4uX509User (class)">PreAuthS4uX509User</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthS4uX509User.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::PreAuthS4uX509User#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:session_key</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:impersonate</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:impersonate_type</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_realm'>realm</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:nonce</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pa_data_x509_user'>pa_data_x509_user</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/PreAuthDataEntry.html" title="Rex::Proto::Kerberos::Model::PreAuthDataEntry (class)">PreAuthDataEntry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>type:</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/PreAuthType.html" title="Rex::Proto::Kerberos::Model::PreAuthType (module)">PreAuthType</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthType.html#PA_S4U_X509_USER-constant" title="Rex::Proto::Kerberos::Model::PreAuthType::PA_S4U_X509_USER (constant)">PA_S4U_X509_USER</a></span></span><span class='comma'>,</span>
|
|
<span class='label'>value:</span> <span class='id identifier rubyid_x509_user'>x509_user</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pa_data'>pa_data</span> <span class='op'><<</span> <span class='id identifier rubyid_pa_data_x509_user'>pa_data_x509_user</span>
|
|
|
|
<span class='id identifier rubyid_pa_pac_options_flags'>pa_pac_options_flags</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/PreAuthPacOptionsFlags.html" title="Rex::Proto::Kerberos::Model::PreAuthPacOptionsFlags (class)">PreAuthPacOptionsFlags</a></span></span><span class='period'>.</span><span class='id identifier rubyid_from_flags'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KerberosFlags.html#from_flags-class_method" title="Rex::Proto::Kerberos::Model::KerberosFlags.from_flags (method)">from_flags</a></span></span><span class='lparen'>(</span>
|
|
<span class='lbracket'>[</span>
|
|
<span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><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/PreAuthPacOptionsFlags.html" title="Rex::Proto::Kerberos::Model::PreAuthPacOptionsFlags (class)">PreAuthPacOptionsFlags</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthPacOptionsFlags.html#BRANCH_AWARE-constant" title="Rex::Proto::Kerberos::Model::PreAuthPacOptionsFlags::BRANCH_AWARE (constant)">BRANCH_AWARE</a></span></span>
|
|
<span class='rbracket'>]</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pa_pac_options'>pa_pac_options</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/PreAuthPacOptions.html" title="Rex::Proto::Kerberos::Model::PreAuthPacOptions (class)">PreAuthPacOptions</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>flags:</span> <span class='id identifier rubyid_pa_pac_options_flags'>pa_pac_options_flags</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pa_pac'>pa_pac</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/PreAuthDataEntry.html" title="Rex::Proto::Kerberos::Model::PreAuthDataEntry (class)">PreAuthDataEntry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>type:</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/PreAuthType.html" title="Rex::Proto::Kerberos::Model::PreAuthType (module)">PreAuthType</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthType.html#PA_PAC_OPTIONS-constant" title="Rex::Proto::Kerberos::Model::PreAuthType::PA_PAC_OPTIONS (constant)">PA_PAC_OPTIONS</a></span></span><span class='comma'>,</span>
|
|
<span class='label'>value:</span> <span class='id identifier rubyid_pa_pac_options'>pa_pac_options</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pa_data'>pa_data</span> <span class='op'><<</span> <span class='id identifier rubyid_pa_pac'>pa_pac</span>
|
|
<span class='kw'>end</span>
|
|
|
|
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:pa_data</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:pa_data</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_pa'>pa</span><span class='op'>|</span> <span class='id identifier rubyid_pa_data'>pa_data</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='id identifier rubyid_pa'>pa</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_request'>request</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/KdcRequest.html" title="Rex::Proto::Kerberos::Model::KdcRequest (class)">KdcRequest</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>pvno:</span> <span class='int'>5</span><span class='comma'>,</span>
|
|
<span class='label'>msg_type:</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.html#TGS_REQ-constant" title="Rex::Proto::Kerberos::Model::TGS_REQ (constant)">TGS_REQ</a></span></span><span class='comma'>,</span>
|
|
<span class='label'>pa_data:</span> <span class='id identifier rubyid_pa_data'>pa_data</span><span class='comma'>,</span>
|
|
<span class='label'>req_body:</span> <span class='id identifier rubyid_body'>body</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_request'>request</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="build_tgs_request_body-instance_method">
|
|
|
|
#<strong>build_tgs_request_body</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcRequestBody.html" title="Rex::Proto::Kerberos::Model::KdcRequestBody (class)">Rex::Proto::Kerberos::Model::KdcRequestBody</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Builds a kerberos TGS request body</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash{Symbol => <Integer, Time, String, <span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PrincipalName.html" title="Rex::Proto::Kerberos::Model::PrincipalName (class)">Rex::Proto::Kerberos::Model::PrincipalName</a></span>, <span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">Rex::Proto::Kerberos::Model::EncryptedData</a></span>>}</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:options</span>
|
|
<span class="type">(<tt>Integer</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:from</span>
|
|
<span class="type">(<tt>Time</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:till</span>
|
|
<span class="type">(<tt>Time</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:rtime</span>
|
|
<span class="type">(<tt>Time</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:nonce</span>
|
|
<span class="type">(<tt>Integer</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:etype</span>
|
|
<span class="type">(<tt>Integer</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:cname</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PrincipalName.html" title="Rex::Proto::Kerberos::Model::PrincipalName (class)">Rex::Proto::Kerberos::Model::PrincipalName</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:realm</span>
|
|
<span class="type">(<tt>String</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:sname</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PrincipalName.html" title="Rex::Proto::Kerberos::Model::PrincipalName (class)">Rex::Proto::Kerberos::Model::PrincipalName</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:enc_auth_data</span>
|
|
<span class="type">(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">Rex::Proto::Kerberos::Model::EncryptedData</a></span></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:additional_tickets</span>
|
|
<span class="type">(<tt>Array<<span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncryptedData.html" title="Rex::Proto::Kerberos::Model::EncryptedData (class)">Rex::Proto::Kerberos::Model::EncryptedData</a></span>></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcRequestBody.html" title="Rex::Proto::Kerberos::Model::KdcRequestBody (class)">Rex::Proto::Kerberos::Model::KdcRequestBody</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PrincipalName.html" title="Rex::Proto::Kerberos::Model::PrincipalName (class)">Rex::Proto::Kerberos::Model::PrincipalName</a></span></li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcRequestBody.html" title="Rex::Proto::Kerberos::Model::KdcRequestBody (class)">Rex::Proto::Kerberos::Model::KdcRequestBody</a></span></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
269
|
|
270
|
|
271
|
|
272
|
|
273
|
|
274
|
|
275
|
|
276
|
|
277
|
|
278
|
|
279
|
|
280
|
|
281
|
|
282
|
|
283
|
|
284
|
|
285
|
|
286
|
|
287
|
|
288
|
|
289
|
|
290
|
|
291
|
|
292
|
|
293
|
|
294
|
|
295
|
|
296
|
|
297</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/tgs_request.rb', line 269</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_tgs_request_body'>build_tgs_request_body</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:options</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='int'>0x50800000</span> <span class='rbrace'>}</span> <span class='comment'># Forwardable, Proxiable, Renewable
|
|
</span> <span class='id identifier rubyid_from'>from</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:from</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_at'>at</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_till'>till</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:till</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_at'>at</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_rtime'>rtime</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:rtime</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_at'>at</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_nonce'>nonce</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:nonce</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'>Text</span><span class='period'>.</span><span class='id identifier rubyid_rand_text_numeric'>rand_text_numeric</span><span class='lparen'>(</span><span class='int'>6</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_etype'>etype</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:etype</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><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/Crypto.html" title="Rex::Proto::Kerberos::Crypto (module)">Crypto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Encryption.html" title="Rex::Proto::Kerberos::Crypto::Encryption (module)">Encryption</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Encryption.html#DefaultEncryptionType-constant" title="Rex::Proto::Kerberos::Crypto::Encryption::DefaultEncryptionType (constant)">DefaultEncryptionType</a></span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_cname'>cname</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:cname</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_build_client_name'>build_client_name</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_realm'>realm</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:realm</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_sname'>sname</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:sname</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_build_server_name'>build_server_name</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_enc_auth_data'>enc_auth_data</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:enc_auth_data</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>nil</span>
|
|
<span class='id identifier rubyid_additional_tickets'>additional_tickets</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:additional_tickets</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>nil</span>
|
|
|
|
<span class='id identifier rubyid_body'>body</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/KdcRequestBody.html" title="Rex::Proto::Kerberos::Model::KdcRequestBody (class)">KdcRequestBody</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span>
|
|
<span class='label'>cname:</span> <span class='id identifier rubyid_cname'>cname</span><span class='comma'>,</span>
|
|
<span class='label'>realm:</span> <span class='id identifier rubyid_realm'>realm</span><span class='comma'>,</span>
|
|
<span class='label'>sname:</span> <span class='id identifier rubyid_sname'>sname</span><span class='comma'>,</span>
|
|
<span class='label'>from:</span> <span class='id identifier rubyid_from'>from</span><span class='comma'>,</span>
|
|
<span class='label'>till:</span> <span class='id identifier rubyid_till'>till</span><span class='comma'>,</span>
|
|
<span class='label'>rtime:</span> <span class='id identifier rubyid_rtime'>rtime</span><span class='comma'>,</span>
|
|
<span class='label'>nonce:</span> <span class='id identifier rubyid_nonce'>nonce</span><span class='comma'>,</span>
|
|
<span class='label'>etype:</span> <span class='id identifier rubyid_etype'>etype</span><span class='comma'>,</span>
|
|
<span class='label'>enc_auth_data:</span> <span class='id identifier rubyid_enc_auth_data'>enc_auth_data</span><span class='comma'>,</span>
|
|
<span class='label'>additional_tickets:</span> <span class='id identifier rubyid_additional_tickets'>additional_tickets</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_body'>body</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
Generated on Fri May 8 17:02:45 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> |