@@ -16,6 +16,7 @@ module Exploit::Remote::HttpClient
1616 include Msf ::Auxiliary ::Report
1717 include Msf ::Auxiliary ::LoginScanner
1818 include Msf ::Exploit ::Remote ::Kerberos ::Ticket ::Storage
19+ include Msf ::Exploit ::Remote ::Kerberos ::ServiceAuthenticator ::Options
1920
2021 #
2122 # Initializes an exploit module that exploits a vulnerability in an HTTP
@@ -36,6 +37,8 @@ def initialize(info = {})
3637
3738 register_advanced_options (
3839 [
40+ *kerberos_storage_options ( protocol : 'HTTP' ) ,
41+ *kerberos_auth_options ( protocol : 'HTTP' , auth_methods : Msf ::Exploit ::Remote ::AuthOption ::HTTP_OPTIONS ) ,
3942 OptString . new ( 'UserAgent' , [ false , 'The User-Agent header to use for all requests' ,
4043 Rex ::UserAgent . session_agent
4144 ] ) ,
@@ -156,24 +159,22 @@ def connect(opts={})
156159
157160 http_logger_subscriber = Rex ::Proto ::Http ::HttpLoggerSubscriber . new ( logger : self )
158161
159- if datastore [ 'HTTP::Auth' ] == Msf ::Exploit ::Remote ::AuthOption ::KERBEROS
160- kerberos_authenticator = Msf ::Exploit ::Remote ::Kerberos ::ServiceAuthenticator ::HTTP . new (
161- host : datastore [ 'DomainControllerRhost' ] ,
162- hostname : datastore [ 'HTTP::Rhostname' ] ,
163- proxies : datastore [ 'Proxies' ] ,
164- realm : datastore [ 'DOMAIN' ] ,
165- username : datastore [ 'HttpUsername' ] ,
166- password : datastore [ 'HttpPassword' ] ,
167- timeout : 20 , # datastore['timeout']
168- framework : framework ,
169- framework_module : self ,
170- cache_file : datastore [ 'HTTP::Krb5Ccname' ] . blank? ? nil : datastore [ 'HTTP::Krb5Ccname' ] ,
171- mutual_auth : true ,
172- use_gss_checksum : true ,
173- ticket_storage : kerberos_ticket_storage ,
174- offered_etypes : Msf ::Exploit ::Remote ::AuthOption . as_default_offered_etypes ( datastore [ 'HTTP::KrbOfferedEncryptionTypes' ] )
175- )
176- end
162+ kerberos_authenticator = Msf ::Exploit ::Remote ::Kerberos ::ServiceAuthenticator ::HTTP . new (
163+ host : datastore [ 'DomainControllerRhost' ] ,
164+ hostname : datastore [ 'HTTP::Rhostname' ] ,
165+ proxies : datastore [ 'Proxies' ] ,
166+ realm : datastore [ 'DOMAIN' ] ,
167+ username : datastore [ 'HttpUsername' ] ,
168+ password : datastore [ 'HttpPassword' ] ,
169+ timeout : 20 , # datastore['timeout']
170+ framework : framework ,
171+ framework_module : self ,
172+ cache_file : datastore [ 'HTTP::Krb5Ccname' ] . blank? ? nil : datastore [ 'HTTP::Krb5Ccname' ] ,
173+ mutual_auth : true ,
174+ use_gss_checksum : true ,
175+ ticket_storage : kerberos_ticket_storage ,
176+ offered_etypes : Msf ::Exploit ::Remote ::AuthOption . as_default_offered_etypes ( datastore [ 'HTTP::KrbOfferedEncryptionTypes' ] )
177+ )
177178
178179 nclient = Rex ::Proto ::Http ::Client . new (
179180 opts [ 'rhost' ] || rhost ,
0 commit comments