Skip to content

Commit

Permalink
Merge pull request rapid7#1836 from dmaloney-r7/bug/anyuser_anypass_http
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
shuckins-r7 committed May 29, 2013
2 parents 146284c + ee28a3a commit f0e3b0c
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions modules/auxiliary/scanner/http/http_login.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,20 @@ def do_login(user='admin', pass='admin')
print_status("#{target_url} - Random passwords are not allowed.")
end

report_auth_info(
:host => rhost,
:port => rport,
:sname => (ssl ? 'https' : 'http'),
:user => user,
:pass => pass,
:proof => "WEBAPP=\"Generic\", PROOF=#{response.to_s}",
:source_type => "user_supplied",
:active => true
)

return :abort if ([any_user,any_pass].include? :success)
unless (user == "anyuser" and pass == "anypass")
report_auth_info(
:host => rhost,
:port => rport,
:sname => (ssl ? 'https' : 'http'),
:user => user,
:pass => pass,
:proof => "WEBAPP=\"Generic\", PROOF=#{response.to_s}",
:source_type => "user_supplied",
:active => true
)
end

return :abort if ([any_user,any_pass].include? :success)
return :next_user
else
vprint_error("#{target_url} - Failed to login as '#{user}'")
Expand Down

0 comments on commit f0e3b0c

Please sign in to comment.