PHP Vulnerabilities Announced 387
Simone Klassen writes "The Hardened-PHP Project has announced several serious and according to them, easy-to-exploit vulnerabilities within PHP. A flaw within the function unserialize() is rated as very critical for millions of PHP servers, because it is exposed to remote attackers through lots of very popular webapplications. The list includes forum software like phpBB2, WBB2, Invision Board and vBulletin. It is time to upgrade now."
No comment? (Score:3, Funny)
Re:No comment? (Score:5, Funny)
Re:No comment? (Score:2, Interesting)
They were announced before today [hardened-php.net], just read the dates [php.net].
You're probably not subscribed to any security mailing lists.
Re:No comment? (Score:2)
Yeah, while the sysadmins are on vacation, lamers who have nothing to do WILL enjoy this christmas present!
i just hope the idiot who defaced our shared host won't strike again with this new vulnerability. I just hope he was a script kiddie looking for vulnerable servers using an automated tool.
Kewl (Score:3, Funny)
I've said it before, and I'll say it again (Score:2, Funny)
Re:I've said it before, and I'll say it again (Score:2)
Re:I've said it before, and I'll say it again (Score:5, Funny)
A language that is a little more practical for extracting and reporting.
NB
Re:I've said it before, and I'll say it again (Score:2, Insightful)
Java/J2EE/JSP
You can mess up security policies and implementations with Java, but it is much harder to shoot yourself in the foot. The JVM may have bugs, but because it is used for all Java applications, it is likely well-debugged and secure
Language features eliminate security problems. For example, the Java JVM does something incredibly advanced: bounds checking!
Re:I've said it before, and I'll say it again (Score:2)
Re:I've said it before, and I'll say it again (Score:2)
Yup, because it is a *LOT* harder to install, and administer. It's all scary black magic, and down right confusing.
Give me apache and PHP any day, with the hardened patches, and mod_suphp.
p.s. I know squat about what it's like to program in, I'm just a poor admin who's had the misfortune to have to administer tomcat.
Re:I've said it before, and I'll say it again (Score:3, Interesting)
Re:I've said it before, and I'll say it again (Score:3, Insightful)
Er. Download tomcat. gunzip and untar. place JAVA_HOME into catalina.sh. Set a manager account in the config file. Start it up. It's one of the easiest installs I have ever done.
Installing, starting, and stopping individual web apps is all done with a simple web interface. It's one of the easiest systems to administrate I have used.
Compare to PHP, where on some Linux distros the only
Re:I've said it before, and I'll say it again (Score:3, Insightful)
Re:I've said it before, and I'll say it again (Score:4, Interesting)
PHP is straightforward and easy, and most distributions have their own packages for it. Whereas with Java, the initial set up is overwhelming for beginners.
I learnt PHP years ago by myself, and it wasn't really that hard. Yet a few months ago when I was finally required to learn Java, the complexity of the Java frameworks (Hibernate, Spring, etc) tortured me for days before I actually knew what was going on. And it doesn't help when all the frameworks gives such a "bulky" feeling.
The learning curve of Java is definitely much higher than PHP.
Of course, I do agree that Java is much better suited for large scale web programming than PHP. It's much easier to do things cleanly in Java, and although PHP's loose typing is great for a simple 1 page script, I'd rather have the strict typing of Java when it comes to large scale projects.
Re:I've said it before, and I'll say it again (Score:4, Insightful)
"p.s. I know squat"
We have a winner!
Installing a JVM and an application server is about 99% less time consuming, and easier, than a comparable PHP installation.
Check Resin Quickstart [caucho.com]
Re:I've said it before, and I'll say it again (Score:2)
Re:I've said it before, and I'll say it again (Score:2)
Not all LAMP code is embedded in HTML pages or printing the HTML directly from code... We have template systems, XML/XSL, and the like, too.
The others seem to be more developer features than language features. I've banged out quick prototypes in C and written scalable, maintainable
Re:I've said it before, and I'll say it again (Score:2)
As it is much harder to shoot ANYTHING without the 1-year + lotsamoney J2EE training.
Re:I've said it before, and I'll say it again (Score:3, Funny)
Re:I've said it before, and I'll say it again (Score:3, Funny)
Re:I've said it before, and I'll say it again (Score:2, Insightful)
Apache: 85% of the internet can't be wrong.
Please sir, dismount yourself from that high horse you are riding on.
Re:I've said it before, and I'll say it again (Score:2)
Bzzst. BRL's [codesimply.net] define-input syntax bypassed the whole register_globals mess. A similar syntax could have been used in PHP to give some of the register_globals simplicity without the security holes. The PHP community can talk about high horses when it overcomes its own NIH syndrome and starts copying good ideas from elsewhere.
Re:I've said it before, and I'll say it again (Score:2)
Re:I've said it before, and I'll say it again (Score:2, Funny)
Re:I've said it before, and I'll say it again (Score:2, Insightful)
But scripting languages are what applications are made of! Right?
I don't think it matters what you use. (compiled or script) There will be an exploit/flaw.
You can shuck all of your PHP and write mts components in VB or even compile your server side stuff as ANSI C, but nothing is going to be perfect.
IMHO what matters s how fast vulnerbility information is published after found and how quickly it is fixed.
Third-party modules? (Score:5, Interesting)
Re:Third-party modules? (Score:3, Insightful)
Re:Third-party modules? (Score:2, Insightful)
This is exactly why it's foolish to use a so-called "database" (*cough* mysql *cough*) which does not support stored procedures. Stored procedures are a vital means of defense against SQL injection attacks, and any RDBMS which is used as a back-end to a publicly-accessable application must use them to be
Re:Third-party modules? (Score:2, Insightful)
What you described is definitely a good idea to prevent SQL injection, but it doesn't have to be done using stored procedures. You can do the same thing on the web server with a custom function or by using prepared statements (using the PEAR library, etc).
Re:Third-party modules? (Score:2)
I think this is why you don't store user information in a cookie, url param, or hidden field. You use a session ID, and get the user id from the session db based on session ID. The session ID is your "reasonably large random value".
Using good coding practices is one way to keep yourself safe from these types of attacks. Even with a "database" like MySQL.
Re:Third-party modules? (Score:2)
Re:Third-party modules? (Score:2)
agreed.
at least they're getting there w mysql 5.0:
http://dev.mysql.com/doc/mysql/en/Stored_Pr
Re:Third-party modules? (Score:2)
Upgrade. (Score:4, Insightful)
It's so god damned time-consuming to rebuild the entire thing over and over again, especially because you keep having to rebuild all the additional modules (mysql support, gd support, mcrypt support, pdf, the list goes on).
Re:Upgrade. (Score:2)
% cat
#!/usr/local/bin/rc
# run this after cvsup
echo 'got root ?'
cd
make
cd
--with-apxs \
--disable-cgi \
--enable-mbstring \
--with-openssl \
--with-pcre-regex \
--with-pgsql
make && make install
Re:Upgrade. (Score:2)
Re:Upgrade. (Score:2)
I started out doing web applications in perl and switched to PHP then PHP / Smarty now and love it.
Re:PHP is to Perl as Java is to C++ (Score:2, Flamebait)
I mean, you're completely wrong and utterly ignorant, but nice post!
(OK, you're right about PHP. It does suck.)
Re:PHP is to Perl as Java is to C++ (Score:2)
I've done quite a bit of Lisp (and in fact taught it for a semester), and for most practical projects I'd take _any_ of the above named languages over Lisp. Lisp solves a subset of problems pretty well, but as a general purpose programming language you're g
Re:PHP is to Perl as Java is to C++ (Score:2)
Since when did you actually get a stack overflow in Lisp, when there wasn't actually a bug in your program? There's nothing about Lisp that causes stack overflows more often than any other programming language. Are you saying that Lisp doesn't permit the stack to grow as much as other languages? That's silly. Are you saying that because Lisp has recursion? Other languages have recursion too, you know.
The interactive programming envorinment
Re:PHP is to Perl as Java is to C++ (Score:5, Insightful)
I've programmed in PHP for 5 years and have successfully used it to feed my family the entire time.
I haven't had any problem with security vulnerabilities since day 1 (I write all of my own software rather than using any particular package).
It has scaled easily to meet my needs, including an e-commerce site that does $3,000,000+ a year in orders. Granted that is small potatoes for some, but that is irrelevant.
What is relevant is that PHP is fast and easy to develop in, easy to debug, and easy to deploy. It does what I need it to do, and it does so successfully.
In my mind it is well designed for it's intended purpose.
There is no sense picking apart a screw driver and saying what a bad hammer it is. It isn't a hammer. It wasn't designed to be a hammer. It will never be a hammer.
For my purposes PHP is well designed and is the best tool for the job I've found. I've looked into many other tools, but hands down the winner for my needs is PHP. Trust me, if there were another tool that offered the same power AND ease AND was more profitable for me to use overall, I'd be using it. If it exists, I haven't found it. This isn't a religous pursuit for me. I don't care what the "best" programming language is. I'm here to feed my family and PHP serves that purpose well.
Re:PHP is to Perl as Java is to C++ (Score:3)
But to say it's well designed is not in any way valid, PHP for the most part is a monolithic hacking togethor of things, lots of inconsistency (function names etc), little modularity (after compilation), many unexpected results (for example try working with recursive references sometime, one mistaken return by value and you end up with two identical
Re:Upgrade. (Score:2)
Bryan
Re:Upgrade. (Score:2)
Not if using ports (Score:2)
# cvsup
# portupgrade php5-cgi
# portupgrade -f php5-extensions
The latter -f causes all extensions to be rebuilt, which is what I wanted. Voila, upgraded in about 20 minutes on an Athlon XP 2000+.
double standards (Score:4, Insightful)
Meh (Score:2)
Re:double standards (Score:5, Insightful)
Re:double standards (Score:2)
you guys...
you call it...
Who exactly is "you"? Don't stereotype a group of unique individuals as if they are some kind of collective borg.
It like what my DB prof said about Oracle v. MySQL (Score:5, Insightful)
Products from Zend can be expected to perform very well, but not something that is free for public use. The fact that PHP is so high quality, open and free, gives it some leeway that Microsoft's ASP.NET implementation doesn't deserve. People don't have to spend several thousand dollars to setup an environment capable of hosting PHP because it's free, and all of the tools needed to run it are free.
None of this of course negates the fact that security holes in PHP are just as serious in practice as those in ASP.NET and need to be fixed ASAP. The difference is how we should perceive free software bugs versus commercial software bugs. When we actually buy a license for a commercial product, we should be able to expect something reasonably akin to top notch quality. Microsoft is getting better in that regard, but the level of quality they have delivered in the past is abysmal compared to what a commercial entity should be delivering.
By all reasonable expectations, a company like Microsoft should be delivering extremely secure products. They pay very large sums of money to hire some of the brightest minds, and they charge accordingly. Therefore the public has a right to expect extremely comprehensive testing, including OpenBSD-style line-by-line code audits for things like buffer overflows. Does it not surprise anyone that a small project like OpenBSD can find the time and manpower to do that on such a large code base for the manpower present, but Microsoft, a company with probably at least ten times the manpower for just the Windows team cannot?
You should look at the alert vs fix dates, DOH! (Score:2)
FYI, the vulnerabilities were announced on "2004/12/15" (hardened-php). The fix was available since "15 Dec 2004".
Conclusion: Zend took AT MOST 23:59:59 to release a fix for said vulnerabilities.
Compare with Microsoft bugs, where it takes an AVERAGE of 6 months to get a vulnerability bug fixed.
In comparison, Microsoft's sof
Re:double standards (Score:2)
Re:double standards (Score:5, Insightful)
Re: (Score:2)
OMG (Score:2)
Forum defacing excepted, is there anything else someone could do using these vulnerabilities?
Re:OMG (Score:2)
Re:OMG (Score:4, Informative)
Hurrah for Nightly MySQL dumps.
Anyone have a patch/update for Ensim Pro 3.5 (Score:2)
anyone know of any ensim pro updates or packages someone has continued to build for this setup?
(or possibly redhat 7.3 updates..??)
thanks!
Re:Anyone have a patch/update for Ensim Pro 3.5 (Score:2)
Want to upgrade? Try downloading php, compile it as an apache module, and instead of "make install", replace the files individually. Ensim does a lot of weird stuff.
Re:Anyone have a patch/update for Ensim Pro 3.5 (Score:2)
They will more than likely have patches for PHP/Apache.
Of course... (Score:5, Insightful)
Yes, I'm a big fan of php, but like any language out there, there are vulnerabilites. PHP had a bigger problem with register_globals being defaulted to on. Not to make light of these vulnerabilities, but if you are checking user input (assuming you're not using a downloaded package) you should be pretty safe.
Re:Of course... (Score:2)
While many programming languages have "tainting" mode, are there any IDEs which use syntax-highlighting to display tainted variables in red, up until the line where they're sanitized (for various configurable definitions of sane)?
(p.s. don't bother patenting it, this comment is prior art)
Secunia advisory (Score:3, Informative)
Question/Comment (Score:4, Informative)
"Note: Due to a problem with earlier versions of Zend Optimizer, its users are urged to upgrade to the latest version."
I can't seem to find any information on what this problem may be. No release notes or anything. Any clues?
Comment:
PHP.net's download scheme is worse than Sourceforge's if you can believe that. Therefore, here are some unPHP.net-ized URLs:
US2 [php.net]
Belgium [php.net]
Finland2 [php.net]
You'll find you can actually right-click and save these and they won't prompt you for a filename "mirror" or something useless like the rest of PHP's download links.
from the fa: (Score:2)
Advisory: Multiple vulnerabilities within PHP 4/5
Release Date: 2004/12/15
Last Modified: 2004/12/15
Author: Stefan Esser [sesser@php.net]
Application: PHP4
Severity: Several vulnerabilities within PHP allow
local and remote execution of arbitrary code
Risk: Critical
Vendor Status: Vendor has released bugfixed versions.
References: http://www.hardened-php.net/advisories/012004.txt
4.3.10 contains the fix.
Can't compile 5.0.3 (Score:2)
http://bugs.php.net/bug.php?id=31104 [php.net]
Has anyone else run into this problem? If so, please vote on this so that it's fixed for 5.0.4 ;)
Why isn't hardened-PHP merged with PHP? (Score:5, Interesting)
Their implementation of memory checking seems to be sane and valid for all installs. So why are most of us running vanilla like this?
Just a thought.
Upgraded to 4.3.10... (Score:2, Informative)
Why are these things always announced on Friday? (Score:2, Funny)
Re:Why are these things always announced on Friday (Score:2)
Check your inputs!!!! But not an impressive record (Score:5, Insightful)
The unserialize() bug issue is rather serious, though.
It's true that all systems have vulnerabilities, but that does not mean that all systems are equally secure. What you want is a track record that shows good things. Frankly, I'm not all that impressed with PHP's track record so far. The good news is that the PHP developers have been willing to change critical pieces (like turning off globals) to deal with security issues, and it looks like at least some of them are taking security more seriously. But I'd really like to see evidence of serious steps to not just provide a niftier OO model, but provide a programming language where programs are more likely to actually withstand attack. PHP has a lot going for it, but an implementation that can't handle harsh attacks is simply not appropriate for today's network.
I'd like to see Hardened-PHP, or something like it, merged into the mainline PHP. Why is it that only some users will get a PHP that tries to defend against attacks? Does this mean that other PHP users never get attacked? Does this mean that PHP programmers have stopped making common mistakes? Nonsense. There's no reason that there has to be a separate project to modify PHP to be secure against attack; that should be part and parcel of PHP itself. The performance impact is tiny, and much less important than keeping control over your own machine. Why should anyone be impressed at the speed of a system that's about to be controlled by an attacker?
One of the best ways to get a secure setup is to find out what product has the better security track record with evidence of a secure design (modular parts, etc.), and switch to one of them. That's true whether it's OSS or proprietary; OSS is no guarantee of security, it simply makes some kinds of worldwide review possible. Using Internet Explorer or Outlook? Switch to Firefox and Thunderbird [dwheeler.com]. Using Sendmail? Switch to Postfix. That doesn't guarantee perfection, but you're generally better off in the long run. I think you could make a very good case for switching from PHP to Perl or Python or Java. If the PHP folks want to keep their large user base, they need to get on the stick.
Re:Check your inputs!!!! But not an impressive rec (Score:2)
Re: (Score:2)
Re:Check your inputs!!!! But not an impressive rec (Score:3, Insightful)
If (Score:2, Funny)
ARGH!!! (Score:2)
Oh well... here goes another one.
About time (Score:3, Insightful)
Not to sound trollish but the FBI and computer security groups label PHP with more holes than ASP. No joke.
Its nice to see the php team begin to take security seriously. Especially if they want lamp to ever replace Java or ASP on many corporate webservers and intranets.
warning! 5.0.1 - 5.0.3 "breaks" EMPTY() function (Score:3, Informative)
Watch out when upgrading!
This code prints 'empty' with 5.0.1, but 'not empty' with 5.0.3.
You must check all your code for the use of empty() with a string!
I wish PHP would warn everyone about this sort of thing.
Here is the man page...nothing said about it: http://www.php.net/empty [php.net]
Not just for script kiddies this time (Score:5, Informative)
This exploit has been known about in select hacker groups since late October. The first script for the kiddies was released last weekend (December 11 - 12) and it most certainly originated in Brazil. The group responsible for the initial wave of terror call themselves "H4ck3rsBr", and most of the defacements were done by none other than the infamous "S8ldier". No doubt he wrote a proof of concept for phpBB right away, seeing as how he's always first to the scene with new phpBB exploits involving PHP.
If you're running forum software that sits on top of PHP, upgrade PHP before it's too late. These guys took out a friend's Linux server because he caught them right in the middle of defacing his clients' websites (just index.html's). They had a rootkit installed and made sure to cause as much damage as possible before being booted off. After backing up the filesystem, re-booting the machine failed, as the partition table was toast and most of the important data sectors had been trashed as well.
I'm glad that the PHP team decided to fix this, but I'm also hopeful that the phpBB, vBulletin, etc. teams will start validating their input a little more carefully.
Re:Arrrrgh (Score:2, Informative)
Here: http://www.entropy.ch/software/macosx/php/ [entropy.ch] , are usually uptodate and easy installers for PHP on OS X; he's at 4.3.9 still but I trust the newer one will be up soon. :-)
They're really fire&forget installers, great for people like me
Re:Arrrrgh (Score:2)
Re:Arrrrgh (Score:2)
http://docs.info.apple.com/article.html?artnum=61 7 98 [apple.com]
But the problem is, while Apple is very responsive to security issues, you kind of have to wait on them for any updates to components that are part of the stock/standard OS. If you go around installing and updating things yourself OVER the OS-installed components, it could break the real updates when they arrive from Apple. The only alternative is to install the updated version in an alternate location, and then revert to Appl
How is this flamebait? (Score:2)
Re:How is this flamebait? (Score:2)
he poster of this parent comment is simply frustrated that Mac OS X is affected by this vuln (which I didn't know was affected until I read his comment).
I'm not sure if you mean that you did not know Mac OS X was affected, or you did not know that the parent was frustrated by this.
If you read this article, and didn't know Mac OS X is affected, well you probably haven't enabled PHP on Mac OS X.
Hypocrisy of slashot (Score:2, Insightful)
Re:Arrrrgh (Score:2)
Additionally, you can't just say "I want to use perl" when you're not the one even coding it, but just installing
the TRUTH about php arrays Re:Arrrrgh (Score:5, Interesting)
In PHP there is no difference between a hash and a numerical array, its the same thing.
try this:
$a[5]="five";
$a[0]="zero";
foreach($a as $k=>$v) echo "$k=$v
\n";
and you'll get:
5=five
0=zero
I like em, a php array is like an ORDERED perl hash, and you may be interested to know that PHP style arrays are regularly requested for perl.
Sam
Re:Open source vulnerabilities (Score:2)
You might be right though: a sec-advisory section might be a good idea.
Re:Solution... (Score:2)
Sure, it works, but only until it becomes popular and, thus, no longer obscure.
Re:So sad ... (Score:2)
You hate the "fanboys" - I abhor the bigots whom fail to recognize and acknowledge the freedom of choice in the F/OSS "world". Try to embrace that freedom - it's good for the soul.
Re:So sad ... (Score:2, Insightful)
;)
Re: (Score:2)
Re:This proves once an for all (Score:2, Funny)
$karma++;
No... that would be "in a Perlfect world..."
Re:This proves once an for all (Score:2)
Re:It's always a mixed bag. (Score:3, Informative)
Like 90% or so of the modules included with the basic PHP distribution are just wrappers around standard libraries, no code is duplicated nor functionality reinvented. The wrapper is there to make the libraries easy to use.
The 2 libraries you mention happen to be bundled with the distribution for convenience, but you are free to use external versions supplied by your OS installation or perhaps yourself.
/greger
Re:It's always a mixed bag. (Score:2)
Not much code rewritten.
Re:It's always a mixed bag. (Score:2)
Re:It's always a mixed bag. (Score:2)
The code does do something. It's a wrapper around the actual library, making it accessible within PHP. Or would you prefer that every single user of PHP had to write his/her own wrappers to do this? That'd be an awful lot of wheels reinvented.
Re:It's always a mixed bag. (Score:3, Informative)
http://www.infoworld.com/article/04/11/19/47FEt o p2 0_5.html
18. Underestimating PHP
IT managers who look only as far as J2EE and
Discussion of PHP scalability reached a high-water mark in June, when the