store more specific credential wordpress_directory_traversal_dos

bug/bundler_fix
Jeffrey Martin 2017-05-31 18:55:21 -05:00
parent 6161fbacb0
commit d68365d8df
No known key found for this signature in database
GPG Key ID: 0CD9BBC2AF15F171
1 changed files with 1 additions and 33 deletions

View File

@ -66,43 +66,10 @@ class MetasploitModule < Msf::Auxiliary
datastore['DEPTH']
end
def report_cred(opts)
service_data = {
address: opts[:ip],
port: opts[:port],
service_name: opts[:service_name],
protocol: 'tcp',
workspace_id: myworkspace_id
}
credential_data = {
origin_type: :service,
module_fullname: fullname,
username: opts[:user]
}.merge(service_data)
login_data = {
last_attempted_at: DateTime.now,
core: create_credential(credential_data),
status: Metasploit::Model::Login::Status::SUCCESSFUL,
proof: opts[:proof]
}.merge(service_data)
create_credential_login(login_data)
end
def user_exists(user)
exists = wordpress_user_exists?(user)
if exists
print_good("Username \"#{username}\" is valid")
report_cred(
ip: rhost,
port: rport,
user: user,
service_name: (ssl ? 'https' : 'http'),
proof: "WEBAPP=\"Wordpress\", VHOST=#{vhost}"
)
return true
else
print_error("\"#{user}\" is not a valid username")
@ -121,6 +88,7 @@ class MetasploitModule < Msf::Auxiliary
starting_thread = 1
cookie = wordpress_login(username, password)
store_valid_credential(user: user, private: password, proof: cookie)
if cookie.nil?
print_error('Aborting operation - failed to authenticate')
return