lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <15971C7C-EB44-4D2F-8448-B5077C663C54@cmif.eu>
Date: Thu, 17 May 2012 22:50:46 +0200
From: Lu33Y <lu33y@...f.eu>
To: full-disclosure@...ts.grok.org.uk
Subject: Vulnerabilities on Cryptographp

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 - 
Content of type "text/html" skipped

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ