[Full-disclosure] Antitoxin for "SQL Injection" (?)

Devdas Bhagat devdas at dvb.homelinux.org
Mon Jan 2 15:52:13 GMT 2006


On 02/01/06 13:45 +0100, Sen, Adem wrote:
> Hi @all!
> 
> I have invested some time to think about detecting & preventing SQL
> Injection attacks to web-applications.
> Like many of us know, there are several methods to filter dangerous
> input in web-applications, e.g. searching for specific RegEx Pattern and
> so on.
> 
> I have built following (primitive) RegEx Pattern to filter input to my
> private used web-apps:
> 
> RegEx Start
> /SELECT|INSERT|UPDATE|ALTER|CREATE|DELETE|DROP|FROM|WHERE|OR|AND|LIKE|EX
> EC|SP_|XP_|SQL|ROWSET|OPEN|BEGIN|END|DECLARE|;|--|-|'|\(|\)|=|>|<|@/i";
> /RegEx End
> 
Ugh! Why do you not use stored procedures and bind parameters, which is
the right way to do it?

Devdas Bhagat



Full-Disclosure is hosted and sponsored by Secunia.