Module: Msf::Exploit::Remote::Kerberos::Client::TgsResponse

Included in:
Msf::Exploit::Remote::Kerberos::Client
Defined in:
lib/msf/core/exploit/remote/kerberos/client/tgs_response.rb

Overview

Methods for processing TGS responses.

Instance Method Summary collapse

Instance Method Details

#decrypt_kdc_tgs_rep_enc_part(res, key, msg_type:) ⇒ Rex::Proto::Kerberos::Model::EncKdcResponse

Extracts the Kerberos credentials, building a MIT Cache Credential, from a Kerberos TGS response.



21
22
23
24
# File 'lib/msf/core/exploit/remote/kerberos/client/tgs_response.rb', line 21

def decrypt_kdc_tgs_rep_enc_part(res, key, msg_type:)
  decrypt_res = res.enc_part.decrypt_asn1(key, msg_type)
  Rex::Proto::Kerberos::Model::EncKdcResponse.decode(decrypt_res)
end

#extract_kerb_creds(res, key, msg_type: Rex::Proto::Kerberos::Crypto::KeyUsage::TGS_REP_ENCPART_AUTHENTICATOR_SUB_KEY) ⇒ Rex::Proto::Kerberos::CredentialCache::Krb5Ccache

Extracts the Kerberos credentials, building a MIT Cache Credential, from a Kerberos TGS response.

Parameters:

Returns:

See Also:



36
37
38
39
40
# File 'lib/msf/core/exploit/remote/kerberos/client/tgs_response.rb', line 36

def extract_kerb_creds(res, key, msg_type: Rex::Proto::Kerberos::Crypto::KeyUsage::TGS_REP_ENCPART_AUTHENTICATOR_SUB_KEY)
  enc_res = decrypt_kdc_tgs_rep_enc_part(res, key, msg_type: msg_type)

  Rex::Proto::Kerberos::CredentialCache::Krb5Ccache.from_responses(res, enc_res)
end