Re:Exploiting 'INSERT INTO' SQL Injections Ninja Style
by bandushrew on Saturday October 29, 2011 @03:43AM
(#3171455)
?? I dont understand that attitude.
I call myself a professional programmer, Ive understood the importance of sanitizing my inputs for some time, and I still thoroughly enjoyed reading the article.
What am I doing wrong?
Re:Exploiting 'INSERT INTO' SQL Injections Ninja Style
by code_duck on Saturday October 29, 2011 @01:04AM
(#3171173)
You find it strange that this is upvoted on 'Hacker News'? Hackers like tinkering and understanding why things work. I understand the principles behind these flaws and am not interested in the article because I'm hoping it will teach me how to avoid SQL injection. The article is actually not about that; instead it's illustrates how a skilled attacker may specific features of MySQL to exploit flawed code in a stealthy way.
As a sysadmin, this is interesting. I help out people who run WordPress sites, for instance. While I do my best, on a practical level not all of the code can be audited or rewritten.
As an SQL coder, this is interesting as he's cleverly crafting code in a language I've spent a fair amount of time playing with, and about which I would like to know more. It's interesting to see how someone might do SQL injection in the same way you might wonder how people pick padlocks, despite having no need to pick padlocks yourself.
Re:Exploiting 'INSERT INTO' SQL Injections Ninja Style
by gipsies on Saturday October 29, 2011 @06:50PM
(#3173056)
Exactly! We all know SQL injections can be a common mistake. And the example php code is just that: An example. My focus wasn't the php code, or how to avoid this exploit, most of us already know that. But like you said the point is the interesting usage of SQL in this particular situation.
Glad you liked the post =)
Re:Exploiting 'INSERT INTO' SQL Injections Ninja Style
by DanielRibeiro on Friday October 28, 2011 @10:37PM
(#3170904)
It is actually worse: it may show that not many people are aware of Owasp[1] top 10 list of security risks, since Injection is the first one.
Even if you could solve all the code injection problems, what about Cross site Scripting? The list goes on...
Re:Exploiting 'INSERT INTO' SQL Injections Ninja Style
by noduerme on Friday October 28, 2011 @09:28PM
(#3170778)
More concisely: Every time you let a user input something, you're giving them a chance to try to extract or destroy something in your database. But preventing it is REALLY simple. It's astonishing that this is still a problem in 2011, it goes to show what happens when everybody outsources and nobody gives a f*ck about quality. Grandpa was a foreman, he used to say if you pay workers more they hammer in an extra nail and the building won't fall down in the next earthquake. Same goes.
For non-technical people: If someone is building you a website, put a single backslash(and only that) in any text fields on your site. If it breaks when you submit, chances are good there is potential for SQL-injection. This is not a 100% check that will catch everything, heck it's not even a 70% check. But a poor programmer that doesn't know anything about SQL-injection will likely build code that fails this test.