Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | ishopcart cgi 0day and multiple vulnerabilities |
|---|---|
| Date: | Wed, 31 May 2006 18:10:47 -0400 |
Vendor: ishopcart inc Vendor Site: ishopcart.com Vendor Status: notified via telephone While spending a night auditing I have found 2 buffer overflows and 1 directory traversal in the ishopcart cgi, which is written in C. The directory traversal is caused by how the cgi chooses to show pages. If, for example, the CGI is tould to show an order form, the order form's name is taken as argv[1] and opens this file and prints it, ie: /cgi-bin/easy-scart.cgi?../../../../../../../etc/passwd The first buffer overflow is in main()'s szTmp[100] variable. argv[1] is placed in this variable through a sprintf, although no check is made on the size of argv[1] before putting it in szTmp: sprintf(szTmp,"%s",argv[1]); The other buffer overflow (of which I have succesfuly exploited) lies in main() also, but is overflowed in vGetPost(). char szBuf[4000]; is passed to vGetPost() under the circumstance that argv[1] contains specific criteria. vGetPost() reads POST data until the word "Submit" is encountered, doing absolutely no bounds checking on the ammount of data supplied. When notified via telephone, the author claimed to be in the process of fixing these errors, and at the same time took ishopcart.com offline. Provided is the exploit code that spawns a connect back shell. It has been tested both localy and remotely and has proved to work 100% The real issue lies in the fact that this is a shopping cart system. Also, since this is a cgi script, apache forks before executing it and hence does not die on unsuccessful attempts, meaning that combined with a massive 4000 NOP buffer, brute forcing of the offset is possible leading to a theoretical 100% probability of remote code execution. The good news is that this program doesn't seem to be common. If you you would like to view the site and the code, search 'ishopcart' on google and click it's cached link, then hit the source code link and you'll see easy-scart.c through easy-scart6.c (all, of which, are vulnerable) --K-sPecial
ishopcart-cgi-bof.c
Description: Text document
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | multiple file inclusion exploits in ovidentia v5.8.0, black-cod3 |
|---|---|
| Next by Date: | TAL RateMyPic v1.0, luny |
| Previous by Thread: | multiple file inclusion exploits in ovidentia v5.8.0, black-cod3 |
| Next by Thread: | TAL RateMyPic v1.0, luny |
| Indexes: | [Date] [Thread] [Top] [All Lists] |