Files
metasploit-gs/api/Msf/Exploit/Remote/Kerberos/Client/AsRequest.html
T
jenkins-metasploit c3f5bd3de2 Reboot gh-pages
2026-05-08 17:08:43 +00:00

711 lines
38 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::AsRequest
&mdash; Documentation by YARD 0.9.37
</title>
<link rel="stylesheet" href="../../../../../css/style.css" type="text/css" />
<link rel="stylesheet" href="../../../../../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "Msf::Exploit::Remote::Kerberos::Client::AsRequest";
relpath = '../../../../../';
</script>
<script type="text/javascript" charset="utf-8" src="../../../../../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../../../../../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../../../../../class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../../../../../_index.html">Index (A)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Kerberos.html" title="Msf::Exploit::Remote::Kerberos (module)">Kerberos</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="Msf::Exploit::Remote::Kerberos::Client (module)">Client</a></span></span>
&raquo;
<span class="title">AsRequest</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::AsRequest
</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/as_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_as_pa_time_stamp-instance_method" title="#build_as_pa_time_stamp (instance method)">#<strong>build_as_pa_time_stamp</strong>(opts = {}) &#x21d2; Rex::Proto::Kerberos::Model::PreAuthDataEntry </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds a kerberos PA-ENC-TIMESTAMP pre authenticated structure.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#build_as_request-instance_method" title="#build_as_request (instance method)">#<strong>build_as_request</strong>(opts = {}) &#x21d2; Rex::Proto::Kerberos::Model::KdcRequest </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds a kerberos AS request.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#build_as_request_body-instance_method" title="#build_as_request_body (instance method)">#<strong>build_as_request_body</strong>(opts = {}) &#x21d2; Rex::Proto::Kerberos::Model::KdcRequestBody </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Builds a kerberos AS 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_as_pa_time_stamp-instance_method">
#<strong>build_as_pa_time_stamp</strong>(opts = {}) &#x21d2; <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-ENC-TIMESTAMP pre authenticated structure</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>opts</span>
<span class='type'>(<tt>Hash{Symbol =&gt; &lt;Time, Integer, String&gt;}</tt>)</span>
<em class="default">(defaults to: <tt>{}</tt>)</em>
</li>
</ul>
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
<ul class="option">
<li>
<span class="name">:time_stamp</span>
<span class="type">(<tt>Time</tt>)</span>
<span class="default">
</span>
</li>
<li>
<span class="name">:pausec</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">:key</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/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><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthEncTimeStamp.html" title="Rex::Proto::Kerberos::Model::PreAuthEncTimeStamp (class)">Rex::Proto::Kerberos::Model::PreAuthEncTimeStamp</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/PreAuthDataEntry.html" title="Rex::Proto::Kerberos::Model::PreAuthDataEntry (class)">Rex::Proto::Kerberos::Model::PreAuthDataEntry</a></span></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/as_request.rb', line 43</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_as_pa_time_stamp'>build_as_pa_time_stamp</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_time_stamp'>time_stamp</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:time_stamp</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_kerberos_time_local'>kerberos_time_local</span>
<span class='id identifier rubyid_pausec'>pausec</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:pausec</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_time_stamp'>time_stamp</span><span class='op'>&amp;.</span><span class='id identifier rubyid_usec'>usec</span> <span class='op'>||</span> <span class='int'>0</span>
<span class='id identifier rubyid_etype'>etype</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:etype</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/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='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:key</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>Random</span><span class='period'>.</span><span class='id identifier rubyid_random_bytes'>random_bytes</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span>
<span class='id identifier rubyid_pa_time_stamp'>pa_time_stamp</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/PreAuthEncTimeStamp.html" title="Rex::Proto::Kerberos::Model::PreAuthEncTimeStamp (class)">PreAuthEncTimeStamp</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'>pa_time_stamp:</span> <span class='id identifier rubyid_time_stamp'>time_stamp</span><span class='comma'>,</span>
<span class='label'>pausec:</span> <span class='id identifier rubyid_pausec'>pausec</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_enc_time_stamp'>enc_time_stamp</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_etype'>etype</span><span class='comma'>,</span>
<span class='label'>cipher:</span> <span class='id identifier rubyid_pa_time_stamp'>pa_time_stamp</span><span class='period'>.</span><span class='id identifier rubyid_encrypt'>encrypt</span><span class='lparen'>(</span><span class='id identifier rubyid_etype'>etype</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_pa_enc_time_stamp'>pa_enc_time_stamp</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_ENC_TIMESTAMP-constant" title="Rex::Proto::Kerberos::Model::PreAuthType::PA_ENC_TIMESTAMP (constant)">PA_ENC_TIMESTAMP</a></span></span><span class='comma'>,</span>
<span class='label'>value:</span> <span class='id identifier rubyid_enc_time_stamp'>enc_time_stamp</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_pa_enc_time_stamp'>pa_enc_time_stamp</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="build_as_request-instance_method">
#<strong>build_as_request</strong>(opts = {}) &#x21d2; <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 a kerberos AS 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 =&gt; &lt;Array&lt;<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>&gt;, <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>&gt;}</tt>)</span>
<em class="default">(defaults to: <tt>{}</tt>)</em>
</li>
</ul>
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
<ul class="option">
<li>
<span class="name">:pa_data</span>
<span class="type">(<tt>Array&lt;<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>&gt;</tt>)</span>
<span class="default">
</span>
</li>
<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/KdcRequest.html" title="Rex::Proto::Kerberos::Model::KdcRequest (class)">Rex::Proto::Kerberos::Model::KdcRequest</a></span></tt>)</span>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li>Msf::Exploit::Remote::Kerberos::Client::AsRequest.[Rex[Rex::Proto[Rex::Proto::Kerberos[Rex::Proto::Kerberos::Model[Rex::Proto::Kerberos::Model::KdcRequest]</li>
<li><span class='object_link'><a href="#build_as_pa_time_stamp-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::AsRequest#build_as_pa_time_stamp (method)">#build_as_pa_time_stamp</a></span></li>
<li><span class='object_link'><a href="#build_as_request_body-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::AsRequest#build_as_request_body (method)">#build_as_request_body</a></span></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
18
19
20
21
22
23
24
25
26
27
28
29
30</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/as_request.rb', line 18</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_as_request'>build_as_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_pa_data'>pa_data</span> <span class='op'>=</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='op'>||</span> <span class='id identifier rubyid_build_as_pa_time_stamp'>build_as_pa_time_stamp</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</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='lbracket'>[</span><span class='symbol'>:body</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_build_as_request_body'>build_as_request_body</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</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#AS_REQ-constant" title="Rex::Proto::Kerberos::Model::AS_REQ (constant)">AS_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_as_request_body-instance_method">
#<strong>build_as_request_body</strong>(opts = {}) &#x21d2; <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 AS 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 =&gt; &lt;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>&gt;}</tt>)</span>
<em class="default">(defaults to: <tt>{}</tt>)</em>
</li>
</ul>
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
<ul class="option">
<li>
<span class="name">: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>
</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="Base.html#build_client_name-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Base#build_client_name (method)">Base#build_client_name</a></span></li>
<li><span class='object_link'><a href="Base.html#build_server_name-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Base#build_server_name (method)">Base#build_server_name</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">
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/as_request.rb', line 83</span>
<span class='kw'>def</span> <span class='id identifier rubyid_build_as_request_body'>build_as_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='id identifier rubyid_rand'>rand</span><span class='lparen'>(</span><span class='int'>1</span> <span class='op'>&lt;&lt;</span> <span class='int'>24</span><span class='rparen'>)</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='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#DefaultOfferedEtypes-constant" title="Rex::Proto::Kerberos::Crypto::Encryption::DefaultOfferedEtypes (constant)">DefaultOfferedEtypes</a></span></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'>&#39;</span><span class='tstring_end'>&#39;</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_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='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:40 2026 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.1.5).
</div>
</div>
</body>
</html>