|
|
|
Keeper of the Duck
Group: Moderators
Last Login: 2 days ago @ 1:55 PM
Points: 6,584,
Visits: 1,789
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 9:35 AM
Points: 2,749,
Visits: 1,407
|
|
Not only are SQL Injection attacks still going on but also cross site scripting, response splitting and other nasties.
Let us suppose that your code is SQL Injection attack proof. Some enters Dave';WAITFOR('00:00:15'); into a form field and that is precisely what gets entered into the DB. The WAITFOR doesn't get treated as a SQL Statement but now you have a data quality problem.
OK, coding to look for strange syntax is quite a job but I've seen fields that, in theory, are populated from web form drop down boxes that have had this rubbish in them!!!
Cross site scripting is when enter JavaScript tags into a DB field and when the contents of these fields is rendered on the web page the JavaScript fires.
Then you have HTTP Response Splitting where some bright spark has worked out that injecting carriage returns and line feeds into the HTTP response fools the web server into to accepting more than it should from any single request.
At one time is was easy to spot illegitimate mechanical activity on a web stie by the HTTP_USER_AGENT. Now even the most basic mechanical attack will know to spoof a valid HTTP_USER_AGENT and probably rotate IP addresses to avoid rate alerts (too much traffic coming from one customer for it to be genuine).
From the malicious attack perspective the game has moved on. SQL Injection attacks are the middle aged man with the high BMI in the Sunday pub football league compared to what else is out there in the European super league.
If SQL Injection attacks are still suceeding on your web site then you're way behind the curve.
LinkedIn Profile
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Yesterday @ 3:03 PM
Points: 65,
Visits: 586
|
|
Once upon a time, we had some old code that did not account for SQL Injection attacks. And then it happend. People could not understand why the titles on our external web pages were changing or being deleted. These pages were database driven through the use of an administative front-end for the users. I put a few insert and update triggers on a few tables, and what do you know, a couple days later we find out someone is passing SQL statements into a field that for some reason was aimed at changing the titles on our web pages. These pages were changed to use stored procedures. Now, if only everyone was on board for doing this on our Intranet as well....
|
|
|
|
|
Keeper of the Duck
Group: Moderators
Last Login: 2 days ago @ 1:55 PM
Points: 6,584,
Visits: 1,789
|
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Friday, April 26, 2013 10:09 AM
Points: 89,
Visits: 384
|
|
| Just a thought but what about aliasing the columns returned by the stored procedure to give another level of protection? The real column names are hidden and the naming convention can't be extrapolated.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 12:39 AM
Points: 3,229,
Visits: 64,293
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 9:35 AM
Points: 2,749,
Visits: 1,407
|
|
K. Brian Kelley (2/18/2013) David, I would agree with you that SQL injection attacks should be old news. The problem is they aren't.
Boy do I know it! What is telling is that the majority of the SQL Dialect is for SQL Server and MySQL.
LinkedIn Profile
|
|
|
|
|
Keeper of the Duck
Group: Moderators
Last Login: 2 days ago @ 1:55 PM
Points: 6,584,
Visits: 1,789
|
|
Marie, you could certainly do that, but if the app uses the stored procedure, then the attacker can use it to do what the stored procedure is capable of. The attacker still can't get to the table in question, so whether or not the parameters equal the columns, there's not really a risk. There is probably greater risk of developers and DBAs getting things confused because the names are different.
K. Brian Kelley, CISA, MCSE, Security+, MVP - SQL Server Regular Columnist (Security), SQLServerCentral.com Author of Introduction to SQL Server: Basic Skills for Any SQL Server User | Professional Development blog | Technical Blog | LinkedIn | Twitter
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 12:11 PM
Points: 96,
Visits: 268
|
|
| SQL Injection attacks are very present and as the article mentions they are still around because developers either by lack of knowledge or experience are still programming to allow these loops. What drives me crazy is that some companies don't believe it's worth the effort the extra time and training required to prevent these type of attacks. I used to be a developer and in my case was lack of knowledge and experience in addtion to lack of training and our company suffered a sql attack. I was very upset and emberrased that this happened to us. Great article.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: 2 days ago @ 9:15 AM
Points: 316,
Visits: 1,185
|
|
This made me laugh
|
|
|
|