Class: Rex::Proto::Kerberos::Pac::ServerChecksum

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

Overview

This class provides a representation of a PAC_SERVER_CHECKSUM structure, which contains the checksum using the key of the server.

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

#checksumObject

Returns the value of attribute checksum


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

def checksum
  @checksum
end

#versionInteger

Returns The checksum type.

Returns:

  • (Integer)

    The checksum type


13
# File 'lib/rex/proto/kerberos/pac/server_checksum.rb', line 13

attr_accessor :checksum

Instance Method Details

#encodeString

Encodes the Rex::Proto::Kerberos::Pac::ServerChecksum

Returns:

  • (String)

18
19
20
21
22
23
24
# File 'lib/rex/proto/kerberos/pac/server_checksum.rb', line 18

def encode
  encoded = ''
  encoded << [checksum].pack('V')
  encoded << "\x00" * 16

  encoded
end