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.

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

Figure 2.1 Proxy Intercepting Requests to the Web Server<br />

Figure 2.1 shows how you can bypass any client-side restriction by using a proxy server.<br />

The proxy intercepts the request to the server <strong>and</strong> permits you to modify it at will. To do<br />

this you need only two things:<br />

■■<br />

■■<br />

Installation of a proxy server on your computer<br />

Configuration of your browser to use your proxy server<br />

You can choose from a number of alternatives when installing a proxy for <strong>SQL</strong> injection<br />

attacks. The most notable ones are Paros Proxy, WebScarab, <strong>and</strong> Burp Suite, all of which can<br />

intercept traffic <strong>and</strong> allow you to modify the data sent to the server. Although they have<br />

some differences, deciding which one to use usually depends on your personal choice.<br />

After installing <strong>and</strong> running the software, you need to check on what port your proxy is<br />

listening. Set up your Web browser to use the proxy <strong>and</strong> you are ready to go. Depending on<br />

the Web browser of your choice, the settings are situated in a different menu. For instance,<br />

in Mozilla Firefox, click Edit | Preferences | Advanced | Network | Settings.<br />

Firefox extensions such as FoxyProxy (https://addons.mozilla.org/en-US/firefox/<br />

addon/2464) allow you to switch among predefined proxy settings, which can be very useful<br />

<strong>and</strong> can save you some time.<br />

In Microsoft Internet Explorer, you can access the proxy settings in Tools | Internet<br />

Options | Connections | Lan Settings | Proxy Server.<br />

Once you have your proxy software running <strong>and</strong> your browser pointing to it, you can<br />

start testing the target Web site <strong>and</strong> manipulate the parameters sent to the remote application,<br />

as shown in Figure 2.2.

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

Saved successfully!

Ooh no, something went wrong!