akbkhome

Smoking toooooo much PHP



pecl/filter
You may be surprised, but I fully agree with you on the input filtering point. Imagine if you had to explicitly tell your firewall which ports to block. That's not how security works. You open up holes in your firewall for only the things you explicitly want to allow through. The same should be true of web applications. The whole concept of letting everything through and then having to manually go and filter things that you think might contain something nasty is flawed. It also makes auditing the code impossible. If instead you filtered everything by default and you had to explicitly unfilter the particular fields you knew needed to contain weird characters, then you would be way ahead, and it would be much easier to audit the code since you just had to look for the explicit filter holes and follow that data through the code.

This is what pecl/filter is all about and I really need to find some more time to finish that code. It's super-controversial because people associate it with magic_quotes_gpc and figure it will be a nightmare to write portable applications against something like this. And they have a point, but that doesn't make them right when looking at this problem at its most basic architectural level.
#1 - Rasmus ( Link) on 10 Jul 2005, 12:49 Delete Comment
Not About Pear
Hi, Alan -- as far as "He should be breathing a sigh of relief that the worst damage is having to run a SQL statement DELETE * FROM xxx where body like "%test_xss%"" ... you can bet I am. :-)

As far as how to react, I think I did the proper thing; that is, I fixed it and rolled a new release (in under 24 hours from the demonstrated exploit). Everything else is secondary.

You confuse my ranting about the Solar and Cerebral Cortex attacks with the *.php.net testing. I am not talking about the latter, but about the former.

There are no "friendly" tests without approval in advance. If the tester was in fact "friendly" he did not (to my knowledge) notify the target after the fact of the vulnerability or the solution.

I argue that if you're going to do "testing" or "research" you need to tell people in advance, and then tell them afterwards what you found. Is that such a bad thing? If you don't tell, then you are indistinguishable from a bad guy who is beginning a series of attempts to open up your system.

I don't mind security testing; in fact, I love it. But for goodness sake don't keep it to yourself, let the owner know. I can't as that's so hard.
#2 - Paul M. Jones ( Link) on 10 Jul 2005, 21:06 Delete Comment
Log, Speck, Eye
You close with this: "But this is definatly not an invitation to try and hack my systems, but if you do, please dont rootkit them, as it's a royal Pain in the ass to fix!!!"

And if someone *does* try to test your systems for vulnerabilities, you sure would appreciate advance notice, wouldn't you? And you would want them to tell you after-the-fact what they found, right?

That's all I'm asking for from "friendlies."
#3 - Paul M. Jones ( Link) on 10 Jul 2005, 21:09 Delete Comment
Input filtering
input filtering is an admin tool from my POV, not a developer tool. if
I am an admin and I want to secure (or tighten the cracks) my sites this
is the kind of tool I want.

As a developer I might simply require this kind of input filtering to
secure my application, but overall I should probably not rely on this
stuff anyways.

So an admin could simply disallow any tags from get parameters. Or I may
disallow any tags inside parameters that dont contain some string in
their name to flag them as containing tags (now this can seriously kill
your ability to install a third party app). This will likely break a few
apps, so it pays for developers to take these possibilities into account
but as an admin in some situations I rather break parts of an
application than accept security issues.
#4 - Lukas Smith ( Link) on 11 Jul 2005, 09:41 Delete Comment


Name
Email
Homepage
Comment Title
Comment
 
Contact me at alan@akbkhome.com