Home / os / win7

FCrackZip 1.0 Local Buffer Overflow PoC

Posted on 05 September 2010

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'><html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><title>FCrackZip 1.0 Local Buffer Overflow PoC</title><link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'><link rel='alternate' type='application/rss+xml' title='Inj3ct0r RSS' href='/rss'></head><body><pre>======================================= 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. Vulnerability: 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); break; ---------------------------- Proof of Concept: $ ./fcrackzip -p $(python -c 'print &quot;A&quot;*44') file.zip Due to being compiled using canaries the overflow is detected and the process is terminated before the overwrite can take place. Solution: 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). # <a href='http://inj3ct0r.com/'>Inj3ct0r.com</a> [2010-09-05]</pre><script type='text/javascript'>var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type='text/javascript'>try{var pageTracker = _gat._getTracker("UA-12725838-1");pageTracker._setDomainName("none");pageTracker._setAllowLinker(true);pageTracker._trackPageview();}catch(err){}</script></body></html>

 

TOP

Malware :