This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Category:OWASP SQLiX Project

From OWASP
Jump to: navigation, search
OWASP Inactive Banner.jpg

NOTE:

The project is currently under the process of porting from Perl to Python. The next version will be released soon!
-- AnirudhAnand, 16 March 2014

Introduction

SQLiX is a SQL Injection scanner coded in Perl. It is able to crawl, detect SQL injection vectors, identify the back-end database, and grab function call/UDF results (even execute system commands for MS-SQL). The concepts in use are different than the one used in other SQL injection scanners. SQLiX is able to find normal and blind SQL injection vectors and doesn't need to reverse engineer the original SQL request (using only function calls).

If you are a developer interested in remediating or avoiding the kinds of SQL injection vulnerabilities this tool can find, check out the OWASP SQL Injection Prevention Cheat Sheet.

Description

SQLiX is a SQL Injection scanner which attempts to fill the gap between what commercial software available on the market can do and what can really be done to detect and identify SQL injection.

Current injection methods used by commercial web assessment software are based on error generation or statement injections.

error generation:

The error generation method is quite simple and is based on meta characters like single quotes or double quotes. By injecting these characters in the original SQL request, you generate a syntax error which could result in an SQL error message displayed in the HTTP reply. The main issue with this technique is the fact that it's only based on pattern matching. There is no way to handle multiple languages or complex behaviors when the error message is filtered by the server-side scripts.

statement injection:

The second method used is statement injection. Let's look at an example:

The target URL

(0) is http://target.example.com/news.php?id=25.

The scanner will try to compare the HTML content of the original request with the HTML content of

(1) http://target.example.com/news.php?id=25%20or%201=1

(2) http://target.example.com/news.php?id=25%20or%201=0

If the request (1) provides the same result as request (0) and request (2) doesn't, the scanner will conclude that SQL injection is possible. This method works fine, but is very limited by the syntax of the original request. If the original request contains parentheses, store procedures or function calls, this method will rarely work. Worse, if the variable is used by multiple SQL requests, all with different syntaxes, there is no automatic way to make them all work simultaneously.

Frequently you will see more advanced scanners like SQLBrute from www.justinclarke.com trying to reverse engineer the original SQL syntax by injecting multiple requests with different sets of parentheses or comas. This method is a little more time consuming but does provide better results (for free), especially when error messages are not displayed.

Another global issue concerning SQL injection is the fact that pen testers frequently conclude that a given SQL injection vulnerability can't be exploited. By concluding this incorrect statement they are inviting their customers to not patch the vulnerability.


Licensing

OWASP SQLiX is free to use. It is licensed under the http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-ShareAlike 3.0 license], so you can copy, distribute and transmit the work, and you can adapt it, and use it commercially, but all provided that you attribute the work and if you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.


What is SQLiX?

OWASP SQLiX provides:

  • SQLiX uses multiple techniques to determine if the current server-side script is vulnerable to SQL Injection
    • conditional errors injection
    • blind injection based on integers, strings or statements
    • MS-SQL verbose error messages ("taggy" method)
  • SQLiX using UDF (User defined functions) or function calls thus no need to reverse engineer the original SQL syntax
  • SQLix is able to identify the database version and gather sensitive information for the following SQL servers: MS-Access, MS-SQL, MySQL, Oracle and PostgreSQL.
  • The comparison module of SQLiX is able to deal with complex HTML contents even when they include dynamic ads
  • SQLiX contains an exploit module to demonstrate how a hacker could exploit the found SQL injection to gather sensitive information


Presentation

Link to presentation


Project Leader

Anirudh


Related Projects

Quick Download

OWASP SQLiX v1.0 is available for download here or here.


News and Events

  • [20 Nov 2013] News 2
  • [30 Sep 2013] News 1


In Print

Classifications

Owasp-incubator-trans-85.png Owasp-builders-small.png
Owasp-defenders-small.png
Cc-button-y-sa-small.png
Project Type Files CODE.jpg

Subcategories

This category has only the following subcategory.

O