PDA

View Full Version : Exploit in your Contact Form Image Verification Code


jblack
01-05-2010, 05:13 PM
I emailed the Administrator of this site a couple of months back about an exploit in the image verification code posted on this site. The URL to this page can be found here (http://www.thewebhelp.com/php/php_contact_form_with_image_validation/)

The problem with this code is that it is storing the MD5 hash in a cookie. The server then relies on the client (Which isn't trusted) to send the same hash back to it. An easy exploit is where someone captures a valid hash for a single code (Say 1234). Now to send an email through your server, all we have to do is send the hash for 1234 and 1234 in the image verification field and we'll send email every time.

The solution to this problem is to store the answers on the server itself. I've rewritten the code using sessions and it is attached. If someone could please shake the Admin for this site and have them update their code, I'd appreciate it.

Thank you.

MartynasK
08-23-2010, 07:30 PM
Your uploaded file is corrupted. Please reupload.

adrianTNT
08-23-2010, 09:22 PM
I was able to extract his files from that zip, it was packed multiple times or something like that, "7 zip" was able to extract it.
I attached the files, note that this is NOT a release of thewebhelp.com.

Edit: it happens on these files too, probably forum system is trying to zip the files, you can download them by right click the file and "save target as", then unpack them with "7 zip", twice. :( :confused: