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.

266 Chapter 5 • Blind <strong>SQL</strong> <strong>Injection</strong> Exploitation<br />

Squeeza’s DNS channel is h<strong>and</strong>led entirely in T-<strong>SQL</strong>, meaning that there is no<br />

requirement for privileged database access (where privileged access is available, it is used as<br />

this speeds up extraction). Obviously, when data is generated via comm<strong>and</strong> execution,<br />

privileged access is required; likewise for file copying. Squeeza also makes every attempt to<br />

be reliable in the face of unpredictable UDP DNS packets, <strong>and</strong> has a transport layer that<br />

ensures that all data arrives. It can also h<strong>and</strong>le very long fields (up to 8,000 bytes) <strong>and</strong> can<br />

extract binary data.<br />

Settings are stored in a configuration file for persistence, with the minimum details<br />

required being the Web server (host), a path to the vulnerable page (URL), any GET or<br />

POST parameters (querystring), <strong>and</strong> whether the request is a GET or a POST (method).<br />

Inside the querystring, the marker X_X_X_X_X_X is used to locate where injection strings<br />

are placed. Figure 5.16 is a screenshot showing squeeza returning a directory listing via DNS.<br />

Figure 5.16 Squeeza Returning a Directory Listing

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

Saved successfully!

Ooh no, something went wrong!