Saturday, April 9, 2011

Problem: Minimizing SQL injection attacks

Impact: SQL injections can expose private data and modify information stored in database.

Solution: SQL injection attacks can be the most harmful common server attack. Every skilled developer can make mistakes that lead to SQL injection vulnerabilities. To minimize SQL injections you can do the following things.
  1. Use Stored Procedures.
  2. Use Parameterized SQL Commands.
  3. Sanatize the user input to replace characters in the input with special characters.
Example of sanitization:

string output = input.Replace("*", "star");

No comments:

Post a Comment