Skip to content

Commit 4503a7a

Browse files
David MaloneyDavid Maloney
authored andcommitted
Don't save creds of anyuser:anypass
If http accepts any user and any pass, it's not a real auth there is no reason to create cred objects for this. These creds have been confusing our users
1 parent c82bb73 commit 4503a7a

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)