Class: Rex::Proto::Kerberos::Pac::ClientInfo

Inherits:
Element
  • Object
show all
Defined in:
lib/rex/proto/kerberos/pac/client_info.rb

Overview

This class provides a representation of a PAC-CLIENT-INFO structure, containing the client's name and authentication time. It's used to verify which the ticket's client is the PAC's owner.

Constant Summary

Constants included from Rex::Proto::Kerberos::Pac

AD_WIN2K_PAC, DEFAULT_USER_SID, DOMAIN_USERS, NETLOGON_FLAG, NEVER_EXPIRE, NT_AUTHORITY_SID, PAC_CLIENT_INFO, PAC_LOGON_INFO, PAC_PRIVSVR_CHECKSUM, PAC_SERVER_CHECKSUM, SEC_TO_UNIX_EPOCH, SE_GROUP_ALL, SE_GROUP_ENABLED, SE_GROUP_ENABLED_BY_DEFAULT, SE_GROUP_MANDATORY, USER_DONT_EXPIRE_PASSWORD, USER_NORMAL_ACCOUNT, VERSION, WINDOWS_TICK

Constants included from Crypto

Crypto::ENC_AS_RESPONSE, Crypto::ENC_KDC_REQUEST_BODY, Crypto::ENC_TGS_RESPONSE, Crypto::RC4_HMAC, Crypto::RSA_MD5

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Element

attr_accessor, attributes, #attributes, #initialize

Methods included from Crypto::RsaMd5

#checksum_rsa_md5

Methods included from Crypto::Rc4Hmac

#decrypt_rc4_hmac, #encrypt_rc4_hmac

Constructor Details

This class inherits a constructor from Rex::Proto::Kerberos::Pac::Element

Instance Attribute Details

#client_idTime

Returns The auth_time field of the Kerberos KDC-AS response.

Returns:

  • (Time)

    The auth_time field of the Kerberos KDC-AS response.


13
14
15
# File 'lib/rex/proto/kerberos/pac/client_info.rb', line 13

def client_id
  @client_id
end

#nameString

Returns The client name from the ticket.

Returns:

  • (String)

    The client name from the ticket


16
17
18
# File 'lib/rex/proto/kerberos/pac/client_info.rb', line 16

def name
  @name
end

Instance Method Details

#encodeString

Encodes the Rex::Proto::Kerberos::Pac::ClientInfo

Returns:

  • (String)

21
22
23
24
25
26
27
28
# File 'lib/rex/proto/kerberos/pac/client_info.rb', line 21

def encode
  encoded = ''
  encoded << encode_client_id
  encoded << [name.length * 2].pack('v')
  encoded << encode_name

  encoded
end