Full Disclosure mailing list archives
Multiple vulnerabitilies in phpRank
From: j () pureftpd org (Jedi/Sector One)
Date: Sun, 6 Oct 2002 17:01:37 +0200
--0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Product : phpRank Date : 06/10/2002 Author : Frank Denis <j () 42-networks com> ------------------------[ Product description ]------------------------ phpRank is a popular set of PHP script to easily create and maintain top-lists of web links. =46rom the official web site (http://www.phpRank.com/) : << phpRank Pro is the best way to increase traffic to your web site. What phpRank does is when someone joins your top list site and they bring you people from there site it will increase there site on your list out of whatever amount of people you would like to list, (top 10, 25, 32, 46 or whatever number you want!).
Freeware versions (that doesn't seem to be distributed from the main site
any more) have also been released and they are still widely used.
------------------------[ Vulnerabilities ]------------------------
=20
phpRank has multiple vulnerabilities.
* Cross-scripting in many places, including the main submit form :
=20
http://example.com/phprank/add.php?page=3Dadd&spass=3D1&name=3D2&siteurl=3D=
3&email=3D%3Cscript%3Ealert(42)%3C/script%3E
Injection of javascript in the main list is simple, for instance through
the banner URL :
=20
banurl=3Dhttp://fake.url/%3E%3Cscript%3Ealert(%22Oh%20oh%22)%3C/script%3E
Anyone can get ranked #1, use a phpRank site to force visitors to
transparently vote for another top-list, etc.
* Plaintext password storage.
=20
Administrator's password is stored plaintext in the source code, and in an
HTTP cookie called "ap". no login has even to be supplied.
Thanks to the previous cross-scripting vulnerabilities, the admin password
can easily be retrieved.
phpRank also stores all users passwords plaintext in a MySQL database.
passwords are also sent plaintext through email to newly registered users
and to the local administrator.
* Missing error handling.
=20
No return value of MySQL functions is ever checked. Authentication code :
<<<
$mysql_link =3D mysql_connect($mysql_host, $mysql_user, $mysql_pass);
sql =3D "SELECT spass FROM $mysql_table WHERE id =3D '$id'";
$result =3D mysql_db_query($mysql_base, $sql, $mysql_link);
while ($p =3D mysql_fetch_array($result)) {
$spass =3D $p[spass];
}
[$upass is the password sent through an HTML form]
if ($spass =3D=3D $upass) {
[reconnect to the mysql database]
[user is authenticated]
}
If the MySQL server is temporarely unavailable, $spass is empty, and anyone can log in as any user with an empty password. * Trivial generation of unique IDs. =20 Every user is affected an unique ID, used as a login. =20 That ID is a simple call to the time() function. It dramatically helps qu= iet cheating (for instance by inserting a self-voting javascript in a newly inserted banner), and brute-force attacks. * Missing authentication check. =20 The update.php script doesn't check whether the user has supplied a valid password before updating the database when the "page" HTTP variable is set. Anyone can change any entry in the database without authentication, including passwords. =20 http://example.com/phprank/update.php?page=3Dupdate&name=3Dzok&description= =3Dzok&siteurl=3Dzok&banurl=3Dzok&bh=3D42&bw=3D42&email=3Dzok&spass=3Dzok&i= d=3D1033913918 ------------------------[ Affected versions ]------------------------ =20 All these vulnerabilities have been verified on phpRank 1.8 . =20 Cross-scripting vulnerabilities have been verified in the professional version of phpRank. Other vulnerabilities haven't been verified. ------------------------[ Vendor status ]------------------------ =20 phpRank author has been notified on September 3rd 2002. Mail bounced. A n= ew mail was sent on 17 Sep 2002. That one was successfully delivered. No answer so far, no new release, no patch to fix these issues. As the freeware versions aren't available any more on the main site, they are likely to never get fixed. --=20 __ /*- Frank DENIS (Jedi/Sector One) <j () 42-Networks Com> -*\ __ \ '/ <a href=3D"http://www.PureFTPd.Org/"> Secure FTP Server </a> \'= / \/ <a href=3D"http://www.Jedi.Claranet.Fr/"> Misc. free software </a> \/ --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (OpenBSD) iD8DBQE9oFBnkmvFFxzepDkRAgtGAJ9oiWLpndcVhnZB6zpAkT1iV6n5iQCfSIRE ywHqup4wzodcJTi6CmMqBvg= =XPfG -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE--
Current thread:
- Multiple vulnerabitilies in phpRank Jedi/Sector One (Oct 06)
