This project is not covered by Drupal’s security advisory policy.

Security Testing is a tool for locating XSS, CSRF and SQL Injection vulnerabilities in Drupal contributed modules. This tool will scan the source code of contributed module(s) for vulnerabilities and display warnings. It also tries to exploit XSS vulnerability using SimpleTest module by injecting random data into database fields and checking if any injected data will be displayed without being sanitized first. It tries to exploit CSRF using SimpleTest by visiting each link of the contributed module and checking if any insert, update or delete query is executed.

This is a Google Summer of Code 2012 Project.
View Security Testing Screencast

Installation and Usage
This module should not be run on a production site.

1). Enable the module /admin/modules.

2). For scanning the source code of the contributed module, visit the configuration page admin/config/development/security_testing.

3) Enter the location of the directory containing the source code of the contributed module to be scanned in the text box and click on the "Start scanning" button.

You can also scan the module using Drush command :
drush sec-test name_of_the_directory_containing_source_code_of_module

4). Warnings will be shown to user. All the log files are stored inside the folder "security_testing" in the Drupal default files directory. The path followed and the different function calls encountered by the scanner will be stored in the log file "testing.txt". The name of the scanned module will be stored in the log file "module_name.txt". This "module_name.txt" file will be used for getting the name of the module during simple test run.

5). Go to "admin/config/development/Testing", Select the security_testing from the module name list and then click on "Run tests" button. Simpletest security_testing test run will take the name of the module from "module_name.txt" and tries to exploit XSS and CSRF over this module. The results of the test run will be stored in the log file "simpletest_results.txt".

Project information

Releases