Module: Msf::Exploit::Remote::Kerberos::Client::AsResponse

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

Instance Method Summary collapse

Instance Method Details

#extract_logon_time(res, key) ⇒ Integer

Extracts the logon time from a Kerberos AS Response

Parameters:

Returns:

  • (Integer)

See Also:


36
37
38
39
40
41
42
43
# File 'lib/msf/core/exploit/kerberos/client/as_response.rb', line 36

def extract_logon_time(res, key)
  decrypt_res = res.enc_part.decrypt(key, Rex::Proto::Kerberos::Crypto::ENC_AS_RESPONSE)
  enc_kdc_res = Rex::Proto::Kerberos::Model::EncKdcResponse.decode(decrypt_res)

  auth_time = enc_kdc_res.auth_time

  auth_time.to_i
end

#extract_session_key(res, key) ⇒ Rex::Proto::Kerberos::Model::EncryptionKey

Extracts the session key from a Kerberos AS Response

Parameters:

Returns:

See Also:


20
21
22
23
24
25
# File 'lib/msf/core/exploit/kerberos/client/as_response.rb', line 20

def extract_session_key(res, key)
  decrypt_res = res.enc_part.decrypt(key, Rex::Proto::Kerberos::Crypto::ENC_AS_RESPONSE)
  enc_kdc_res = Rex::Proto::Kerberos::Model::EncKdcResponse.decode(decrypt_res)

  enc_kdc_res.key
end