440 lines
36 KiB
HTML
440 lines
36 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::TicketConverter
|
|
|
|
— 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::TicketConverter";
|
|
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">TicketConverter</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::TicketConverter
|
|
|
|
|
|
|
|
</h1>
|
|
<div class="box_info">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Defined in:</dt>
|
|
<dd>lib/msf/core/exploit/remote/kerberos/ticket_converter.rb</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2>
|
|
Class Method Summary
|
|
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
</h2>
|
|
|
|
<ul class="summary">
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#ccache_to_kirbi-class_method" title="ccache_to_kirbi (class method)">.<strong>ccache_to_kirbi</strong>(ccache) ⇒ Rex::Proto::Kerberos::Model::KrbCred </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Converts a ccache format cred to a kirbi format cred.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#kirbi_to_ccache-class_method" title="kirbi_to_ccache (class method)">.<strong>kirbi_to_ccache</strong>(krb_cred) ⇒ Rex::Proto::Kerberos::CredentialCache::Krb5Ccache </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Converts a kirbi format cred to a ccache format cred.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<div id="class_method_details" class="method_details_list">
|
|
<h2>Class Method Details</h2>
|
|
|
|
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="ccache_to_kirbi-class_method">
|
|
|
|
.<strong>ccache_to_kirbi</strong>(ccache) ⇒ <tt><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/KrbCred.html" title="Rex::Proto::Kerberos::Model::KrbCred (class)">Rex::Proto::Kerberos::Model::KrbCred</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Converts a ccache format cred to a kirbi format cred</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>ccache</span>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/CredentialCache/Krb5Ccache.html" title="Rex::Proto::Kerberos::CredentialCache::Krb5Ccache (class)">Rex::Proto::Kerberos::CredentialCache::Krb5Ccache</a></span></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/KrbCred.html" title="Rex::Proto::Kerberos::Model::KrbCred (class)">Rex::Proto::Kerberos::Model::KrbCred</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
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</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/ticket_converter.rb', line 46</span>
|
|
|
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ccache_to_kirbi'>ccache_to_kirbi</span><span class='lparen'>(</span><span class='id identifier rubyid_ccache'>ccache</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_cred'>cred</span> <span class='op'>=</span> <span class='id identifier rubyid_ccache'>ccache</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_krb_cred'>krb_cred</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/KrbCred.html" title="Rex::Proto::Kerberos::Model::KrbCred (class)">KrbCred</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_krb_cred'>krb_cred</span><span class='period'>.</span><span class='id identifier rubyid_pvno'>pvno</span> <span class='op'>=</span> <span class='int'>5</span>
|
|
<span class='id identifier rubyid_krb_cred'>krb_cred</span><span class='period'>.</span><span class='id identifier rubyid_msg_type'>msg_type</span> <span class='op'>=</span> <span class='int'>0x16</span>
|
|
<span class='id identifier rubyid_krb_cred'>krb_cred</span><span class='period'>.</span><span class='id identifier rubyid_tickets'>tickets</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/Ticket.html" title="Rex::Proto::Kerberos::Model::Ticket (class)">Ticket</a></span></span><span class='period'>.</span><span class='id identifier rubyid_decode'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Ticket.html#decode-instance_method" title="Rex::Proto::Kerberos::Model::Ticket#decode (method)">decode</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_ticket'>ticket</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_ticket_info'>ticket_info</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/KrbCredInfo.html" title="Rex::Proto::Kerberos::Model::KrbCredInfo (class)">KrbCredInfo</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_key'>key</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/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_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_keyblock'>keyblock</span><span class='period'>.</span><span class='id identifier rubyid_enctype'>enctype</span><span class='comma'>,</span>
|
|
<span class='label'>value:</span> <span class='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_keyblock'>keyblock</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_key'>key</span>
|
|
<span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='period'>.</span><span class='id identifier rubyid_prealm'>prealm</span> <span class='op'>=</span> <span class='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_realm'>realm</span>
|
|
<span class='id identifier rubyid_pname'>pname</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='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_name_type'>name_type</span><span class='comma'>,</span>
|
|
<span class='label'>name_string:</span> <span class='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='period'>.</span><span class='id identifier rubyid_pname'>pname</span> <span class='op'>=</span> <span class='id identifier rubyid_pname'>pname</span>
|
|
<span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='period'>.</span><span class='id identifier rubyid_flags'>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/KdcOptionFlags.html" title="Rex::Proto::Kerberos::Model::KdcOptionFlags (class)">KdcOptionFlags</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/KerberosFlags.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::KerberosFlags#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_ticket_flags'>ticket_flags</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='period'>.</span><span class='id identifier rubyid_auth_time'>auth_time</span> <span class='op'>=</span> <span class='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_authtime'>authtime</span>
|
|
<span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='period'>.</span><span class='id identifier rubyid_start_time'>start_time</span> <span class='op'>=</span> <span class='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_starttime'>starttime</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span>
|
|
<span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='period'>.</span><span class='id identifier rubyid_end_time'>end_time</span> <span class='op'>=</span> <span class='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_endtime'>endtime</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span>
|
|
<span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='period'>.</span><span class='id identifier rubyid_renew_till'>renew_till</span> <span class='op'>=</span> <span class='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_renew_till'>renew_till</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span>
|
|
<span class='id identifier rubyid_sname'>sname</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='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='id identifier rubyid_name_type'>name_type</span><span class='comma'>,</span>
|
|
<span class='label'>name_string:</span> <span class='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='period'>.</span><span class='id identifier rubyid_sname'>sname</span> <span class='op'>=</span> <span class='id identifier rubyid_sname'>sname</span>
|
|
<span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='period'>.</span><span class='id identifier rubyid_srealm'>srealm</span> <span class='op'>=</span> <span class='id identifier rubyid_cred'>cred</span><span class='period'>.</span><span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='id identifier rubyid_realm'>realm</span>
|
|
|
|
<span class='id identifier rubyid_enc_part'>enc_part</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_key'>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='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/EncKrbCredPart.html" title="Rex::Proto::Kerberos::Model::EncKrbCredPart (class)">EncKrbCredPart</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'>ticket_info:</span> <span class='lbracket'>[</span><span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_encode'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Element.html#encode-instance_method" title="Rex::Proto::Kerberos::Model::Element#encode (method)">encode</a></span></span>
|
|
<span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_krb_cred'>krb_cred</span><span class='period'>.</span><span class='id identifier rubyid_enc_part'>enc_part</span> <span class='op'>=</span> <span class='id identifier rubyid_enc_part'>enc_part</span>
|
|
<span class='id identifier rubyid_krb_cred'>krb_cred</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="kirbi_to_ccache-class_method">
|
|
|
|
.<strong>kirbi_to_ccache</strong>(krb_cred) ⇒ <tt><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/CredentialCache/Krb5Ccache.html" title="Rex::Proto::Kerberos::CredentialCache::Krb5Ccache (class)">Rex::Proto::Kerberos::CredentialCache::Krb5Ccache</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Converts a kirbi format cred to a ccache format cred</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>krb_cred</span>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/KrbCred.html" title="Rex::Proto::Kerberos::Model::KrbCred (class)">Rex::Proto::Kerberos::Model::KrbCred</a></span></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/CredentialCache/Krb5Ccache.html" title="Rex::Proto::Kerberos::CredentialCache::Krb5Ccache (class)">Rex::Proto::Kerberos::CredentialCache::Krb5Ccache</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
16
|
|
17
|
|
18
|
|
19
|
|
20
|
|
21
|
|
22
|
|
23
|
|
24
|
|
25
|
|
26
|
|
27
|
|
28
|
|
29
|
|
30
|
|
31
|
|
32
|
|
33
|
|
34
|
|
35
|
|
36
|
|
37
|
|
38
|
|
39
|
|
40
|
|
41</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/ticket_converter.rb', line 7</span>
|
|
|
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_kirbi_to_ccache'>kirbi_to_ccache</span><span class='lparen'>(</span><span class='id identifier rubyid_krb_cred'>krb_cred</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_enc_krb_part'>enc_krb_part</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/EncKrbCredPart.html" title="Rex::Proto::Kerberos::Model::EncKrbCredPart (class)">EncKrbCredPart</a></span></span><span class='period'>.</span><span class='id identifier rubyid_decode'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/EncKrbCredPart.html#decode-instance_method" title="Rex::Proto::Kerberos::Model::EncKrbCredPart#decode (method)">decode</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_krb_cred'>krb_cred</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='rparen'>)</span>
|
|
<span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span> <span class='op'>=</span> <span class='id identifier rubyid_enc_krb_part'>enc_krb_part</span><span class='period'>.</span><span class='id identifier rubyid_ticket_info'>ticket_info</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_cc_principal'>cc_principal</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/CredentialCache.html" title="Rex::Proto::Kerberos::CredentialCache (module)">CredentialCache</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/CredentialCache/Krb5CcachePrincipal.html" title="Rex::Proto::Kerberos::CredentialCache::Krb5CcachePrincipal (class)">Krb5CcachePrincipal</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>name_type:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_pname'>pname</span><span class='period'>.</span><span class='id identifier rubyid_name_type'>name_type</span><span class='comma'>,</span>
|
|
<span class='label'>components:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_pname'>pname</span><span class='period'>.</span><span class='id identifier rubyid_name_string'>name_string</span><span class='comma'>,</span>
|
|
<span class='label'>realm:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_prealm'>prealm</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_client_principal'>client_principal</span> <span class='op'>=</span> <span class='id identifier rubyid_cc_principal'>cc_principal</span><span class='period'>.</span><span class='id identifier rubyid_clone'>clone</span>
|
|
<span class='id identifier rubyid_server_principal'>server_principal</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/CredentialCache.html" title="Rex::Proto::Kerberos::CredentialCache (module)">CredentialCache</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/CredentialCache/Krb5CcachePrincipal.html" title="Rex::Proto::Kerberos::CredentialCache::Krb5CcachePrincipal (class)">Krb5CcachePrincipal</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>name_type:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_sname'>sname</span><span class='period'>.</span><span class='id identifier rubyid_name_type'>name_type</span><span class='comma'>,</span>
|
|
<span class='label'>components:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_sname'>sname</span><span class='period'>.</span><span class='id identifier rubyid_name_string'>name_string</span><span class='comma'>,</span>
|
|
<span class='label'>realm:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_srealm'>srealm</span>
|
|
<span class='rparen'>)</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/CredentialCache.html" title="Rex::Proto::Kerberos::CredentialCache (module)">CredentialCache</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/CredentialCache/Krb5Ccache.html" title="Rex::Proto::Kerberos::CredentialCache::Krb5Ccache (class)">Krb5Ccache</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>default_principal:</span> <span class='id identifier rubyid_cc_principal'>cc_principal</span><span class='comma'>,</span>
|
|
<span class='label'>credentials:</span> <span class='lbracket'>[</span>
|
|
<span class='lbrace'>{</span>
|
|
<span class='label'>client:</span> <span class='id identifier rubyid_client_principal'>client_principal</span><span class='comma'>,</span>
|
|
<span class='label'>server:</span> <span class='id identifier rubyid_server_principal'>server_principal</span><span class='comma'>,</span>
|
|
<span class='label'>keyblock:</span> <span class='lbrace'>{</span>
|
|
<span class='label'>enctype:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span>
|
|
<span class='label'>data:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
|
|
<span class='rbrace'>}</span><span class='comma'>,</span>
|
|
<span class='label'>authtime:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_auth_time'>auth_time</span><span class='comma'>,</span>
|
|
<span class='label'>starttime:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_start_time'>start_time</span><span class='comma'>,</span>
|
|
<span class='label'>endtime:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_end_time'>end_time</span><span class='comma'>,</span>
|
|
<span class='label'>renew_till:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_renew_till'>renew_till</span><span class='comma'>,</span>
|
|
<span class='label'>ticket_flags:</span> <span class='id identifier rubyid_krb_cred_info'>krb_cred_info</span><span class='period'>.</span><span class='id identifier rubyid_flags'>flags</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
|
|
<span class='label'>ticket:</span> <span class='id identifier rubyid_krb_cred'>krb_cred</span><span class='period'>.</span><span class='id identifier rubyid_tickets'>tickets</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span>
|
|
<span class='rbrace'>}</span>
|
|
<span class='rbracket'>]</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
Generated on Fri May 8 17:02:39 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> |