Module: Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::Options
- Included in:
- HttpClient, LDAP, MSSQL, SMB::Client::Authenticated, WinRM, Rex::Proto::MSSQL::Client
- Defined in:
- lib/msf/core/exploit/remote/kerberos/service_authenticator/options.rb
Overview
Kerberos service authentication option helpers.
Instance Method Summary collapse
-
#kerberos_auth_options(protocol:, auth_methods:) ⇒ Object
Create the list of options that a module must provide for Kerberos authentication via the given protocol This method exists for ensuring consistency across service authentication modules.
-
#kerberos_clock_skew_seconds ⇒ Float
Parse the configured Kerberos clock skew into seconds.
Instance Method Details
#kerberos_auth_options(protocol:, auth_methods:) ⇒ Object
Create the list of options that a module must provide for Kerberos authentication via the given protocol This method exists for ensuring consistency across service authentication modules
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/msf/core/exploit/remote/kerberos/service_authenticator/options.rb', line 16 def (protocol:, auth_methods:) option_conditions = ["#{protocol}::Auth", '==', 'kerberos'] etype_regex = "(#{Msf::Exploit::Remote::AuthOption::KERBEROS_DEFAULT_OFFERED_ENC_TYPES.map { |v| Regexp.escape(v) }.join('|')})" offered_enc_types_option = Msf::OptString.new( "#{protocol}::KrbOfferedEncryptionTypes", [ true, 'Kerberos encryption types to offer', Msf::Exploit::Remote::AuthOption::KERBEROS_DEFAULT_OFFERED_ENC_TYPES.join(',') ], regex: Regexp.new("(#{etype_regex},)*#{etype_regex}", Regexp::IGNORECASE), conditions: option_conditions ) = [ Msf::OptEnum.new( "#{protocol}::Auth", [true, 'The Authentication mechanism to use', Msf::Exploit::Remote::AuthOption::AUTO, auth_methods] ), Msf::OptString.new( "#{protocol}::Rhostname", [false, 'The rhostname which is required for kerberos - the SPN'], fallbacks: ['Rhostname'], conditions: option_conditions ), Msf::OptTimedelta.new( 'KrbClockSkew', [true, 'Adjust Kerberos client clock by this offset (e.g. 90s, -5m, 1h)', '0s'], conditions: option_conditions ), Msf::OptEnum.new( 'KerberosTicketTrace', [false, 'Kerberos ticket trace mode', 'off', %w[off metadata ticket full]], conditions: option_conditions ), Msf::OptString.new( 'KerberosTicketTraceColors', [false, 'Kerberos request and response colors for KerberosTicketTrace (unset to disable)', 'red/blu'], conditions: option_conditions ), Msf::OptAddress.new( 'DomainControllerRhost', [false, 'The resolvable rhost for the Domain Controller'], conditions: option_conditions ), Msf::OptKerberosCredentialCache.new( "#{protocol}::Krb5Ccname", [false, 'The ccache file to use for kerberos authentication', nil], conditions: option_conditions ) ] [ *, offered_enc_types_option ] end |
#kerberos_clock_skew_seconds ⇒ Float
Parse the configured Kerberos clock skew into seconds.
78 79 80 |
# File 'lib/msf/core/exploit/remote/kerberos/service_authenticator/options.rb', line 78 def kerberos_clock_skew_seconds datastore['KrbClockSkew'] end |