Skip to content

Commit f0e3b0c

Browse files
committed
Merge pull request rapid7#1836 from dmaloney-r7/bug/anyuser_anypass_http
Verified MSF specs passing, Pro on develop functional tests working (ran Bruteforce, saw normal and verbose output concerning that bruteforce was skipped for such a case and why, verified no cred saved with 'anyuser' user).
2 parents 146284c + ee28a3a commit f0e3b0c

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

modules/auxiliary/scanner/http/http_login.rb

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,20 @@ def do_login(user='admin', pass='admin')
149149
print_status("#{target_url} - Random passwords are not allowed.")
150150
end
151151

152-
report_auth_info(
153-
:host => rhost,
154-
:port => rport,
155-
:sname => (ssl ? 'https' : 'http'),
156-
:user => user,
157-
:pass => pass,
158-
:proof => "WEBAPP=\"Generic\", PROOF=#{response.to_s}",
159-
:source_type => "user_supplied",
160-
:active => true
161-
)
162-
163-
return :abort if ([any_user,any_pass].include? :success)
152+
unless (user == "anyuser" and pass == "anypass")
153+
report_auth_info(
154+
:host => rhost,
155+
:port => rport,
156+
:sname => (ssl ? 'https' : 'http'),
157+
:user => user,
158+
:pass => pass,
159+
:proof => "WEBAPP=\"Generic\", PROOF=#{response.to_s}",
160+
:source_type => "user_supplied",
161+
:active => true
162+
)
163+
end
164+
165+
return :abort if ([any_user,any_pass].include? :success)
164166
return :next_user
165167
else
166168
vprint_error("#{target_url} - Failed to login as '#{user}'")

0 commit comments

Comments
 (0)