Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/metasploit/framework/ftp/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def data_disconnect
def connect_login(user,pass,global = true)
ftpsock = connect(global)

if !(user and pass)
if !(user and pass) && !(user == '' && pass == '')
return false
end

Expand Down
6 changes: 5 additions & 1 deletion modules/auxiliary/scanner/ftp/ftp_login.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,18 @@ def run_host(ip)
end
end

# Always check for anonymous access by pretending to be a browser.
def anonymous_creds
anon_creds = [ ]
# Support both ANONYMOUS_LOGIN option and RECORD_GUEST option
if datastore['RECORD_GUEST']
['IEUser@', 'User@', 'mozilla@example.com', 'chrome@example.com' ].each do |password|
anon_creds << Metasploit::Framework::Credential.new(public: 'anonymous', private: password)
end
end
# Also add blank username/password when ANONYMOUS_LOGIN is enabled
if datastore['ANONYMOUS_LOGIN']
anon_creds << Metasploit::Framework::Credential.new(public: '', private: '', realm: nil, private_type: :password)
end
anon_creds
end

Expand Down
Loading