Live data from Hacker News

14 Years of SQL Injection and still the most dangerous vulnerability

mavitunasecurity.com

1–10 of 58 posts

Re: 14 Years of SQL Injection and still the most dangerous vulnerability

#2
TL;DR: "Because you aren't using our snazzy new product; try it today!"

Also:

    This is primarily because of the most obvious problem:
    We are still using relational SQL databases.
    Were we to use NoSQL database systems such as MongoDB
    or CouchDB, none of these attacks would ever happen
Yeah, and motorbikes are safer than cars because the third and fourth wheels never fall off...

Re: 14 Years of SQL Injection and still the most dangerous vulnerability

#3
When combining software components, you have to gateway between them -- this is done by escaping inputs and validating outputs. It's often non-trivial to grok where the junctures between components are, and how to properly connect them. This requires thought, experience, and diligence.

Why it's so common is that you can easily connect components incorrectly, still have it "work" enough to do a demo, and, there is lot of pressure to put things that appear to work into production without auditing them.

Addendum: Shish2k observes this article claims NoSQL databases would somehow solve the problem, rather than seeing NoSQL as just a different kind of component with it's own escaping/validation needs. Classic -- someone writing on this very topic is blinded to the phenomenon he discusses; the article itself demonstrates why we have SQL injections.

Re: 14 Years of SQL Injection and still the most dangerous vulnerability

#4
post #2

TL;DR: "Because you aren't using our snazzy new product; try it today!" Also: This is primarily because of the most obvious problem: We are still using relational SQL databases. Were we to use NoSQL database systems such as MongoDB or CouchDB, none of these attacks would ever happen Yeah, and motorbikes are safer than cars because the third and fourth wheels never fall off...

+ even this is not entirely true. In PHP you can inject into Mongo using nested arrays.

:( We are not safe

Re: 14 Years of SQL Injection and still the most dangerous vulnerability

#5
Because there are developers and project managers out there who still don't understand it very well, or (dare I say) don't care enough to understand it. There will always be people who will just get the work done to a level that will reasonably satisfy their bosses, so that they can take their paycheck, and go home.

This is not software engineering alone, by the way.

Re: 14 Years of SQL Injection and still the most dangerous vulnerability

#6
post #2

TL;DR: "Because you aren't using our snazzy new product; try it today!" Also: This is primarily because of the most obvious problem: We are still using relational SQL databases. Were we to use NoSQL database systems such as MongoDB or CouchDB, none of these attacks would ever happen Yeah, and motorbikes are safer than cars because the third and fourth wheels never fall off...

It doesn't even make sense. The problem is in the client side drivers/apis. That has absolutely nothing todo with the underlying storage system.

Re: 14 Years of SQL Injection and still the most dangerous vulnerability

#7
Unrealistic deadlines and sales reps promising features to clients is a large part of the problem. Get the changes in, test the usability, and ship it. Get it out to the client pronto. We have an earnings report due by X date and this will help the bottom line.

It's not that devs and DBAs don't care, it's that in many cases (not all) they aren't given the time to carefully test the system to see how it might be abused.

And also, many companies view security testing as an afterthought or an audit requirement. If they do not have to do it (time is money) they won't. And when they are forced to do it, they rush through it.

In some ways this is a philosophical fight between a group that wants to ship software and make a profit and a group that wants to design and test systems to make sure they are correct. Suits vs technologists.

Re: 14 Years of SQL Injection and still the most dangerous vulnerability

#8
post #2

TL;DR: "Because you aren't using our snazzy new product; try it today!" Also: This is primarily because of the most obvious problem: We are still using relational SQL databases. Were we to use NoSQL database systems such as MongoDB or CouchDB, none of these attacks would ever happen Yeah, and motorbikes are safer than cars because the third and fourth wheels never fall off...

Especially since MongoDB is not too hard to inject, in particular its aggregation framework.
Post reply on HN