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 paczorat_private]-- _______________________________________________ Full-Disclosure - We believe in it. Charter: http://lists.netsys.com/full-disclosure-charter.html
This archive was generated by hypermail 2b30 : Tue Jan 21 2003 - 01:20:17 PST