There is only one way to avoid Bobby Tables attacks:
That's it. Don't try to escape invalid characters. Don't try to do it yourself. Learn how to use parameterized statements. Always, every single time.
- Use parameterized SQL calls.
The strip gets one thing crucially wrong. The answer is not to "sanitize your database inputs" yourself. It is prone to error.
fatbird, here's where I explain how computers and networks work, again. (Last time it was 802.11)Okay, vsync, so here's the URL I try on this site: http://www.metafilter.com/../../../etc/shadowWe have computers to automate these processes and they follow our instructions just as an employee at my front desk might follow my instructions on what information to give out to different visitors.
- You enter an address into your browser
- Your browser contacts the server and says "may I have this page please"
- The server may respond in one of several ways:
- Yes, here it is
- No
- No, but if you give me a password I might let you
If I explicitly set up a Web server, explicitly place documents or resources on it, and explicitly give those files out when asked for, it's hard to simply call this "a failure to completely secure" let alone how it isn't exactly "an implicit grant of permission to access it". You are right on one thing though, it isn't an implicit grant; it's an explicit one.
Okay, vsync, so here's the URL I try on this site: http://www.metafilter.com/../../../etc/shadowI would say yes, honestly. Maybe they didn't mean to but they installed software with instructions to serve a response to that request. I think much of this is a consequence of people expecting more and more things from technology faster and faster without always thinking them through, and especially without wanting to spend the time or money to assure what they think they want ensured.
If it works because they're using an older version of Apache that hasn't patched all its directory traversal holes, is that an explicit grant of permission to retrieve the shadow password file?
Where you're talking about explicitly granting permission, these two sentences contradict each other. You can't explicitly do something that you don't intend to do.As someone who tends at times toward social awkwardness I can assure you that it is entirely possible, and becoming aware of and avoiding that behavior can make the world a better place.
It's worth pointing out that directory traversal holes[...irrelevant tangent elided]Not trying to be snarky here but I really don't see where that side-note was going. I agree with you that proper permissions on the server are essential, otherwise you merely have a brittle crunchy shell around gooey nougat. But whether directory traversals are a security problem per se or merely a risk seems entirely irrelevant to the question at hand.
But all the high-minded technologists here pointing the finger at AT&T are, essentially, blaming the victim.Oh please. This isn't rape. The rape of the lock, maybe. There's not even a victim here except AT&T's pride.
I found many almost current examples of PHP code allowing the same thingThe vast majority of PHP code is quite bad. The language makes it easy to write insecure code, and in fact hard to write secure code.
pwnguin mentioned Wordpress theme hacks. Not only do you need to trust the Apache guys, the PHP guys, and the Wordpress guys that they've written secure software, but the guy from whom you bought a theme as well.Yes you do. Pretending otherwise is merely a delusion, hurts the progress of the industry, and generates a false sense of security which leads to innocents trusting untrustworthy third parties with far more than they should, and getting hurt.
There's a lot of links in that chain, and saying "if it's available by URL, then it's your fault for not securing it properly" is creating an absurdly high standard of strict liability for security breaches, such that no one who hacked your server would ever be found guilty.Untrue. If you follow the easy-to-use protocols for granting/denying access which are already helpfully provided to you by the protocol, and someone uses a set of credentials that aren't theirs, that's very clear-cut. I'd even generously consider that triggering an exploit might be considered in the same way. But asking for something and being given it is by no means the same thing.
Given that the general use of URLs is that they're provided to be clicked on, if you're generating URLs, then you're already across a line as to normal usage.This is a blatant untruth.
« Older As if ticks weren't awful/awesome enough already, ... | The Ten Least Influential Peop... Newer »
This thread has been archived and is closed to new comments
posted by rebent at 10:11 PM on November 21, 2012 [5 favorites]