<span class="gmail_quote"><br></span><div><span style="font-weight: bold;">[-] Produit&nbsp;&nbsp;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; : KorviBlog<br><br><span style="font-weight: bold;">[-] Langage&nbsp;&nbsp;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; : PHP<br><br><span style="font-weight: bold;">
[-] Site web officiel&nbsp;
</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : <a href="http://korvi.jdhosts.net/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://korvi.jdhosts.net/</a><br><br style="font-weight: bold;"><span style="font-weight: bold;">
[-] Page vulnérable&nbsp;&nbsp;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : livre_or.php <br><br style="font-weight: bold;">
<span style="font-weight: bold;">[-] Faille de sécurité&nbsp;</span>&nbsp; &nbsp;&nbsp; &nbsp; : Cross Site Scripting Permanent <br><br style="font-weight: bold;"><span style="font-weight: bold;">[-] Explications&nbsp;&nbsp;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; : <br><br>

<div style="text-align: center;">&nbsp;&nbsp; &nbsp; Ligne 4 : livre_or($_POST['prenom'], $_POST['emailFrom'], $_POST['body'], time());<br><br>&nbsp;&nbsp;&nbsp;&nbsp; Les variables $_POST['prenom'] , $_POST['emailFrom'] et $_POST['body'] ne sont pas correctement filtrées avant leur affichage, &nbsp; &nbsp; &nbsp; ce qui permet l'injection de code malicieux via le formulaire de cette page.
<br></div><span style="font-weight: bold;">&nbsp;&nbsp; &nbsp; </span><br style="font-weight: bold;"><span style="font-weight: bold;">[C]orrection :</span> &nbsp;<br><br><div style="text-align: center;">&nbsp;&nbsp;&nbsp;&nbsp; Pour corriger le problème, il suffit d'appliquer la fonction htmlentities() à ces trois variables :
<br><br>&nbsp;&nbsp;&nbsp;&nbsp; livre_or( htmlentities($_POST['prenom']), htmlentities($_POST['emailFrom']), htmlentities($_POST['body']), time()); <br></div><br><span style="font-weight: bold;">[R]emarque : </span><br><br><div style="text-align: center;">

&nbsp;&nbsp;&nbsp;&nbsp; Aucune verification des données entrées n'est faite, en laissant par exemple les champs prénom email message vides le&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message est posté.<br></div></div><div><span class="sg"><br style="font-weight: bold;">
<span style="font-weight: bold;">
[C]redit :</span>&nbsp;&nbsp; cdg393

</span></div>