Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59471 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 154 invoked from network); 8 Apr 2012 21:04:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Apr 2012 21:04:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:37507] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 23/A6-56433-74DF18F4 for ; Sun, 08 Apr 2012 17:04:08 -0400 Received: by yenl5 with SMTP id l5so1904553yen.29 for ; Sun, 08 Apr 2012 14:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=TnXNBV0DEkTR42JvO4UaCNzLI4Var1uZVqTbLavbnt8=; b=aYW4CPvHDpgbZ8E3C3naJ9sOnHSMrT1WDqM7MMWTynZdDaJ9WMI00TPiNe6L9hlJnx EFBSrY5lYshGWNmsK4DP1qHb13Ar00/sT6t/jl44gF2moGHZwOpjQSqycMlhcVdiANPn KiHpXqP4Epzakxa55aY1m15TYzXYbmuxFK6+BbPb0uklXlCd3GjBhFKcJbCav8BVtVhD uueDlrnQMa4uOtocBMLCrjBZvBj8ZnERnsFgfICtud31tR2Br3eWqdoOZV7ViYKymY5K N3GFARebMqrPKtxKYzZGnEqA3VaAWkwaPRvxwemHqGZvmbL1q8MYJ3e5A8V/Y7phiwss YFVA== Received: by 10.100.200.4 with SMTP id x4mr1273093anf.6.1333919045350; Sun, 08 Apr 2012 14:04:05 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.146.86.14 with HTTP; Sun, 8 Apr 2012 14:03:25 -0700 (PDT) In-Reply-To: References: <4F80C739.2060404@gmail.com> <4F817DE1.3020608@gmail.com> Date: Mon, 9 Apr 2012 06:03:25 +0900 X-Google-Sender-Auth: _BYgUE-KSvpZctF1XtsGEkywGOs Message-ID: To: =?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?= Cc: PHP Developers Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] PHP class files without : > Hi, > > You are missing my points. > > 2012/4/8 =C1ngel Gonz=E1lez : >> 2012/4/8, Yasuo Ohgaki: >>> 2012/4/8 =C1ngel Gonz=E1lez : >>>> How does it help security? >>>> If any, requiring '>>> out malicious files on apps with uploads in case there's a local >>>> inclusion vulnerability somewhere. >>>> >>> Attackers may inject PHP script almost anything/anywhere since >>> PHP code may be embed anywhere in a file. >>> >>> For example, malicious PHP script may be in GIF something like >>> >>> gif89a ...any data.. >>> >>> and all attacker have to do is include/require the data somehow. >>> Attacker cannot do that this for other languages, since they are >>> not a embedded language. I know case that attackers may inject >>> malicious perl/ruby script in data files, but PHP is too easy >>> compare to these languages. >>> >>> Regards, >>> >>> -- >>> Yasuo Ohgaki >> Yes, but if I properly check that there's no '> (as you should verify everything you allow users to upload), it can't be >> exploited. >> OTOH if the vulnerable include is not an include but an include_code, >> they could >> use a file which was > > Checking " One should check " files that may contain " > Embedding PHP script in image file is popular attack method. > There is even program called image fight that inject "" > into uploaded images to prevent hosting malware images. I should not forget to mention, one should check