28.10.2014 Views

SQL Injection Attacks and Defense - 2009

SQL Injection Attacks and Defense - 2009

SQL Injection Attacks and Defense - 2009

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Testing for <strong>SQL</strong> <strong>Injection</strong> • Chapter 2 81<br />

When you look at a Web application you can perceive where the potential vulnerabilities<br />

might be. This happens because you can underst<strong>and</strong> the application which is something that<br />

an automated tool is not able to do.<br />

A human can easily spot a part of a Web application which is not fully implemented,<br />

maybe just reading a “Beta release – we are still testing” banner in the page. It seems apparent<br />

that you may have better chances of finding interesting vulnerabilities there than testing<br />

mature code.<br />

Additionally, your experience tells you what part of the code might have been overlooked<br />

by the programmers. For example, there are scenarios where most of the input fields may be<br />

validated if they require direct entry from the user. However, those which are a result of<br />

another process, dynamically written to the page (where the user can manipulate them) <strong>and</strong><br />

then reused in the <strong>SQL</strong> statements, tend to be less validated as they are supposed to come<br />

from a trusted source.<br />

On the other h<strong>and</strong>, automated tools are systematic <strong>and</strong> thorough. They don’t underst<strong>and</strong><br />

the Web application logic, but they can test very quickly a lot of potential injection points<br />

which is something that a human cannot do thoroughly <strong>and</strong> consistently.<br />

Tools for Automatically Finding <strong>SQL</strong> <strong>Injection</strong><br />

In this section, I will show you some commercial <strong>and</strong> free tools designed to find <strong>SQL</strong><br />

injection vulnerabilities. Tools exclusively focused on exploitation will not be presented in<br />

this chapter.<br />

HP WebInspect<br />

WebInspect is a commercial tool by Hewlett-Packard. Although you can use it as an <strong>SQL</strong><br />

injection discovery tool, the real purpose of this tool is to conduct a full assessment of the<br />

security of a Web site. This tool requires no technical knowledge <strong>and</strong> runs a full scan, testing<br />

for misconfigurations <strong>and</strong> vulnerabilities at the application server <strong>and</strong> Web application layers.<br />

Figure 2.17 shows the tool in action.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!