Full Disclosure mailing list archives
Vulnerabilities on Cryptographp
From: Lu33Y <lu33y () cmif eu>
Date: Thu, 17 May 2012 22:50:46 +0200
During a security assessment, I’ve found that my target was using Cryptographp which is a PHP script used for generate « captchas ». It was easily noticeable when I’ve found the following URL: http://WWWW/cryptographp.inc.php?cfg=XX&sn=YYYY&ZZZZ So I've decided to take a look at the source code and I’ve found 2 vulnerabilities. The first one has already been disclosed but hasn’t been corrected. This vulnerability allows an attacker to execute arbitrary scripts on the host server by causing cryptographp.inc.php to include any arbitrary file existent in the same directory. Here is the vulnerable source code: if (is_file($_GET['cfg']) and dirname($_GET['cfg'])=='.' ) $_SESSION['configfile']=$_GET['cfg']; else $_SESSION['configfile']="cryptographp.cfg.php"; include($_SESSION['configfile']); The second vulnerability can be easily found but seems not to be revealed on Internet or on an exploit database. It is an HTTP Response Splitting which can be used to perform cross-site scripting attacks, cross-user defacement, web cache poisoning, and similar exploits. Here is the vulnerable source code: <?php … Header("Location: cryptographp.inc.php?cfg=".$_GET['cfg']."&sn=".session_name()."&".SID); ?> For the mitigation of this two vulnerabilities, one simple rule: Input Validation Lu33Y -
_______________________________________________ Full-Disclosure - We believe in it. Charter: http://lists.grok.org.uk/full-disclosure-charter.html Hosted and sponsored by Secunia - http://secunia.com/
Current thread:
- Vulnerabilities on Cryptographp Lu33Y (May 18)