Follow us on Twitter!Visit  us on YouTube!Join us on Facebook!
managed hosting1 (866) 289-5091

SQL Injection attacks on the rise

by Darish on July 18, 2008

This blog entry will look at SQL injection attacks and what you can do as website owner/developer to mitigate this type of attack.

What is a SQL injection Attack?

Too often developers/system administrators focus only on Operating System and Web Server application as attack vectors and ignore the code that a website uses. With more and more sites being dynamic and database driven, SQL injection attacks are on the rise. In a successful SQL injection attack, an attacker can compromise the data stored in the database, deface a website or execute remote code.

A SQL injection attack takes advantage of poor data sanitation during user input. When user data input is not validated for syntax, SQL code can be injected to a query and thereby compromising the system/website. This is illustrated on Microsoft’s website.

In the example, when user input is not sanitized during a logon page, a malicious user can input SQL commands such as “‘ Or 1=1 –”. As described on the MSDN website, by injecting the above code a malicious user can bypass the authentication mechanism.

How to mitigate SQL Injection attacks

SQL injection attacks can be mitigated by using better coding techniques that utilize input validation controls. In the above example, a malicious user was able to manipulate the input parameter by using a single quote. To mitigate this type of attack you can escape the single quotes by using a replace function to change ‘ to “. Additionally, limit the permissions granted to the database user the web application is running under.

Customers that use third party content management systems should endeavour to upgrade to the latest build and be on the lookout for any security hotfixes/updates from the vendor.
More information:

Thanks,

Darish R.
Operations Manager
SoftCom Technology Consulting Inc.

Related posts:

  1. Microsoft SQL 2008 Beta now available!
  2. Microsoft SQL 2008 Beta
  3. myhosting.com offers a great range of Microsoft SQL Hosting Plans including a Free Starter Plan!
  4. How to activate your Microsoft® SQL Server 2008 Database using your myhosting.com Account
  5. Caution: Domain Name Phishing Scams on the Rise

{ 5 comments… read them below or add one }

Twit July 21, 2008 at 10:42 AM

Very very informative. Keep up the good work…

Reply

WrigleyF December 29, 2010 at 11:41 AM

I always ignore the code, and I am probably vulnerable to these kinds of attacks. Will try to do better in the future!

Reply

Rusher January 20, 2011 at 9:39 AM

This is definitely frightening. I didn’t know my data was so at risk because of SQL attacks.

Reply

OfftheWall September 14, 2011 at 11:25 AM

Never knew someone could bypass the authorization mechanism so easily. Frightening is the word!

Reply

Randy5 December 28, 2011 at 10:15 AM

Thanks for the tips of how to mitigate an SQL injection attack on Microsoft. It amazes me what a difference there is between ‘ and “ when you’re coding.

Reply

Leave a Comment

Previous post:

Next post:

Website Hosting and Domain Hosting Email Hosting Services, Pick Up Your Email
© 2010 SoftCom Inc. All rights reserved.