PDA

Bekijk Volledige Versie : Posible security bug in phpMyWebhosting



Matias Neiff
15/08/04, 00:45
-----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-----

Udo Müller
20/08/04, 06:25
In-Reply-To: <200408141441.44157.matias@neiff.com.ar>

Hi Matias,

On Sat, 14 Aug 2004 14:41:42 -0300 you wrote:
> Hi all.
> There is a posible security bug in the phpMyWebhosting
> (http://sourceforge.net/projects/phpmywebhosting/)
>
> File: includes/functions/pmwh.php
> Function: test
> [...]>Proof of concept: try using
>
> usr: admin"-(
> pass: "asdfasdf

I am the main developer of this piece of software and not amused that you didn't mail about this bug.

But: I tried with actual version 0.4.0 (and also earlier version) and can't reproduce your security bug.
If I enter your information I get a "Wrong password" message.

Could you please explain this?

Regards Udo Müller
dev@PHPMyWebHosting

Udo Mueller
21/08/04, 08:15
Hallo Daniel,

begin * Daniel Souza schrieb [20-08-04 02:01]:
>
> may your server is configured with magic_quotes disabled, so, the " is not
> slashed and we have a basic sql injection. Im not sure because I have not
> seen the source codes to say that, but it's what looks like. Is there a
> addslashes in the code ?

In Debian magic_quotes = On is standard.

I should add addslashes in the code. Thank you!

end

Gruss Udo
--
Ohne Signatur!

Daniel Souza
21/08/04, 09:15
Matias,

may your server is configured with magic_quotes disabled, so, the " is not
slashed and we have a basic sql injection. Im not sure because I have not
seen the source codes to say that, but it's what looks like. Is there a
addslashes in the code ?

[]'ss
Daniel

----- Original Message -----
From: "Udo Müller" <info@cs-ol.de>
To: <bugtraq@securityfocus.com>
Sent: Thursday, August 19, 2004 5:07 AM
Subject: Re: Posible security bug in phpMyWebhosting


> In-Reply-To: <200408141441.44157.matias@neiff.com.ar>
>
> Hi Matias,
>
> On Sat, 14 Aug 2004 14:41:42 -0300 you wrote:
> > Hi all.
> > There is a posible security bug in the phpMyWebhosting
> > (http://sourceforge.net/projects/phpmywebhosting/)
> >
> > File: includes/functions/pmwh.php
> > Function: test
> > [...]>Proof of concept: try using
> >
> > usr: admin"-(
> > pass: "asdfasdf
>
> I am the main developer of this piece of software and not amused that you
didn't mail about this bug.
>
> But: I tried with actual version 0.4.0 (and also earlier version) and
can't reproduce your security bug.
> If I enter your information I get a "Wrong password" message.
>
> Could you please explain this?
>
> Regards Udo Müller
> dev@PHPMyWebHosting
>