File tree Expand file tree Collapse file tree
lib/msf/core/exploit/remote Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ def handle_type3(parsed_type3)
224224 logger . print_status ( "Anonymous Identity - Successfully authenticated against relay target #{ @ldap_client . target . ip } " )
225225 @ldap_client . disconnect! if @ldap_client
226226 else
227- logger . print_good ( "Successfully relayed NTLM authentication to LDAP!" )
227+ logger . print_good ( "Identity: #{ identity } - Successfully relayed NTLM authentication to LDAP!" )
228228 logger . on_relay_success ( relay_connection : @ldap_client , relay_identity : identity )
229229 end
230230
Original file line number Diff line number Diff line change @@ -55,11 +55,21 @@ def relay_ntlmssp_type1(client_type1_msg)
5555 )
5656 end
5757
58+ # Determines whether the relay connection originated from an HTTP server.
59+ #
60+ # @return [Boolean] true if the provider's class name contains 'httpserver', false otherwise.
61+ def is_http_source?
62+ @provider && @provider . class . name . to_s . downcase . include? ( 'httpserver' )
63+ end
64+
5865 # @param [String] client_type3_msg
5966 # @rtype [Msf::Exploit::Remote::Relay::NTLM::Target::RelayResult, nil]
6067 def relay_ntlmssp_type3 ( client_type3_msg )
6168 ntlm_message = Net ::NTLM ::Message . parse ( client_type3_msg )
62- if ntlm_message . ntlm_version == :ntlmv2
69+
70+ # Suppress the warning for HTTP sources because they can safely relay NTLMv2 type 3 messages. During testing
71+ # non-Windows HTTP clients that sent NTLMv2 type 3 messages were able to be relayed to LDAP without issue.
72+ if ntlm_message . ntlm_version == :ntlmv2 && !is_http_source?
6373 logger . print_warning ( 'Relay client\'s NTLM type 3 message is NTLMv2, relaying to LDAP will not work' )
6474 end
6575
You can’t perform that action at this time.
0 commit comments