Solved

How to protect against SQL injections

Posted on 2011-09-20
5
213 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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