Skip to content

Commit 6097a68

Browse files
committed
Finish up the ESC8 check after more research
1 parent 2e4bc2c commit 6097a68

File tree

1 file changed

+13
-3
lines changed
  • modules/auxiliary/server/relay

1 file changed

+13
-3
lines changed

modules/auxiliary/server/relay/esc8.rb

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,20 @@ def check_host(target_ip)
6666
disconnect
6767

6868
return Exploit::CheckCode::Unknown if res.nil?
69-
return Exploit::CheckCode::Safe unless res.code == 401
70-
return Exploit::CheckCode::Safe unless res.headers['WWW-Authenticate'].include?('NTLM') && res.body.present?
69+
unless res.code == 401
70+
return Exploit::CheckCode::Safe('The target does not require authentication.')
71+
end
72+
73+
unless res.headers['WWW-Authenticate'].include?('NTLM') && res.body.present?
74+
return Exploit::CheckCode::Safe('The target does not support NTLM.')
75+
end
7176

72-
Exploit::CheckCode::Detected('Server replied that authentication is required and NTLM is supported.')
77+
if datastore['SSL']
78+
# if the target is over SSL, downgrade to "Detected" because Extended Protection for Authentication may or may not be enabled
79+
Exploit::CheckCode::Detected('Server replied that authentication is required and NTLM is supported.')
80+
else
81+
Exploit::CheckCode::Appears('Server replied that authentication is required and NTLM is supported.')
82+
end
7383
end
7484

7585
def validate

0 commit comments

Comments
 (0)