Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27426 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41828 invoked by uid 1010); 13 Jan 2007 16:25:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 41813 invoked from network); 13 Jan 2007 16:25:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jan 2007 16:25:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from [204.11.219.139] ([204.11.219.139:42955] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/B3-14818-01809A54 for ; Sat, 13 Jan 2007 11:25:53 -0500 Received: from [192.168.200.104] (c-67-169-43-97.hsd1.ca.comcast.net [67.169.43.97]) (authenticated bits=0) by lerdorf.com (8.13.8/8.13.8/Debian-3) with ESMTP id l0DGPmxP020189 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 13 Jan 2007 08:25:48 -0800 Message-ID: <45A90809.3050008@lerdorf.com> Date: Sat, 13 Jan 2007 08:25:45 -0800 User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) MIME-Version: 1.0 To: Stefan Esser CC: "internals@lists.php.net" References: <45A8FC49.7050909@hardened-php.net> In-Reply-To: <45A8FC49.7050909@hardened-php.net> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Comments on PHP security From: rasmus@lerdorf.com (Rasmus Lerdorf) Stefan Esser wrote: > It is very good that bugs in PHP Applications are bad for PHP's image. > The majority of servers get hacked because of Remote URL Includes (and > not by XSS/SQL Injection). The existance of Remote URL Includes is fully > to blame on the PHP engine and is UNIQUE. After years the feature is > still not kicked out of PHP. In PHP 5.2.1 there will be a configuration > option that activates an (incomplete) blacklist. Everyone should know by > now that blacklists are BAD. I am not sure I would call it a blacklist. It is a flag in the streams layer that marks stream handlers that could possibly make a network connection as such and there are only a finite set of stream handlers. Assuming we have marked the right streams, which I think we have at this point, the only way to trick it would be to bounce through some sort of file system network mechanism like auto-mounted file systems or perhaps some \\Server\path\foo.php thing on Windows, but at that level I think it is up to the local sysadmin to make sure the PHP scripts can't get to something they shouldn't. -Rasmus