596 lines
22 KiB
HTML
596 lines
22 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::AsResponse
|
|
|
|
— 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::AsResponse";
|
|
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> »
|
|
<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">AsResponse</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::AsResponse
|
|
|
|
|
|
|
|
</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_response.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="#decrypt_kdc_as_rep_enc_part-instance_method" title="#decrypt_kdc_as_rep_enc_part (instance method)">#<strong>decrypt_kdc_as_rep_enc_part</strong>(res, key) ⇒ Rex::Proto::Kerberos::Model::EncKdcResponse </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Extracts the session key from a Kerberos AS Response.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#extract_logon_time-instance_method" title="#extract_logon_time (instance method)">#<strong>extract_logon_time</strong>(res, key) ⇒ Time </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Extracts the logon time from a Kerberos AS Response.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#extract_session_key-instance_method" title="#extract_session_key (instance method)">#<strong>extract_session_key</strong>(res, key) ⇒ Rex::Proto::Kerberos::Model::EncryptionKey </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Extracts the session key from a Kerberos AS Response.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#format_as_rep_to_john_hash-instance_method" title="#format_as_rep_to_john_hash (instance method)">#<strong>format_as_rep_to_john_hash</strong>(asrep) ⇒ String </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Format from <a href="https://github.com/hashcat/hashcat/blob/6fce6fb3ff120ed16b300af97cf2144b36edcbe8/src/modules/module_18200.c#L126-L132">github.com/hashcat/hashcat/blob/6fce6fb3ff120ed16b300af97cf2144b36edcbe8/src/modules/module_18200.c#L126-L132</a>.</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="decrypt_kdc_as_rep_enc_part-instance_method">
|
|
|
|
#<strong>decrypt_kdc_as_rep_enc_part</strong>(res, key) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncKdcResponse.html" title="Rex::Proto::Kerberos::Model::EncKdcResponse (class)">Rex::Proto::Kerberos::Model::EncKdcResponse</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Extracts the session key from a Kerberos AS Response</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>res</span>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcResponse.html" title="Rex::Proto::Kerberos::Model::KdcResponse (class)">Rex::Proto::Kerberos::Model::KdcResponse</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<span class='name'>key</span>
|
|
|
|
|
|
<span class='type'>(<tt>String</tt>)</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/EncKdcResponse.html" title="Rex::Proto::Kerberos::Model::EncKdcResponse (class)">Rex::Proto::Kerberos::Model::EncKdcResponse</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/KdcResponse.html" title="Rex::Proto::Kerberos::Model::KdcResponse (class)">Rex::Proto::Kerberos::Model::KdcResponse</a></span></li>
|
|
|
|
<li>Rex::Proto::Kerberos::Model::EncryptedData.decrypt</li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncKdcResponse.html" title="Rex::Proto::Kerberos::Model::EncKdcResponse (class)">Rex::Proto::Kerberos::Model::EncKdcResponse</a></span></li>
|
|
|
|
<li>Rex::Proto::Kerberos::Model::EncKdcResponse.decode</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">
|
|
|
|
|
|
20
|
|
21
|
|
22
|
|
23
|
|
24</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/as_response.rb', line 20</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_decrypt_kdc_as_rep_enc_part'>decrypt_kdc_as_rep_enc_part</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_decrypt_res'>decrypt_res</span> <span class='op'>=</span> <span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_enc_part'>enc_part</span><span class='period'>.</span><span class='id identifier rubyid_decrypt_asn1'>decrypt_asn1</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</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#AS_REP_ENCPART-constant" title="Rex::Proto::Kerberos::Crypto::KeyUsage::AS_REP_ENCPART (constant)">AS_REP_ENCPART</a></span></span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_enc_res'>enc_res</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/EncKdcResponse.html" title="Rex::Proto::Kerberos::Model::EncKdcResponse (class)">EncKdcResponse</a></span></span><span class='period'>.</span><span class='id identifier rubyid_decode'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncKdcResponse.html#decode-instance_method" title="Rex::Proto::Kerberos::Model::EncKdcResponse#decode (method)">decode</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_decrypt_res'>decrypt_res</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_enc_res'>enc_res</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="extract_logon_time-instance_method">
|
|
|
|
#<strong>extract_logon_time</strong>(res, key) ⇒ <tt>Time</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Extracts the logon time from a Kerberos AS Response</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>res</span>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcResponse.html" title="Rex::Proto::Kerberos::Model::KdcResponse (class)">Rex::Proto::Kerberos::Model::KdcResponse</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<span class='name'>key</span>
|
|
|
|
|
|
<span class='type'>(<tt>String</tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>Time</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/KdcResponse.html" title="Rex::Proto::Kerberos::Model::KdcResponse (class)">Rex::Proto::Kerberos::Model::KdcResponse</a></span></li>
|
|
|
|
<li>Rex::Proto::Kerberos::Model::EncryptedData.decrypt</li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncKdcResponse.html" title="Rex::Proto::Kerberos::Model::EncKdcResponse (class)">Rex::Proto::Kerberos::Model::EncKdcResponse</a></span></li>
|
|
|
|
<li>Rex::Proto::Kerberos::Model::EncKdcResponse.decode</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
50
|
|
51
|
|
52
|
|
53</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/as_response.rb', line 50</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_extract_logon_time'>extract_logon_time</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_kdc_res'>kdc_res</span> <span class='op'>=</span> <span class='id identifier rubyid_decrypt_kdc_as_rep_enc_part'>decrypt_kdc_as_rep_enc_part</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_kdc_res'>kdc_res</span><span class='period'>.</span><span class='id identifier rubyid_auth_time'>auth_time</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="extract_session_key-instance_method">
|
|
|
|
#<strong>extract_session_key</strong>(res, key) ⇒ <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>Extracts the session key from a Kerberos AS Response</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>res</span>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcResponse.html" title="Rex::Proto::Kerberos::Model::KdcResponse (class)">Rex::Proto::Kerberos::Model::KdcResponse</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<span class='name'>key</span>
|
|
|
|
|
|
<span class='type'>(<tt>String</tt>)</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/KdcResponse.html" title="Rex::Proto::Kerberos::Model::KdcResponse (class)">Rex::Proto::Kerberos::Model::KdcResponse</a></span></li>
|
|
|
|
<li>Rex::Proto::Kerberos::Model::EncryptedData.decrypt</li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/EncKdcResponse.html" title="Rex::Proto::Kerberos::Model::EncKdcResponse (class)">Rex::Proto::Kerberos::Model::EncKdcResponse</a></span></li>
|
|
|
|
<li>Rex::Proto::Kerberos::Model::EncKdcResponse.decode</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">
|
|
|
|
|
|
36
|
|
37
|
|
38
|
|
39</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/as_response.rb', line 36</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_extract_session_key'>extract_session_key</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_kdc_res'>kdc_res</span> <span class='op'>=</span> <span class='id identifier rubyid_decrypt_kdc_as_rep_enc_part'>decrypt_kdc_as_rep_enc_part</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_kdc_res'>kdc_res</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="format_as_rep_to_john_hash-instance_method">
|
|
|
|
#<strong>format_as_rep_to_john_hash</strong>(asrep) ⇒ <tt>String</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Format from</p>
|
|
|
|
<pre class="code ruby"><code class="ruby">https://github.com/hashcat/hashcat/blob/6fce6fb3ff120ed16b300af97cf2144b36edcbe8/src/modules/module_18200.c#L126-L132
|
|
</code></pre>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>asrep</span>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/KdcResponse.html" title="Rex::Proto::Kerberos::Model::KdcResponse (class)">Rex::Proto::Kerberos::Model::KdcResponse</a></span></tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>The krb5 asrep response</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>String</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>A valid string format which can be cracked offline</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
59
|
|
60
|
|
61</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/as_response.rb', line 59</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_format_as_rep_to_john_hash'>format_as_rep_to_john_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_asrep'>asrep</span><span class='rparen'>)</span>
|
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>$krb5asrep$</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_asrep'>asrep</span><span class='period'>.</span><span class='id identifier rubyid_enc_part'>enc_part</span><span class='period'>.</span><span class='id identifier rubyid_etype'>etype</span><span class='embexpr_end'>}</span><span class='tstring_content'>$</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_asrep'>asrep</span><span class='period'>.</span><span class='id identifier rubyid_cname'>cname</span><span class='period'>.</span><span class='id identifier rubyid_name_string'>name_string</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_asrep'>asrep</span><span class='period'>.</span><span class='id identifier rubyid_ticket'>ticket</span><span class='period'>.</span><span class='id identifier rubyid_realm'>realm</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_asrep'>asrep</span><span class='period'>.</span><span class='id identifier rubyid_enc_part'>enc_part</span><span class='period'>.</span><span class='id identifier rubyid_cipher'>cipher</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>...</span><span class='int'>16</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_unpack1'>unpack1</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>H*</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>$</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_asrep'>asrep</span><span class='period'>.</span><span class='id identifier rubyid_enc_part'>enc_part</span><span class='period'>.</span><span class='id identifier rubyid_cipher'>cipher</span><span class='lbracket'>[</span><span class='int'>16</span><span class='op'>..</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_unpack1'>unpack1</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>H*</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
Generated on Fri May 8 17:02:43 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> |