[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44.0301210922530.596-100000@gustlik.softwired.wfc>
From: paczor at fubar.pl (Pawel Kaczor)
Subject: Re: php-nuke again ...
On Wed, 15 Jan 2003, Karol Wi?sek wrote:
> snip from mailatach.php
>
> if (isset($userfile) AND $userfile != "none") {
> if (ini_get(file_uploads) AND $attachments == 1) {
> $updir = "tmp";
> @copy($userfile, "$updir/$userfile_name");
>
> Sample attack which allows an attacker to grab database password
> and login.
>
> http://target.server/modules/WebMail/mailattach.php?
> userfile=../../config.php&userfile_name=../attachments/file.txt&
> attachments=1
I wasn't able to provide this attack succssefully but there's easy way of
prevention - one can put those lines at the beginning of mailattach.php
file:
if (eregi("mailattach.php",$PHP_SELF)) {
Header("Location: ../../index.php");
die();
}
--
------------------------------------------------------------------
"A z kwiatk?w, jakie pan lubi najbardziej? Sztukami?s z kwiatkiem"
----------------------------------[pawel kaczor paczor@...ar.pl]--
Powered by blists - more mailing lists