920 lines
62 KiB
HTML
920 lines
62 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::Pac
|
|
|
|
— 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::Pac";
|
|
relpath = '../../../../../';
|
|
</script>
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8" src="../../../../../js/jquery.js"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8" src="../../../../../js/app.js"></script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<div class="nav_wrap">
|
|
<iframe id="nav" src="../../../../../class_list.html?1"></iframe>
|
|
<div id="resizer"></div>
|
|
</div>
|
|
|
|
<div id="main" tabindex="-1">
|
|
<div id="header">
|
|
<div id="menu">
|
|
|
|
<a href="../../../../../_index.html">Index (P)</a> »
|
|
<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">Pac</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::Pac
|
|
|
|
|
|
|
|
</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/pac.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_empty_auth_data-instance_method" title="#build_empty_auth_data (instance method)">#<strong>build_empty_auth_data</strong> ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#build_pa_pac_request-instance_method" title="#build_pa_pac_request (instance method)">#<strong>build_pa_pac_request</strong>(opts = {}) ⇒ Rex::Proto::Kerberos::Model::Field::PreAuthDataEntry </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Builds a kerberos PA-PAC-REQUEST pre authenticated structure.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#build_pac-instance_method" title="#build_pac (instance method)">#<strong>build_pac</strong>(opts = {}) ⇒ Rex::Proto::Kerberos::Pac::Krb5Pac </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Builds a kerberos PACTYPE structure.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#build_pac_authorization_data-instance_method" title="#build_pac_authorization_data (instance method)">#<strong>build_pac_authorization_data</strong>(opts = {}) ⇒ Rex::Proto::Kerberos::Model::AuthorizationData </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Builds an kerberos AuthorizationData structure containing a PACTYPE.</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_empty_auth_data-instance_method">
|
|
|
|
#<strong>build_empty_auth_data</strong> ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
180
|
|
181
|
|
182
|
|
183
|
|
184
|
|
185
|
|
186
|
|
187</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/pac.rb', line 180</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_empty_auth_data'>build_empty_auth_data</span>
|
|
<span class='id identifier rubyid_pac_auth_data'>pac_auth_data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model.html" title="Rex::Proto::Kerberos::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">AuthorizationData</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'>elements:</span> <span class='lbracket'>[</span><span class='lbrace'>{</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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac.html#AD_WIN2K_PAC-constant" title="Rex::Proto::Kerberos::Pac::AD_WIN2K_PAC (constant)">AD_WIN2K_PAC</a></span></span><span class='comma'>,</span> <span class='label'>data:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\x00</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span><span class='rbracket'>]</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/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/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">AuthorizationData</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'>elements:</span> <span class='lbracket'>[</span><span class='lbrace'>{</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/AuthorizationDataType.html" title="Rex::Proto::Kerberos::Model::AuthorizationDataType (module)">AuthorizationDataType</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/AuthorizationDataType.html#AD_IF_RELEVANT-constant" title="Rex::Proto::Kerberos::Model::AuthorizationDataType::AD_IF_RELEVANT (constant)">AD_IF_RELEVANT</a></span></span><span class='comma'>,</span> <span class='label'>data:</span> <span class='id identifier rubyid_pac_auth_data'>pac_auth_data</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 class="method_details ">
|
|
<h3 class="signature " id="build_pa_pac_request-instance_method">
|
|
|
|
#<strong>build_pa_pac_request</strong>(opts = {}) ⇒ <tt>Rex::Proto::Kerberos::Model::Field::PreAuthDataEntry</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Builds a kerberos PA-PAC-REQUEST 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 => Boolean}</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">:pac_request_value</span>
|
|
<span class="type">(<tt>Boolean</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>Rex::Proto::Kerberos::Model::Field::PreAuthDataEntry</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/PreAuthPacRequest.html" title="Rex::Proto::Kerberos::Model::PreAuthPacRequest (class)">Rex::Proto::Kerberos::Model::PreAuthPacRequest</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">
|
|
|
|
|
|
18
|
|
19
|
|
20
|
|
21
|
|
22
|
|
23
|
|
24
|
|
25
|
|
26
|
|
27</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/pac.rb', line 18</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_pa_pac_request'>build_pa_pac_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_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:pac_request_value</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>false</span>
|
|
<span class='id identifier rubyid_pac_request'>pac_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/PreAuthPacRequest.html" title="Rex::Proto::Kerberos::Model::PreAuthPacRequest (class)">PreAuthPacRequest</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'>value:</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_pa_pac_request'>pa_pac_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/PreAuthDataEntry.html" title="Rex::Proto::Kerberos::Model::PreAuthDataEntry (class)">PreAuthDataEntry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/Element.html#initialize-instance_method" title="Rex::Proto::Kerberos::Model::Element#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>type:</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model.html" title="Rex::Proto::Kerberos::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthType.html" title="Rex::Proto::Kerberos::Model::PreAuthType (module)">PreAuthType</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/PreAuthType.html#PA_PAC_REQUEST-constant" title="Rex::Proto::Kerberos::Model::PreAuthType::PA_PAC_REQUEST (constant)">PA_PAC_REQUEST</a></span></span><span class='comma'>,</span>
|
|
<span class='label'>value:</span> <span class='id identifier rubyid_pac_request'>pac_request</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pa_pac_request'>pa_pac_request</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="build_pac-instance_method">
|
|
|
|
#<strong>build_pac</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac/Krb5Pac.html" title="Rex::Proto::Kerberos::Pac::Krb5Pac (class)">Rex::Proto::Kerberos::Pac::Krb5Pac</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Builds a kerberos PACTYPE 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 => <String, Integer, Array, Time>}</tt>)</span>
|
|
|
|
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts[String]</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>a customizable set of options</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<span class='name'>opts[Boolean]</span>
|
|
|
|
|
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>a customizable set of options</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
|
<ul class="option">
|
|
|
|
<li>
|
|
<span class="name">:client_name</span>
|
|
<span class="type">(<tt>String</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:user_id</span>
|
|
<span class="type">(<tt>Integer</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
— <div class='inline'>
|
|
<p>the user SID Ex: 1000</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:group_id</span>
|
|
<span class="type">(<tt>Integer</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
— <div class='inline'>
|
|
<p>Ex: 513 for 'Domain Users'</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:group_ids</span>
|
|
<span class="type">(<tt>Array<Integer></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:extra_sids</span>
|
|
<span class="type">(<tt>Array<String></tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
— <div class='inline'>
|
|
<p>An array of extra sids, Ex: '['S-1-5-etc-etc-519']'</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:realm</span>
|
|
<span class="type">(<tt>String</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:domain_id</span>
|
|
<span class="type">(<tt>String</tt>)</span>
|
|
<span class="default">
|
|
|
|
</span>
|
|
|
|
— <div class='inline'>
|
|
<p>the domain SID Ex: S-1-5-21-1755879683-3641577184-3486455962</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<span class="name">:auth_time</span>
|
|
<span class="type">(<tt>Time</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/Pac/Krb5Pac.html" title="Rex::Proto::Kerberos::Pac::Krb5Pac (class)">Rex::Proto::Kerberos::Pac::Krb5Pac</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li>Rex::Proto::Kerberos::Pac::Krb5PacLogonInfo</li>
|
|
|
|
<li>Rex::Proto::Kerberos::Pac::Krb5PacClientInfo</li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac/Krb5PacServerChecksum.html" title="Rex::Proto::Kerberos::Pac::Krb5PacServerChecksum (class)">Rex::Proto::Kerberos::Pac::Krb5PacServerChecksum</a></span></li>
|
|
|
|
<li>Rex::Proto::Kerberos::Pac::Krb5PacPrivSvrChecksum</li>
|
|
|
|
<li><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac/Krb5Pac.html" title="Rex::Proto::Kerberos::Pac::Krb5Pac (class)">Rex::Proto::Kerberos::Pac::Krb5Pac</a></span></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
48
|
|
49
|
|
50
|
|
51
|
|
52
|
|
53
|
|
54
|
|
55
|
|
56
|
|
57
|
|
58
|
|
59
|
|
60
|
|
61
|
|
62
|
|
63
|
|
64
|
|
65
|
|
66
|
|
67
|
|
68
|
|
69
|
|
70
|
|
71
|
|
72
|
|
73
|
|
74
|
|
75
|
|
76
|
|
77
|
|
78
|
|
79
|
|
80
|
|
81
|
|
82
|
|
83
|
|
84
|
|
85
|
|
86
|
|
87
|
|
88
|
|
89
|
|
90
|
|
91
|
|
92
|
|
93
|
|
94
|
|
95
|
|
96
|
|
97
|
|
98
|
|
99
|
|
100
|
|
101
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
107
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112
|
|
113
|
|
114
|
|
115
|
|
116
|
|
117
|
|
118
|
|
119
|
|
120
|
|
121
|
|
122
|
|
123
|
|
124
|
|
125
|
|
126
|
|
127
|
|
128
|
|
129
|
|
130
|
|
131
|
|
132
|
|
133
|
|
134
|
|
135
|
|
136
|
|
137
|
|
138
|
|
139
|
|
140
|
|
141
|
|
142
|
|
143
|
|
144
|
|
145
|
|
146
|
|
147
|
|
148
|
|
149
|
|
150
|
|
151
|
|
152
|
|
153
|
|
154
|
|
155
|
|
156
|
|
157
|
|
158
|
|
159</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/pac.rb', line 48</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_pac'>build_pac</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_user_name'>user_name</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:client_name</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
|
<span class='id identifier rubyid_user_id'>user_id</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:user_id</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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac.html#DEFAULT_ADMIN_RID-constant" title="Rex::Proto::Kerberos::Pac::DEFAULT_ADMIN_RID (constant)">DEFAULT_ADMIN_RID</a></span></span>
|
|
<span class='id identifier rubyid_primary_group_id'>primary_group_id</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:group_id</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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac.html#DOMAIN_USERS-constant" title="Rex::Proto::Kerberos::Pac::DOMAIN_USERS (constant)">DOMAIN_USERS</a></span></span>
|
|
<span class='id identifier rubyid_group_ids'>group_ids</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:group_ids</span><span class='rbracket'>]</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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac.html#DOMAIN_USERS-constant" title="Rex::Proto::Kerberos::Pac::DOMAIN_USERS (constant)">DOMAIN_USERS</a></span></span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_extra_sids'>extra_sids</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:extra_sids</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_logon_domain_name'>logon_domain_name</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:logon_domain_name</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:realm</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
|
<span class='id identifier rubyid_logon_count'>logon_count</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'>:logon_count</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='int'>0</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_password_last_set'>password_last_set</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'>:password_last_set</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='kw'>nil</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_domain_id'>domain_id</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:domain_id</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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac.html#NT_AUTHORITY_SID-constant" title="Rex::Proto::Kerberos::Pac::NT_AUTHORITY_SID (constant)">NT_AUTHORITY_SID</a></span></span>
|
|
<span class='id identifier rubyid_auth_time'>auth_time</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:auth_time</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_checksum_type'>checksum_type</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:checksum_type</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/Checksum.html" title="Rex::Proto::Kerberos::Crypto::Checksum (module)">Checksum</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Crypto/Checksum.html#RSA_MD5-constant" title="Rex::Proto::Kerberos::Crypto::Checksum::RSA_MD5 (constant)">RSA_MD5</a></span></span>
|
|
<span class='id identifier rubyid_ticket_checksum'>ticket_checksum</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ticket_checksum</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>nil</span>
|
|
<span class='id identifier rubyid_is_golden'>is_golden</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'>:is_golden</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='kw'>true</span> <span class='rbrace'>}</span>
|
|
<span class='id identifier rubyid_base_vi'>base_vi</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:base_verification_info</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_upn_dns_info_pac_element'>upn_dns_info_pac_element</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:upn_dns_info_pac_element</span><span class='rbracket'>]</span>
|
|
|
|
<span class='id identifier rubyid_obj_opts'>obj_opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
|
<span class='label'>logon_time:</span> <span class='id identifier rubyid_auth_time'>auth_time</span><span class='comma'>,</span>
|
|
<span class='label'>effective_name:</span> <span class='id identifier rubyid_user_name'>user_name</span><span class='comma'>,</span>
|
|
<span class='label'>user_id:</span> <span class='id identifier rubyid_user_id'>user_id</span><span class='comma'>,</span>
|
|
<span class='label'>primary_group_id:</span> <span class='id identifier rubyid_primary_group_id'>primary_group_id</span><span class='comma'>,</span>
|
|
<span class='label'>logon_domain_name:</span> <span class='id identifier rubyid_logon_domain_name'>logon_domain_name</span><span class='comma'>,</span>
|
|
<span class='label'>logon_domain_id:</span> <span class='id identifier rubyid_domain_id'>domain_id</span><span class='comma'>,</span>
|
|
<span class='label'>logon_count:</span> <span class='id identifier rubyid_logon_count'>logon_count</span><span class='comma'>,</span>
|
|
<span class='label'>full_name:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
|
<span class='label'>logon_script:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
|
<span class='label'>profile_path:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
|
<span class='label'>home_directory:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
|
<span class='label'>home_directory_drive:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
|
<span class='label'>logon_server:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
|
<span class='label'>password_last_set:</span> <span class='id identifier rubyid_password_last_set'>password_last_set</span>
|
|
<span class='rbrace'>}</span>
|
|
<span class='kw'>unless</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
|
<span class='id identifier rubyid_obj_opts'>obj_opts</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='lbrace'>{</span>
|
|
<span class='label'>full_name:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_full_name'>full_name</span><span class='comma'>,</span>
|
|
<span class='label'>logon_script:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_logon_script'>logon_script</span><span class='comma'>,</span>
|
|
<span class='label'>profile_path:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_profile_path'>profile_path</span><span class='comma'>,</span>
|
|
<span class='label'>home_directory:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_home_directory'>home_directory</span><span class='comma'>,</span>
|
|
<span class='label'>home_directory_drive:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_home_directory_drive'>home_directory_drive</span><span class='comma'>,</span>
|
|
<span class='label'>logon_server:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_logon_server'>logon_server</span><span class='comma'>,</span>
|
|
<span class='label'>logon_count:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_logon_count'>logon_count</span><span class='comma'>,</span>
|
|
<span class='label'>bad_password_count:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_bad_password_count'>bad_password_count</span><span class='comma'>,</span>
|
|
<span class='label'>user_account_control:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_user_account_control'>user_account_control</span><span class='comma'>,</span>
|
|
<span class='label'>sub_auth_status:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_sub_auth_status'>sub_auth_status</span><span class='comma'>,</span>
|
|
<span class='label'>last_successful_i_logon:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_last_successful_i_logon'>last_successful_i_logon</span><span class='comma'>,</span>
|
|
<span class='label'>last_failed_i_logon:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_last_failed_i_logon'>last_failed_i_logon</span><span class='comma'>,</span>
|
|
<span class='label'>failed_i_logon_count:</span> <span class='id identifier rubyid_base_vi'>base_vi</span><span class='period'>.</span><span class='id identifier rubyid_failed_i_logon_count'>failed_i_logon_count</span>
|
|
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_validation_info'>validation_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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac/Krb5ValidationInfo.html" title="Rex::Proto::Kerberos::Pac::Krb5ValidationInfo (class)">Krb5ValidationInfo</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_obj_opts'>obj_opts</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_validation_info'>validation_info</span><span class='period'>.</span><span class='id identifier rubyid_group_ids'>group_ids</span> <span class='op'>=</span> <span class='id identifier rubyid_group_ids'>group_ids</span>
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_extra_sids'>extra_sids</span> <span class='op'>&&</span> <span class='id identifier rubyid_extra_sids'>extra_sids</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>></span> <span class='int'>0</span>
|
|
<span class='id identifier rubyid_validation_info'>validation_info</span><span class='period'>.</span><span class='id identifier rubyid_extra_sids'>extra_sids</span> <span class='op'>=</span> <span class='id identifier rubyid_extra_sids'>extra_sids</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sid'>sid</span><span class='op'>|</span>
|
|
<span class='lbrace'>{</span> <span class='label'>sid:</span> <span class='id identifier rubyid_sid'>sid</span><span class='comma'>,</span> <span class='label'>attributes:</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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac.html#SE_GROUP_ALL-constant" title="Rex::Proto::Kerberos::Pac::SE_GROUP_ALL (constant)">SE_GROUP_ALL</a></span></span> <span class='rbrace'>}</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_logon_info'>logon_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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac/Krb5LogonInformation.html" title="Rex::Proto::Kerberos::Pac::Krb5LogonInformation (class)">Krb5LogonInformation</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>data:</span> <span class='id identifier rubyid_validation_info'>validation_info</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_client_info'>client_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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac/Krb5ClientInfo.html" title="Rex::Proto::Kerberos::Pac::Krb5ClientInfo (class)">Krb5ClientInfo</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>client_id:</span> <span class='id identifier rubyid_auth_time'>auth_time</span><span class='comma'>,</span>
|
|
<span class='label'>name:</span> <span class='id identifier rubyid_user_name'>user_name</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_is_golden'>is_golden</span>
|
|
<span class='id identifier rubyid_pac_requestor'>pac_requestor</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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac/Krb5PacRequestor.html" title="Rex::Proto::Kerberos::Pac::Krb5PacRequestor (class)">Krb5PacRequestor</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>user_sid:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_domain_id'>domain_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_user_id'>user_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pac_attributes'>pac_attributes</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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac/Krb5PacAttributes.html" title="Rex::Proto::Kerberos::Pac::Krb5PacAttributes (class)">Krb5PacAttributes</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_server_checksum'>server_checksum</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac/Krb5PacServerChecksum.html" title="Rex::Proto::Kerberos::Pac::Krb5PacServerChecksum (class)">Krb5PacServerChecksum</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>signature_type:</span> <span class='id identifier rubyid_checksum_type'>checksum_type</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_priv_srv_checksum'>priv_srv_checksum</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac/Krb5PacPrivServerChecksum.html" title="Rex::Proto::Kerberos::Pac::Krb5PacPrivServerChecksum (class)">Krb5PacPrivServerChecksum</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
|
<span class='label'>signature_type:</span> <span class='id identifier rubyid_checksum_type'>checksum_type</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pac_elements'>pac_elements</span> <span class='op'>=</span> <span class='lbracket'>[</span>
|
|
<span class='id identifier rubyid_logon_info'>logon_info</span><span class='comma'>,</span>
|
|
<span class='id identifier rubyid_client_info'>client_info</span>
|
|
<span class='rbracket'>]</span>
|
|
|
|
<span class='kw'>unless</span> <span class='id identifier rubyid_upn_dns_info_pac_element'>upn_dns_info_pac_element</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
|
<span class='id identifier rubyid_pac_elements'>pac_elements</span><span class='period'>.</span><span class='id identifier rubyid_append'>append</span><span class='lparen'>(</span><span class='id identifier rubyid_upn_dns_info_pac_element'>upn_dns_info_pac_element</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_is_golden'>is_golden</span>
|
|
<span class='comment'># These PAC elements are required for golden tickets in post-October 2022 systems
|
|
</span> <span class='id identifier rubyid_pac_elements'>pac_elements</span><span class='period'>.</span><span class='id identifier rubyid_append'>append</span><span class='lparen'>(</span>
|
|
<span class='id identifier rubyid_pac_requestor'>pac_requestor</span><span class='comma'>,</span>
|
|
<span class='id identifier rubyid_pac_attributes'>pac_attributes</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_pac_elements'>pac_elements</span><span class='period'>.</span><span class='id identifier rubyid_append'>append</span><span class='lparen'>(</span>
|
|
<span class='id identifier rubyid_server_checksum'>server_checksum</span><span class='comma'>,</span>
|
|
<span class='id identifier rubyid_priv_srv_checksum'>priv_srv_checksum</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_pac_elements'>pac_elements</span> <span class='op'><<</span> <span class='id identifier rubyid_ticket_checksum'>ticket_checksum</span> <span class='kw'>unless</span> <span class='id identifier rubyid_ticket_checksum'>ticket_checksum</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
|
|
|
<span class='id identifier rubyid_pac_type'>pac_type</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac/Krb5Pac.html" title="Rex::Proto::Kerberos::Pac::Krb5Pac (class)">Krb5Pac</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
|
<span class='id identifier rubyid_pac_type'>pac_type</span><span class='period'>.</span><span class='id identifier rubyid_assign'>assign</span><span class='lparen'>(</span><span class='label'>pac_elements:</span> <span class='id identifier rubyid_pac_elements'>pac_elements</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_pac_type'>pac_type</span><span class='period'>.</span><span class='id identifier rubyid_sign!'>sign!</span><span class='lparen'>(</span><span class='label'>service_key:</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:checksum_enc_key</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_pac_type'>pac_type</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="build_pac_authorization_data-instance_method">
|
|
|
|
#<strong>build_pac_authorization_data</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">Rex::Proto::Kerberos::Model::AuthorizationData</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Builds an kerberos AuthorizationData structure containing a PACTYPE</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 => Rex::Proto::Kerberos::Pac::Type}</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">:pac</span>
|
|
<span class="type">(<tt>Rex::Proto::Kerberos::Pac::Type</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/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">Rex::Proto::Kerberos::Model::AuthorizationData</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/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">Rex::Proto::Kerberos::Model::AuthorizationData</a></span></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
167
|
|
168
|
|
169
|
|
170
|
|
171
|
|
172
|
|
173
|
|
174
|
|
175
|
|
176
|
|
177
|
|
178</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/client/pac.rb', line 167</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_build_pac_authorization_data'>build_pac_authorization_data</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_pac'>pac</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:pac</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_build_pac'>build_pac</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_pac_auth_data'>pac_auth_data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model.html" title="Rex::Proto::Kerberos::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">AuthorizationData</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'>elements:</span> <span class='lbracket'>[</span><span class='lbrace'>{</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/Pac.html" title="Rex::Proto::Kerberos::Pac (module)">Pac</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Pac.html#AD_WIN2K_PAC-constant" title="Rex::Proto::Kerberos::Pac::AD_WIN2K_PAC (constant)">AD_WIN2K_PAC</a></span></span><span class='comma'>,</span> <span class='label'>data:</span> <span class='id identifier rubyid_pac'>pac</span><span class='period'>.</span><span class='id identifier rubyid_to_binary_s'>to_binary_s</span><span class='rbrace'>}</span><span class='rbracket'>]</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_authorization_data'>authorization_data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model.html" title="Rex::Proto::Kerberos::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/AuthorizationData.html" title="Rex::Proto::Kerberos::Model::AuthorizationData (class)">AuthorizationData</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'>elements:</span> <span class='lbracket'>[</span><span class='lbrace'>{</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/AuthorizationDataType.html" title="Rex::Proto::Kerberos::Model::AuthorizationDataType (module)">AuthorizationDataType</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../../Rex/Proto/Kerberos/Model/AuthorizationDataType.html#AD_IF_RELEVANT-constant" title="Rex::Proto::Kerberos::Model::AuthorizationDataType::AD_IF_RELEVANT (constant)">AD_IF_RELEVANT</a></span></span><span class='comma'>,</span> <span class='label'>data:</span> <span class='id identifier rubyid_pac_auth_data'>pac_auth_data</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='id identifier rubyid_authorization_data'>authorization_data</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
Generated on Fri May 8 17:02:30 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> |