login

SQLrand: Preventing SQL Injection Attacks

Lecture notes in computer sciencePublished 1 January 2004Open access
Stephen Boyd, Angelos D. Keromytis
Citations432
View PDF

TL;DR

This work applies the concept of instruction-set randomization to SQL, creating instances of the language that are unpredictable to the attacker, and shows how to use this technique with the MySQL database using an intermediary proxy that translates the random SQL to its standard language.

Abstract

We present a practical protection mechanism against SQL injection attacks. Such attacks target databases that are accessible through a web front-end, and take advantage of flaws in the input validation logic of Web components such as CGI scripts. We apply the concept of instruction-set randomization to SQL, creating instances of the language that are unpredictable to the attacker. Queries injected by the attacker will be caught and terminated by the database parser. We show how to use this technique with the MySQL database using an intermediary proxy that translates the random SQL to its standard language. Our mechanism imposes negligible performance overhead to query processing and can be easily retrofitted to existing systems.

Keywords

Computer ScienceMaterials Science