Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Classic ASP SQL Injection

I recently inherited a classic asp website with a ton of inline SQL insert statements that are vulnerable to SQL injection attacks.

These insert statements are executed via the ADO command object.

Will setting the ADO Command Object's Prepared property to true ensure that the query is parameterized before execution, thus mitigating the risk of SQL injection?

like image 998
klork Avatar asked Oct 06 '09 07:10

klork


2 Answers

This Link should prove useful.

Classic ASP SQL Injection Protection

like image 149
kevchadders Avatar answered Nov 07 '22 11:11

kevchadders


No, if you build a SQL string with values that you get directly from "outside", then a "prepared statement" will not help you.

a

sSQL = "SELECT * from mytable where mycolumn = '" + querystring("value") + "'"

is still asking for trouble. The only way to solve this is by using parameters in your query.

like image 44
Hans Kesting Avatar answered Nov 07 '22 12:11

Hans Kesting