Solved

SQL Admins best practices against SQL injection

Posted on 2011-09-07
4
266 Views
Last Modified: 2012-05-12
QUESTION 1: What can my SQL admins do to prevent and Identify SQL Injection vulnerabilities?  
0
Comment
Question by:DEFclub
4 Comments
 
LVL 8

Accepted Solution

by:
Toxacon earned 167 total points
ID: 36497465
There isn't much you can do at the T-SQL level because the injections are legal SQL queries and therefore it is very difficult to stop them at the SQL server itself.
0
 
LVL 6

Assisted Solution

by:markterry
markterry earned 166 total points
ID: 36497511
Several things, basically you need to clean the input. Use procedures to both clean input, and prevent unwanted data types.

If you have a query like the following, where you append the value of an input box into the query:
Select Column1, column2 from table where column like 'value from input box'

the injector could use this input:
' UNION ALL Select column_Name, table_name from information_Schema.columns

That would append a list of columns and table names to the results, and they could use that info to write further queries.

Using a stored procedure, that would come in all as text, and the query would fail.

You can also strip unwanted characters.

see below for more info.

SQL Injection Overview'
MS SQL Injection Best Practices with ASP.NET
0
 
LVL 8

Assisted Solution

by:venk_r
venk_r earned 167 total points
ID: 36497554
We can atleast follow certain guidelines to prevent SQL Injection.
Please take a look athis article.
http://www.marcofolio.net/features/how_you_can_prevent_an_sql_injection.html

Also some recomendations from microsoft
http://technet.microsoft.com/en-us/security/advisory/954462
0
 

Author Closing Comment

by:DEFclub
ID: 36499637
thxs
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question