Class: Rex::Proto::Kerberos::Model::EncKdcResponse

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

Constant Summary

Constants included from Rex::Proto::Kerberos::Model

AD_IF_RELEVANT, AP_REQ, AS_REP, AS_REQ, AUTHENTICATOR, ERROR_CODES, KDC_OPTION_ALLOW_POST_DATE, KDC_OPTION_ENC_TKT_IN_SKEY, KDC_OPTION_FORWARDABLE, KDC_OPTION_FORWARDED, KDC_OPTION_POST_DATED, KDC_OPTION_PROXIABLE, KDC_OPTION_PROXY, KDC_OPTION_RENEW, KDC_OPTION_RENEWABLE, KDC_OPTION_RENEWABLE_OK, KDC_OPTION_RESERVED, KDC_OPTION_UNUSED_10, KDC_OPTION_UNUSED_11, KDC_OPTION_UNUSED_7, KDC_OPTION_UNUSED_9, KDC_OPTION_VALIDATE, KRB_ERROR, NT_PRINCIPAL, NT_SRV_HST, NT_SRV_INST, NT_SRV_XHST, NT_UID, NT_UNKNOWN, PA_ENC_TIMESTAMP, PA_PAC_REQUEST, PA_PW_SALT, PA_TGS_REQ, TGS_REP, TGS_REQ, TICKET, VERSION

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, decode, #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::Model::Element

Instance Attribute Details

#auth_timeTime

Returns the time of initial authentication for the named principal.

Returns:

  • (Time)

    the time of initial authentication for the named principal


28
29
30
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 28

def auth_time
  @auth_time
end

#end_timeTime

not be honored (its expiration time)

Returns:

  • (Time)

    This field contains the time after which the ticket will


35
36
37
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 35

def end_time
  @end_time
end

#flagsInteger

requested when the ticket was issued

Returns:

  • (Integer)

    This field indicates which of various options were used or


25
26
27
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 25

def flags
  @flags
end

#keyRex::Proto::Kerberos::Model::EncryptionKey

Returns The session key.

Returns:


10
11
12
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 10

def key
  @key
end

#key_expirationTime

KDC and specifies the time that the client's secret key is due to expire

Returns:

  • (Time)

    The key-expiration field is part of the response from the


21
22
23
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 21

def key_expiration
  @key_expiration
end

#last_reqArray<Rex::Proto::Kerberos::Model::LastRequest>

of the last request by a principal

Returns:


14
15
16
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 14

def last_req
  @last_req
end

#nonceInteger

Returns random number.

Returns:

  • (Integer)

    random number


17
18
19
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 17

def nonce
  @nonce
end

#renew_tillTime

RENEWABLE flag set in the flags field. It indicates the maximum endtime that may be included in a renewal

Returns:

  • (Time)

    This field is only present in tickets that have the


40
41
42
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 40

def renew_till
  @renew_till
end

#snameRex::Proto::Kerberos::Model::PrincipalName

Returns The name part of the server's identity.

Returns:


46
47
48
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 46

def sname
  @sname
end

#srealmString

Returns The realm part of the server's principal identifier.

Returns:

  • (String)

    The realm part of the server's principal identifier


43
44
45
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 43

def srealm
  @srealm
end

#start_timeTime

Returns Specifies the time after which the ticket is valid.

Returns:

  • (Time)

    Specifies the time after which the ticket is valid


31
32
33
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 31

def start_time
  @start_time
end

Instance Method Details

#decode(input) ⇒ self

Decodes the Rex::Proto::Kerberos::Model::EncKdcResponse from an input

Parameters:

  • input (String, OpenSSL::ASN1::ASN1Data)

    the input to decode from

Returns:

  • (self)

    if decoding succeeds

Raises:


53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 53

def decode(input)
  case input
  when String
    decode_string(input)
  when OpenSSL::ASN1::ASN1Data
    decode_asn1(input)
  else
    raise ::RuntimeError, 'Failed to decode EncKdcResponse, invalid input'
  end

  self
end

#encodeObject

Rex::Proto::Kerberos::Model::EncKdcResponse encoding isn't supported


69
70
71
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 69

def encode
  raise ::NotImplementedError, 'EncKdcResponse encoding not supported'
end