Solved

How to protect against SQL injections

Posted on 2011-09-20
5
210 Views
Last Modified: 2012-05-12
We have just suffered a SQL injection into our sql 2008 database running our .net websites.

The intruders planted a script in all our content item that would have displayed a page of links offset so as not to be visible to users, but picked up by search engines.

I am shocked by how they have managed to retrieve the names of tables and fields.

How can we determine where they got in, and how can we protect ourselves from such threats in future?
0
Comment
Question by:nhmedia
5 Comments
 
LVL 10

Accepted Solution

by:
gaurav05 earned 125 total points
ID: 36571769
Hi,

check this one,

http://msdn.microsoft.com/en-us/library/ff648339.aspx


let us know for  more information.
0
 
LVL 9

Assisted Solution

by:mimran18
mimran18 earned 125 total points
ID: 36571938
0
 
LVL 10

Assisted Solution

by:sqlservr
sqlservr earned 125 total points
ID: 36572469
this url helps you with sample and good explanation
http://www.unixwiz.net/techtips/sql-injection.html
0
 
LVL 1

Assisted Solution

by:millsap_singer
millsap_singer earned 125 total points
ID: 36581893
Use parameterized queries for your insert/update statements.  
0
 

Author Closing Comment

by:nhmedia
ID: 36949414
In the end we came up with our own solution based on an http handler to prevent undesirable requests being processed.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 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

12 Experts available now in Live!

Get 1:1 Help Now