Module: Msf::Exploit::Remote::Kerberos::Client::Base

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

Instance Method Summary collapse

Instance Method Details

#build_client_name(opts = {}) ⇒ Rex::Proto::Kerberos::Model::PrincipalName

Builds a kerberos Client Name Principal

Parameters:

  • opts (Hash{Symbol => <String, Integer>}) (defaults to: {})

Options Hash (opts):

  • :client_name (String)

    the client's name

  • :client_type (Integer)

    the client's name type

Returns:

See Also:


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

def build_client_name(opts = {})
  name = opts[:client_name] || ''
  name_type = opts[:client_type] || Rex::Proto::Kerberos::Model::NT_PRINCIPAL

  Rex::Proto::Kerberos::Model::PrincipalName.new(
    name_type: name_type,
    name_string: name.split('/')
  )
end

#build_server_name(opts = {}) ⇒ Rex::Proto::Kerberos::Model::PrincipalName

Builds a kerberos Server Name Principal

Parameters:

  • opts (Hash{Symbol => <String, Integer>}) (defaults to: {})

Options Hash (opts):

  • :server_name (String)

    the server's name

  • :server_type (Integer)

    the server's name type

Returns:

See Also:


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

def build_server_name(opts = {})
  name = opts[:server_name] || ''
  name_type = opts[:server_type] || Rex::Proto::Kerberos::Model::NT_PRINCIPAL

  Rex::Proto::Kerberos::Model::PrincipalName.new(
    name_type: name_type,
    name_string: name.split('/')
  )
end