Groups | Blog | Home
all groups > asp.net > february 2006 >

asp.net : Suggestions to prevent VICIOUS data input?


VB Programmer
2/1/2006 10:24:32 PM
Using ASP.NET 2.0/SQL Express....

In places where I allow data input by users (sign up forms, comments,
etc...) do I need to manually safeguard my site against vicious attacks (SQL
injection, etc...)? Should I just run all input thru a filter that removes
all special characters, like asterick, semicolon, etc...? Or, is this
handled internally so I don't have to worry about it? Any suggestions?

Thanks.

Damien
2/1/2006 11:58:27 PM

[quoted text, click to view]

What he said ^

Also, when using regular expressions, look for GOOD input, and reject
anything that doesn't match. Doing it the other way around, you're
bound to miss something...

Damien
john smith
2/2/2006 1:49:53 AM
[quoted text, click to view]

It depends... You can validate your form entries with regular
expressions (client side AND server side) and the like. Other than that,
the main thing is using parameterized queries - *NOT* string
concatenation to make your SQL queries (that's really asking for
trouble). That would be a good start :) ASP.NET also does protect you to
Peter Blum
2/2/2006 12:01:32 PM
Hi, as part of your research, you should investigate a product I wrote that
handles SQL Injection and Cross Site Scripting attacks. It is VAM: Visual
Input Security. (http://www.peterblum.com/vise/home.aspx)

--- Peter Blum
www.PeterBlum.com
Email: PLBlum@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

[quoted text, click to view]

AddThis Social Bookmark Button