Slashdot Mirror


PHP Security & Exploit

Anonymous Coward writes "It looks like after a few weeks of rumors, an exploit for PHP/Apache under Linux surfaced. Luckily, PHP.net has the patch ready to go. While the export only claims to work for PHP up to 4.0.5, php.net also releases a patch for 4.1.1, the (until yesterday), latest version of php. This patch makes a small edition to the part of the source code (rfc1867.c) that is used by the exploit."

28 comments

  1. "edition"? by Takeel · · Score: 0

    Do you perhaps mean an *addition* to the source code?

    1. Re:"edition"? by DrSkwid · · Score: 1

      s/export/exploit

      looks like the php grammar/spell checker was buggy too!

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  2. If you only speak PHP... by Paul+Burney · · Score: 2, Funny

    <?php

    if ($system != 'patched') {

    $file_uploads = 'Danger, Will Robinson!';

    }

    ?>

    --
    <?php while ($self != "asleep") { $sheep_count++; } ?>
  3. all versions previous to 4.1.2 are at risk by chrismcc@netus.com · · Score: 3, Informative

    All versions previous to 4.1.2 (today's release) are at risk

    http://www.php.net/
    http://security.e-matters.d e/advisories/012002.htm l

    The bug report is here:
    http://bugs.php.net/bug.php?id=15736

    it recomends turning off file uploads as a work around

    --
    Christopher McCrory "The guy that keeps the servers running" chrismcc@gmail.com http://www.pricegrabber.com
  4. Why isn't this on the main page? by SyniK · · Score: 1

    Bunch of mod_perl trolls slashdot is!
    http://uptime.netcraft.com/up/graph/?mode_u=off&mo de_w=on&site=slashdot.org
    The site slashdot.org is running Apache/1.3.20 (Unix) mod_perl/1.25 mod_gzip/1.3.19.1a on Linux.

    --
    -Tom
  5. How to patch major distro versions by Why+Should+I · · Score: 2, Interesting

    Now I like to instal PHP from source personally, but most people i know that use PHP, do so on a default redhat 7.2 rpm install. i.e. they are running ver 4.0.6.

    So my question is: Is there a way to patch the major distro versions (i.e. rh, suse, mandrake ...) from there default versions to the secure version?

    Because if there isn't then there are still gonna be alot of webservers out there running insecure versions of php. And, if there isn't a way, then why isn't there?

    1. Re:How to patch major distro versions by LinuxGeek8 · · Score: 2

      You should be able to update the packages with up2date on redhat.
      And also, you should check redhats errata page regularly for security updates.

      --
      Well, don't worry about that. We can get you back before you leave. (Dr. Who)
    2. Re:How to patch major distro versions by J'raxis · · Score: 1

      RPMs should be released as soon as someone builds them, follow what the other comment said (use `up2date` and check RedHats errata page) or just go to RPMFind and refresh repeatedly until a new RPM is posted. :)

    3. Re:How to patch major distro versions by Electrum · · Score: 2

      Is there a way to patch the major distro versions (i.e. rh, suse, mandrake ...) from there default versions to the secure version?

      # apt-get update
      # apt-get upgrade

      :-)

    4. Re:How to patch major distro versions by Menthos · · Score: 1
      # up2date -u

      :-)

      --

      GNU/Linux. The Freshmaker.

  6. The important facts by Anonymous Coward · · Score: 2, Informative

    This is a very high impact vulnerability, mod_php is the worlds most popular Apache module, maybe the most popular web script language. (no flamewars intended, it IS popular among a lot of people whether you like it or not).

    However, one line in the config should according to php.net disable the vulnerability :

    file_uploads = off

    (When tested phpinfo(); gives "no value" at my site)

    One file needs to be patched for all PHP versions, get the patch here :

    php.net/downloads.php

    Patch like this:

    1. Enter ../src/php-4.0.x/main dir
    2. patch < pathtodiffile/rfc1867.c.diff-4.0.6
    3. build either the DSO module or build apache with static php

    The "full" advisory is here :

    security.e-matters.de

    now, PATCH!

  7. another codered/nimda-like incident in the making? by Anonymous Coward · · Score: 0

    seeing as how php, and especially the mod_php is so popular on the interent, its not difficult to imagine a scenario similar to CodeRed and Nimda incidents less than 6 months ago.

    Hell, the nimda scans are still going on, ffs.

    hopefully, webmasters who uses php are a bit more clueful, and everyone works to patch their system ASAP.

    /hopeful

  8. How? by Anonymous Coward · · Score: 0


    Patch like this:

    1. Enter ../src/php-4.0.x/main dir
    2. patch

    1. That patch command asks "File to patch?"

    2. Build the DSO module... how??

    I checked php.net etc etc of course before I asked a question like this here.

    Mike

    1. Re:How? by J'raxis · · Score: 1

      Um, this documentation is in the basic INSTALL file that comes with PHP. Once the patch is applied you rebuild it just like you built it the first time.

  9. Mirrors by bluntmanspam · · Score: 1

    For those having problems getting the patch, mirrors are here:
    US1
    US2
    US3
    US4
    UK1
    UK2

  10. IIS5? by psychalgia · · Score: 1

    This does not affect IIS5.0 + PHP?

    --

    ________________________________________________

    1. Re:IIS5? by matthewp · · Score: 1
      This does not affect IIS5.0 + PHP?

      From the advisory:

      Finally I want to mention that the boundary check vulnerabilities are only exploitable on linux or solaris. The heap off by one is only exploitable on linux(maybe solaris)x86 and the arbitrary heap overflow in PHP3 is exploitable on most OS and architectures. (This includes *BSD, Windows, Linux, Solaris)
      It would seem to be a question of operating system rather than web server.
  11. front page news... by (startx) · · Score: 1

    and this isn't on the main /. page because.................

  12. Re:another codered/nimda-like incident in the maki by TurboRoot · · Score: 1

    This really isn't a huge possibility. This exploit has to happen on a real php page. If you have mod_php installed but no php scripts then you can't be exploited by this bug.

    Also, mod_php isn't installed on millions of peoples computers who have no idea what a web server is like IIS was.

    The closest to code red this could do, is pull out all domains, and check for index.php in the root directory. Or maybe it could attempt to index a domain and try to find an index.php...

    But as I said.. unless there is a .php page on you server, you can't be exploited with this current exploit.

  13. Re: php runs as "nobody" by fferreres · · Score: 1

    You can comprimise php and the entire web site (how much harm depends on setup), and probably make a lot of mess. You can't take full control of the system though.

    And it's not a piece of cake attack either like Red Code II. Some versions are very difficult to exploit.

    With RedCode II you could just wipe everything from the HD, steal passwords, certificates, everthing (at least that I thought)

    --
    unfinished: (adj.)