I learned about the recent Barracuda hack, which sources say used an automated tool to locate some PHP file and test it for SQL injections.

At my current company, I feel that security is not the top priority and would like to test our websites for SQL injection vulnerabilities.

What tool would you use for such a purpose ? I found out about the python script sqlmap, but does it automatically find PHP files used on the server ?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

sqlmap doesn't automatically find the targets, but lets you use proxy logs as source for the target list:

-l LIST Parse targets from Burp or WebScarab proxy logs

Burp homepage: http://portswigger.net/burp/proxy.html

WebScarab Howto: http://travisaltman.com/webscarab-tutorial-part-1-learning-the-basics/

Of course, you could also log into the server, get a list of php files and modify it to be a valid URL list (if you're not doing complex rewrites on the webserver).

EDIT - Like so, assuming the server runs GNU/Linux:

#!/bin/bash
uri=http://webapp.yourdomain.com/app/
webroot=/var/www/yourapp/
find $webroot -iname '*php' | sed -e "s#$webroot#$uri#g"
link|improve this answer
Thanks, I'll try that. I'm worried about forgetting some small php file somewhere, called in Ajax... – Manu Apr 20 '11 at 12:54
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.