Solved

SQL Admins best practices against SQL injection

Posted on 2011-09-07
4
261 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Read about achieving the basic levels of HRIS security in the workplace.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now