Using parse tree validation to prevent SQL injection attacks
Gregory Buehrer, Bruce W. Weide, Paolo A. G. Sivilotti · 2005
An SQL injection attack targets interactive web applications that employ database services. Such applications accept user input, such as form fields, and then include this input in database requests, typically SQL statements. In SQL injection, the attacker provides user input that results in a different database request than was intended by the application programmer. That is, the interpretation of the user input as part of a larger SQL statement, results in an SQL statement of a different form than originally intended. We describe a technique to prevent this kind of manipulation and hence eliminate SQL injection vulnerabilities. The technique is based on comparing, at run time, the parse tree of the SQL statement before inclusion of user input with that resulting after inclusion of input. Our solution is efficient, adding about 3 ms overhead to database query costs. In addition, it is easily adopted by application programmers, having the same syntactic structure as current popular record set retrieval methods. For empirical analysis, we provide a case study of our solution in J2EE. We implement our solution in a simple static Java class, and show its effectiveness and scalability.
Cited by 388 works. doi:10.1145/1108473.1108496
Authors
References
- Proceedings of the 11th USENIX Security Symposium
- StackGuard: Automatic Adaptive Detection and Prevention of Buffer-Overflow Attacks
- Securing web application code by static analysis and runtime protection
- Countering code-injection attacks with instruction-set randomization
- Automatically Hardening Web Applications Using Precise Tainting
- Web application security assessment by fault injection and behavior monitoring
- Advanced SQL Injection In SQL Server Applications
- SQLrand: Preventing SQL Injection Attacks
- PointGuard TM : Protecting pointers from buffer overflow vulnerabilities
- Precise analysis of string expressions