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.

UTL_SMTP.HELO(v_connection,'mailhost.victim.com');<br />

UTL_SMTP.MAIL(v_connection,'app@victim.com');<br />

UTL_SMTP.RCPT(v_connection,'admin@victim.com');<br />

UTL_SMTP.DATA(v_connection,'WARNING! SELECT PERFORMED ON HONEYPOT');<br />

UTL_SMTP.QUIT(v_connection);<br />

return '1=1'; -- always show the entire table<br />

end;<br />

/<br />

-- assign the policy function to the honeypot table TBLUSERS<br />

exec dbms_rls.add_policy (<br />

'APP_USER',<br />

'TBLUSERS',<br />

'GET_CUST_ID',<br />

'SECUSER',<br />

'',<br />

'SELECT,INSERT,UPDATE,DELETE');<br />

Additional Secure Development Resources<br />

Code-Level <strong>Defense</strong>s • Chapter 8 371<br />

A number of resources exist to promote secure applications by providing tools, resources,<br />

training, <strong>and</strong> knowledge to the developers writing those applications. The following is a list<br />

of the resources the authors of this book feel are the most useful:<br />

■■<br />

■■<br />

■■<br />

The Open Web Application Security Project (OWASP; www.owasp.org) is an open<br />

community promoting Web application security. OWASP has a number of projects<br />

that provide resources, guides, <strong>and</strong> tools to assist developers in underst<strong>and</strong>ing,<br />

finding, <strong>and</strong> addressing security issues in their code. Notable projects are the<br />

Enterprise Security API (ESAPI), which provides a collection of API methods for<br />

implementing security requirements such as input validation, <strong>and</strong> the OWASP<br />

Development Guide, which provides a comprehensive guide for secure<br />

development.<br />

The <strong>2009</strong> CWE/SANS Top 25 Most Dangerous Programming Errors ( http://cwe.<br />

mitre.org/top25/index.html) is a collaboration among MITRE, the SANS Institute,<br />

<strong>and</strong> a number of top security experts. It is intended to serve as an educational <strong>and</strong><br />

awareness tool for developers, <strong>and</strong> provides a lot of detail on the top 25<br />

programming errors as defined by the project—one of which is <strong>SQL</strong> injection.<br />

The SANS Software Security Institute ( www.sans-ssi.org) provides training <strong>and</strong><br />

certification in secure development, as well as a large amount of reference<br />

information <strong>and</strong> research contributed by SANS certified individuals.

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

Saved successfully!

Ooh no, something went wrong!