March To Be Month of PHP Bugs 292
PHP writes "Stefan Esser is the founder of both the Hardened-PHP Project and the PHP Security Response Team (which he recently left). During an interview with SecurityFocus he announced the upcoming Month of PHP bugs initiative in March." Quoting: "We will disclose different types of bugs, mainly buffer overflows or double free (/destruction) vulnerabilities, some only local, but some remotely triggerable... Additionally there are some trivial bypass vulnerabilities in PHP's own protection features... As a vulnerability reporter you feel kinda puzzled how people among the PHP Security Response Team can claim in public that they do not know about any security vulnerability in PHP, when you disclosed about 20 holes to them in the two weeks before. At this point you stop bothering whether anyone considers the disclosure of unreported vulnerabilities unethical. Additionally a few of the reported bugs have been known for years among the PHP developers and will most probably never be fixed. In total we have more than 31 bugs to disclose, and therefore there will be days when more than one vulnerability will be disclosed."
So, PHP means ? (Score:4, Funny)
Re: (Score:2, Insightful)
Re:So, PHP means ? (Score:5, Insightful)
And if inexperienced scripters is really the major problem, then the PHP developers need to take them into account when developing PHP. This means that the PHP developers need to add features to their product that help prevent such inexperienced people from writing easily-exploitable scripts. There has been some work done in this area, but it's been minimal, and so far ineffective.
Yes, inexperienced developers probably are responsible for many of the problems. But the more experienced (I would hope) developers of PHP itself need to step up to the plate, and do their part to deal with the problem of inexperienced developers writing poor code. Even if they don't do it in order to offer a better product, they should do it to save the few remaining strands of their reputation.
Re: (Score:2, Interesting)
Re:Pot calling the kettle black (Score:4, Interesting)
I'm a programmer. I work with PHP. I see a hell of a lot of problems with its design and implementation. Am I ready to dump it and switch to something better? You bet. I've been waiting for the chance for the last 5 years or more.
Can I actually do this?
No. The marketplace is such that if I implement my solutions in any other environment, I'm cutting myself out of large chunks of the market simply because people might choose a hosting provider that doesn't support whatever alternative language I choose to use.
Re: (Score:2)
If you are making that mistake you should probably not be flaming anyone.
Re:So, PHP means ? (Score:5, Interesting)
PHP is also forever afraid of breaking backwards compatibility. They probably don't want to scare PHP coders.
They also have issues around the monolithic nature of PHP. Oh, you want image processing? Recompile PHP! Oh, you need XML processing? Recompile PHP! There is no isolation whatsoever, everything resides in the same namespace.
I am glad that they are making progress, though. PHP 5 finally brought their OO up to speed (mostly). They finally have a secure, native database connector (PDO) that supports escaped bound parameters. PHP 6 is finally removing some deprecated features.
That said, I still am weary when I log into a website that holds my personal information and see a ".php" URL.
(I was a full time PHP developer for about 6 years. Was.)
Re: (Score:2, Informative)
Please don't let us see the return of \'magic quotes\'
Re: (Score:2)
Yes, but most hosting companies just switch it straight back on again, to stem the tide of complaints from users who downloaded an old script from somewhere but it doesn't work...
Re: (Score:2)
I was going to gripe about it being an issue for the hosting companies (we've had it disabled on our servers for several years), but now that I think about it, you're right: Register Globals is a "wings fall off" button.
Re: (Score:3, Funny)
Re: (Score:2)
Re: (Score:2)
I understand the point you're making, but why don't you just run it in CGI mode if you don't want to recompile, or use dl() to load the exten
Take down the service? (Score:3, Insightful)
Really? Leaving aside the matter of using shared libraries, whenever I've had to add features to PHP it's gone like this:
The only actual downtime occurs during step 5, which lasts maybe a second at most. This is Linux after all -- you can run the
From the PDO docs page: (Score:3, Informative)
The default behavior in case of database problems is to display the host, u
Re: (Score:3, Interesting)
You are correct, but that doesn't make net irritants that are permi
Maybe he could stagger it out (Score:2)
Re: (Score:2)
Especially us poor bastards that have 500 + servers to patch. I'm sure (err, hope?) they will do it responsibly , however I still see this being a *very* interesting month.
I'm a bit ambivalent (Score:2)
Re: (Score:2)
Re: (Score:2)
great... (Score:5, Informative)
Re: (Score:2, Funny)
Re:great... (Score:4, Insightful)
Re: (Score:3, Funny)
Wanna see me shoot chocolate milk from each one of my eyelids? (Uh-huh!)
Wanna copy this and paste exactly like I did? (Yeah yeah!)
Try the wrong CID and get fucked up worse that my code is? (Huh?)
My mouse's dead weight, I'm tryin to get my story straight
but I can't figure out which Administrator I want to impersonate (Ummmm..)
And Dr. Phil said, "Failure is no accident."
Uh-huhhh! "Then why's your hands red? Man you busted!"
Well at age twelve, I
Re: (Score:2, Insightful)
Re: (Score:2)
Re: (Score:2)
I'm not sure how I feel about that statement.
I'm the primary developer of an opensource PHP-based application, and I can attest that PHP security is more in the hands of the application developer. Yes, we've all heard some of the stupid PHP Nuke exploits, people not quoting their SQL properly ... but should the PHP interpreter developers really be held accountable for other peoples'
Re: (Score:2)
Re: (Score:2)
I understand ; I was complaining about the general dumping on PHP applications which seems to follow any thread with the word "PHP" in it.
Re: (Score:3, Insightful)
In the case of SQL injection attacks, definitely yes. They provide add_slashes(), oh, but wait, that's insecure, so they provided mysql_escape_string() instead. Oh wait, that's insecure too, so they provided mysql_real_escape_string() instead. All the while, ignoring the fact that string concatenation is prone to security problems by its very natu
Re: (Score:3, Interesting)
There are many reasons that add_slashes is insecure, and if you think about it, you should be able to come up with a few yourself. Have you ever heard of Unicode? Do you really know what the quoting conventions of your database are, or are you just assuming that add_slashes somehow magically does? Have you even bothered to use google or read any of the many security articles about PHP? Obviously not. And the same goes for so many other PHP developers. They need training wheels and adult supervision, otherw
Re: (Score:3, Insightful)
Re: (Score:3, Insightful)
I'm sure that after the dust has settled PHP will be more secure than it was, and that can only be a good thing.
Re: (Score:2)
That's like saying that the ocean will be more wet after it's been raining for a day than it was before.
NM (Score:2)
Re: (Score:2)
Arr? (Scooby-doo head tilt)
Re: (Score:3, Informative)
The fact is that the bugs have really been there the whole time, and just because we didn't know about it doesn't mean that some nefarious person didn't know about it.
Now, script kiddies might not know about the vulnrabilities until they are made public, but they are called script kiddi
Re: (Score:2)
Well, yes, but the fact is that there is incalculably higher risk from an unpatched, publicised bug (especially if more than a few weeks old) than there is in an unpublicised one. Almost all exploits occur using well known bugs, even if you discount worms.
Re:great... (Score:4, Funny)
[Ducks down and hopes next month isn't the "31 days of Perl Bugs"]
-Eric
Re: (Score:2)
Look on the open/bright side. (Score:3, Informative)
Also, he's given the developers a week or two of warning before March. If there's anything *that* serious in there, actually known to the developers, the fix could conceivably be ready by the time the bug is announced.
I run PHP sites, and I'd rather see the bugs public and being patched, than known only to the developers (we hope).
Re: (Score:2)
Looks like this will also be "Month-of-me-working-harder-to-make-sure-my-site- i s-patched- and-updated-and-not-exploited-by-script-kiddies"
Well, if the article is to be believed and the PHP team hasn't much cared about some of these bugs, patching and updating won't help you. In any event, these bugs won't be fixed live. So they will result in potential compromise you won't be able to stop, likely.
In other words, this will also be "Month-of-you-getting-bent-over-by-open-security-h oles-in-PHP-you-can'
Re: (Score:2)
You can thank the PHP internals and Zend about this. Having to deal with them at some points, they are literally like having to handle a bunch of spoiled children on a mission to have fun on your expense.
I've said it plenty of times and I'll say it again: PHP is going down, fast. The only reason to use it right now, is because there's still some money to be made from cl
Re: (Score:2)
(Much) faster, more stable and more consistent alternatives currently include Mono (C# - an excellent language), Python, Java and possibly Ruby 2.0, from the looks of it.
I hear this a lot. PHP has a massive installed base of working apps. There is no compelling reason to move to a new language simply because it appears to be more secure at the expense of not having functional applications.
Re: (Score:3, Interesting)
Re: (Score:2)
I actually persuaded my business partner to authorise a 2-month long project to reimplement all the features we need from phpBB from scratch, rather than use original code, just for this reason. It didn't take much work to convince him that we didn't want the hassle of having to deal with regular [netcraft.com] 0-day [netcraft.com] exploit [astahost.com] sc
Huh (Score:5, Funny)
March that never ended (Score:2)
even if... (Score:3, Insightful)
Re:even if... (Score:5, Informative)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Maybe what he cared more about was security, not the language.
Re:even if... (Score:5, Insightful)
Fork marketing? (Score:2)
Re: (Score:2)
sure - i understand the frustration that's driving him. and i guess the MoPHPb will wake some folks up, hopefully the devs. but it'll wake up script-kiddies, too. in fact, that's what i fear most, it might only wake up the script kiddies, as the devs didn't seem to care in the past and that leaves more than thirty unpatched publicly documented security holes and a few folks, who need to run php. what a lot of fun...
The script kiddies are already awake. The probes for PHP vulnerabilities are getting mor
Re: (Score:3, Insightful)
Re: (Score:2)
I wanted to like PHP
Re: (Score:2)
Strange. I have a s
Hear, hear. (Score:4, Insightful)
Re: (Score:2)
1. Define in a config file a variable that specifies the location of your code, e.g.:
config.inc:
$modulebase = "/usr/local/lib/mypackage/2.3.11/modules";
In the rest of the code:
include ($modulebase . "/file_you_need.inc");
Then, you can upgrade versions of the modules by installing a new version in a new directory, and switching the
Blatant Self-Promotion (Score:2)
Yep. Everything he writes on this topic is along the lines of:
-They all suck.
-I'm the greatest.
-They're all out to get me.
-The fools, the laughed at me at the institute.
-You aren't taking me seriously! I've fixed everything in my personal extension to PHP and you keep breaking it by changing the language!
etc... etc...
I don't know what he thinks he's going to accompli
Re: (Score:2)
Of course it's self-promotion. Why does the guy stick his picture on the front of the article?
Attention geek bloggers: You are not attractive. Stop [networkper...edaily.com] posting [securityfocus.com] pictures [zdnet.com] of your dorky [zdnet.com] looking [businessweek.com] selves [pcmag.com] at the top of your blog.
It doesn't make you look like a real journalist, it just makes you look like a tool.
(Note: in case you're wondering how I got so many pictures to prove my point, I simply looked up the fud tag [slashdot.org] on Slashdot and started clicking away :)
Re: (Score:2)
Some searching, however, came up with these.
Top 10 Blogger Babes [gizmodo.com]
Gamer chick (don't know if she's actually a blogger) Morgan Webb [google.com]
i suggest for next month (Score:3, Funny)
Two words: (Score:2)
Partially surprising (Score:5, Insightful)
I really shouldn't be surprised at the PHP team's approach to security any more, but it really does still surprise me from time to time. It's amazing, but the PHP team are worse than Microsoft ever were with security. And they don't even learn from this - they've had this attitude for as long as I can remember (PHP 3 days), and they just aren't getting it. Or rather, if they get it, they just don't care.
PHP is a disgrace to the open source community. (Score:5, Interesting)
This is very true. And also very unfortunate. When it comes to many managers, PHP has given the entire open source community a bad name. This is mainly because it has been repeatedly pushed as being part of the LAMP suite, when in fact Python and Perl are far better options for the 'P'. So when you recommend the use of Linux, Apache or MySQL, they automatically think of PHP, and recall how terrible its security is. And then they associate that lack of security with Linux, Apache and MySQL, even when that's not the case!
If there's one thing the open source community as a whole should do, it should be to disown PHP. Responsible open source developers and projects need to just stop using it for their web sites. It'd be good if more things like this Month of PHP Bugs were held, just to show the public that the OSS community knows that PHP is terrible, and wants to do something about it. The longer we continue to use PHP, the harder it will be to repair the reputation of even completely unrelated (and far more secure) open source projects.
Re:PHP is a disgrace to the open source community. (Score:4, Insightful)
One of the problems with PHP is the fact that when the bar of entry is so low, you get a lot more low bar people actually coding it. It's become the next generation of VB garbage. The language is only half of the security problem (a half we could better do without, but still).
Re: (Score:3, Interesting)
I'm not surprised. Their attitude to bug reports in general is pretty hostile. See, for instance, this [php.net]
For once (Score:5, Insightful)
Re: (Score:3, Insightful)
Most flaws in any code are caused by poor programmers. It's possible to write clearly structured, well laid out code in BASIC (no, not visual BASIC, the real thing), as most implementations support things like local variables and procedures. It's just exceptionally rare.
This is why so many computer science degrees (at least until recently in the UK) used Modula-2 or Pascal as their primary teachi
Re: (Score:2)
The Modula family of languages, OTOH, are way cool.
Re: (Score:3, Insightful)
Personally I have always thought PHP to be a steaming pile of poorly thought out garbage but there is no denying its popularity despite its flaws.
A critical thinker will look at those two clauses and derive some wisdom. PHP is not "poorly thought out", it changes to meet the market's needs. Java was very well thought out, but it's mostly popular with big shops where you can hire a guy for $70,000/year to maintain a tiny little bit of a larger program. PHP is very popular because it allows a single person
Re: (Score:2)
So does ASP. In fact, ASP is easier in a lot of ways, and has MORE flexibility (supports any ISAPI language, including vbscript (yuck), perl (whee), php (hello month of bugs!), python, blah blah blah.
PHP is popular because it's free and Free and lets one person write a very simple/stupid dynamic webpage very easily. Unfortunately, it seems that when you get
Install modsecurity (Score:5, Informative)
Whilst it probably won't solve a lot of the problems with php and security it does help protect the server especially when you don't have control over what your users are uploading to their web space.
Are bugs the problem? (Score:5, Interesting)
Re: (Score:2)
Personally while I don't necessarily like all the work I have to do when there is a "bug exposure" in the media for tools I am using -- like PHP -- I don't have time to track everything let alone fix them, this "month of bugs" won't affect me as m
Re: (Score:3, Insightful)
Or even more likely, how easy it is to download and run insecure code written by some other lousy programmer. It's not the people who are writing their own CMS systems that are getting haxor'd, it's the people who grabbed a copy of PHPNuke and threw it up there on the 'net.
Wait... (Score:5, Funny)
Only a month?
Ha ha, yes, thank you, I'll be here all week, bringing predictable yet mildly amusing banter. In fact, I'll be here all year. The whole of my life, probably. *breaks down and cries*
Comment removed (Score:3, Informative)
Re: (Score:3, Insightful)
Err... he has [hardened-php.org].
Sometimes I think people don't read the articles.
Then I remember I'm reading slashdot.
Coming in April (Score:5, Funny)
At least the Month of Apple Bugs was a hard target to go after.
A Couple Easy Precautions (Score:3, Informative)
Here are a few simple precautions for PHP configuration:
This is going to be fun (Score:2)
Slashdot, give it a rest! (Score:2)
So let's apply this concept to learning in the PHP community. For years, PHP developers (newbies, amateurs, and experts alike) have been handed down wisdom that reflected the current knowledge. Years ago, it was using regist
Re: (Score:2)
When was the last time you installed PHP and it "exploded" on you? As I said, give it a rest.
Yes, this _is_ unethical (Score:3, Interesting)
Maybe. But to take more than 31 bugs and disclose them a day at a time so that in effect major web-facing infrastructure for big business and home users alike will have no chance at all of being secured during this entire window, all for the purposes of publicity?
Re: (Score:2, Informative)
There are a handful [cakephp.org] of decent [xisc.com] PHP frameworks [symfony-project.com] out there, with others coming along [zend.com], which you can take and compare with Django, but
Re: (Score:2)
I have programmed in PHP and C#/VB.NET for web forms (back when
Re: (Score:2)
It's a backwards compatibility hack. When they implement mysql_escape_string, the MySQL C API didn't need a connection object to the server to perform quoting, it just did it locally. Some advanced features were added in later MySQL versions, and a connection to the server is now needed in order to know what character
Re: (Score:2)
One of the things I dislike about PHP and I liked about the WebForms
As somebody who has written a 3-tier web application in PHP for a well-known multinational company, I can assure you that tier separation is not only possible in
Re: (Score:2)
Write a front end program that takes the user's request parameters and parses them, selects
Re: (Score:2)
One way of looking at PHP is that it is an extremely powerful templating language. That's the job it was designed to do in the first place, anyway. So why not write your back end in a more powerful language and just do a quick front end templating job in PHP that takes those results and slaps them into a web page.
Oh, right, the reason not to
Re: (Score:2)
(lack of quotation marks deliberate)
and
(addition of quotation marks also deliberate)
Re: (Score:2)
Re: (Score:2, Informative)
It is increment twice because after the first loop, $b is still a pointer to the fourth element of $a. Continuing in the code, the second loop will assign the fourth value of $a each value of $a, then increment it. Try debugging it like so:
Re: (Score:2)
Suns normally explode. Only IBM Netfinities implode.
Oh, right. You meant... never mind.
Re: (Score:2)
I'm not a programmer and never will be, so "Code your own!" doesn't work for me. If PHP is really so insecure then what are realistic alternatives?
Right now, they're very few and very far between. You could look through sourceforge projects in the Internet/WWW category with the filter 'excluding programming language PHP' applied.
The problem is that so much stuff was implemented in PHP in the late 90s/early 2000's that just about every hosting service went out and installed it. This led to a positive feedb