WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-06-2008, 04:58 PM
incrediblehelp's Avatar
incrediblehelp incrediblehelp is offline
Moderator
WebProWorld Moderator
 

Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,131
incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4
Default SQL injection Attack

Recently one of my client websites was attacked using SQL injection. What is the best way to avoid such attacks going forward? Their database guy is handling this. I am just curious on my side.
Reply With Quote
  #2 (permalink)  
Old 05-06-2008, 05:34 PM
Dubbya's Avatar
Dubbya Dubbya is offline
WebProWorld Veteran
 

Join Date: Nov 2006
Location: Steinbach, Manitoba, Canada
Posts: 987
Dubbya RepRank 3Dubbya RepRank 3
Default Re: SQL injection Attack

We sanitize data that's to be saved to the DB by disallowing or stripping illegal characters that only a hacker might use to inject code through string manipulation or form submissions.

Regular expressions (regEX) are perfect for this job. We use an include file with a VB Script function and call it prior to saving data. It's server side, so there's little chance of it failing but it's a little slow and frustrating for the user if you're bouncing data back and forth to the browser.

Of course, we generally have a JavaScript validation routine in place anyway, so that helps.

Additionally, your client might want to use another script, or get one written, that'll check the data that's already stored in the DB for signs of SQL injection or cross site scripting attacks.

Here's a great article that describes some of the data strings to look out for:
Detection of SQL Injection and Cross-site Scripting Attacks
__________________
Printer ink, inkjet & toner cartridges in Canada
"Price-wise printing supplies"
inkjetOasis.ca
Reply With Quote
  #3 (permalink)  
Old 05-06-2008, 05:44 PM
incrediblehelp's Avatar
incrediblehelp incrediblehelp is offline
Moderator
WebProWorld Moderator
 

Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,131
incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4
Default Re: SQL injection Attack

Thanks for the feedback Dubbya. Always helpful.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript Injection Attack Infects 'Hundreds of Thousands' of Websites Tech Manager Internet Security Discussion Forum 0 04-24-2008 11:05 AM
Preventing variable injection in your PHP scripts Tech Manager Internet Security Discussion Forum 0 04-08-2008 01:31 PM
PHP Email Injection mikesmith76 Web Programming Discussion Forum 18 02-14-2006 08:45 PM
http://injection-molds.blogspot.com solinc Submit Your Site For Review 0 10-14-2005 08:26 PM
SQL Injection Attacks by Example WPW_Feedbot IT Discussion Forum 0 01-06-2005 02:31 AM


Search Engine Friendly URLs by vBSEO 3.0.0