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.

References • Chapter 10 453<br />

Table 10.31 Extracting Ingres Database Configuration<br />

Data<br />

Current database<br />

List tables<br />

List columns<br />

Query<br />

SELECT dbmsinfo('database');<br />

SELECT relid, relowner, relloc FROM iirelation WHERE<br />

relowner != '$ingres';<br />

SELECT column_name, column_datatype, table_name,<br />

table_owner FROM iicolumns;<br />

Blind <strong>SQL</strong> <strong>Injection</strong> Functions: Ingres<br />

Table 10.32 lists functions that are useful when performing blind <strong>SQL</strong> injection attacks.<br />

Table 10.32 Blind <strong>SQL</strong> <strong>Injection</strong> Functions<br />

Data<br />

String length<br />

Query<br />

LENGTH()<br />

Extract substring from a given string SELECT substr(string, offset, length); --<br />

String (‘ABC’) representation with no<br />

single quotes<br />

SELECT chr(65)||chr(66)||chr(67)<br />

Microsoft Access<br />

Microsoft Access databases do not scale well with enterprise applications, <strong>and</strong> therefore<br />

are usually encountered only when the application has minimal database requirements.<br />

Brett Moore of insomniasec.com has published an excellent paper on <strong>SQL</strong> injection with<br />

Microsoft Access which you can find here:<br />

■■<br />

www.insomniasec.com/publications/Access-Through-Access.pdf<br />

Resources<br />

This section provides a list of links to further reading materials <strong>and</strong> tools to assist you in<br />

discovering, exploiting, <strong>and</strong> preventing <strong>SQL</strong> injection vulnerabilities.<br />

<strong>SQL</strong> <strong>Injection</strong> White Papers<br />

■■<br />

“Advanced <strong>SQL</strong> <strong>Injection</strong>” by Victor Chapela:<br />

www.owasp.org/index.php/Image:Advanced_<strong>SQL</strong>_<strong>Injection</strong>.ppt

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

Saved successfully!

Ooh no, something went wrong!