Class: Rex::Proto::Kerberos::Pac::Krb5PacCredentialInfo

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/rex/proto/kerberos/pac/krb5_pac.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ul_typeInteger (readonly)

Returns Describes the type of data present.

Returns:

  • (Integer)

    Describes the type of data present



654
# File 'lib/rex/proto/kerberos/pac/krb5_pac.rb', line 654

virtual :ul_type, value: Krb5PacElementType::CREDENTIAL_INFORMATION

Instance Method Details

#decrypt_serialized_data(key) ⇒ Object



660
661
662
663
664
665
666
667
668
# File 'lib/rex/proto/kerberos/pac/krb5_pac.rb', line 660

def decrypt_serialized_data(key)
  encryptor = Rex::Proto::Kerberos::Crypto::Encryption::from_etype(self.encryption_type)
  decrypted_serialized_data = encryptor.decrypt(
    self.serialized_data.to_binary_s,
    key,
    Rex::Proto::Kerberos::Crypto::KeyUsage::KERB_NON_KERB_SALT
  )
  Krb5SerializedPacCredentialData.read(decrypted_serialized_data)
end