[36133] in bugtraq

home help back first fref pref prev next nref lref last post

Posible security bug in phpMyWebhosting

daemon@ATHENA.MIT.EDU (Matias Neiff)
Sat Aug 14 18:22:31 2004

From: Matias Neiff <matias@neiff.com.ar>
To: bugtraq@securityfocus.com
Date: Sat, 14 Aug 2004 14:41:42 -0300
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <200408141441.44157.matias@neiff.com.ar>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all.
There is a posible security bug in the phpMyWebhosting
(http://sourceforge.net/projects/phpmywebhosting/)

File: includes/functions/pmwh.php

Function: test

Code:
- ------------------------------------------------------------------------
......
  if ( isset($_POST['password']) && ($_POST['password'] != "")) {
    $query = 'SELECT * FROM customers WHERE customer = "' . $user . '" AND
password = password("' . $_POST['password'] . '")';
    $check_pwd=sql_query($query);
    $num_rows=sql_num_rows($check_pwd);

    if ($num_rows!=1) {
      echo "<center><h2>Wrong Password</h2></center><br>";
      return false;
    } else ........
- ------------------------------------------------------------------------
Proof of concept: try using

usr: admin"-(
pass: "asdfasdf

Cheers.

Matias Neiff
www.root-solutions.com.ar
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBHk7WCRaMUNBLpxsRAiFGAKCx0UsyP7JmhuWgjRoR/xHdrGmbhQCfZ8iz
OfBEoEKU6U0k00XFmad1ENE=
=L1GN
-----END PGP SIGNATURE-----

home help back first fref pref prev next nref lref last post