Re:Exploiting 'INSERT INTO' SQL Injections Ninja Style
by InclinedPlane on Friday October 28, 2011 @03:57PM
(#3169837)
This is sort of interesting, but I'm not sure how it applies to non-black hats. If you are responsible for this code just switch it all to mysqli and be done with it.
[ Parent
| on HN ]
Re:Exploiting 'INSERT INTO' SQL Injections Ninja Style
by InclinedPlane on Friday October 28, 2011 @06:08PM
(#3170306)
P.S. It's 2011, if you are concatenating strings IN ANY LANGUAGE to build up SQL statements and you aren't even bothering to sanitize input then:
1: You cannot call yourself a professional web developer. You can't even call yourself a competent amateur programmer, you are just playing with toys you clearly do not understand.
2: You deserve absolutely no pity when (not if) you get hacked.
If this sounds harsh, it's meant to, this is an incredibly well known problem (and has been for years) and it's incredibly easy to fix.
Re:Exploiting 'INSERT INTO' SQL Injections Ninja Style
by bandushrew on Saturday October 29, 2011 @03:45AM
(#3171456)
Why do you believe only black hats should be able to understand various sql injections tricks like this?
Re:Exploiting 'INSERT INTO' SQL Injections Ninja Style
by InclinedPlane on Saturday October 29, 2011 @05:29PM
(#3172861)
These techniques seem to only be useful against absolutely brain dead coding practices. As I said, if you're responsible for this code it's not useful to understand every aspect of this vulnerability, you just switch to a different implementation (preferably parameter binding using mysqli). This analysis is like learning techniques on how to stealthily steal a bike that is "locked" up with nothing more than twine. That's not really useful except in an "all knowledge is useful" sense.
Re:Exploiting 'INSERT INTO' SQL Injections Ninja Style
by bandushrew on Saturday October 29, 2011 @06:59PM
(#3173071)
Interesting, I really dont agree. I have two roles that I regularly play as a developer, one is 'creating a solution from scratch', and in that situation - as you have said, I dont really need to be aware of these kinds of possibilities, just because I can avoid the problem entirely.
Unfortunately the other role I frequently play is 'performing work on something someone else has built', and in that case I rarely have the ability to throw out everything that is there and start from scratch - which means I have to have an understanding of this kind of thing and know what kinds of changes will provide the greatest 'hit' in terms of security, while balancing those changes against the possibility of breaking existing work.
Besides, I find knowledge useful in a general sense.