polyhedraltech / SecurityTesting

Eclipse plugin suite providing integration with security testing tools.
Apache License 2.0
11 stars 3 forks source link

SecurityTesting

SecurityTesting is an open source IDE plugin designed to allow developers to run security testing tools from within their IDE. The following IDEs and tools are currently supported:

IDE

Security Testing Tools

Installation

All of the SecurityTesting plugins are based on Apache Maven and require the Eclipse Plugin Development Environment (PDE) features to be installed in your Eclipse IDE.

The build process is relatively straightforward:

  1. Download a copy of the source code from the GitHub repository.
  2. Import all of the projects into Eclipse using the "import existing Maven project" feature.
  3. Use the "maven install" goal on the imported projects in the following order:
    • com.polyhedral.security.testing.core
    • com.polyhedral.security.testing.core.feature
    • com.polyhedral.security.testing.zedattackproxy
    • com.polyhedral.security.testing.zedattackproxy.feature
    • com.polyhedral.security.testing.site
  4. Use the “Install New Software…” feature in Eclipse to install the update site ZIP file generated in the com.polyhedral.security.testing.site build.

Zed Attack Proxy (ZAP) Configuration

Once the plugin has been installed, you will need to configure it with the location of your ZAP installation. To configure the ZAP plugin, go to:

Eclipse Preferences -> Security Testing -> Zed Attack Proxy.  

ZAP Configuration in Eclipse

The following information needs to be provided to configure the ZAP plugin and allow you to start a headless version of ZAP from the plugin:

Please Note: You can use the ZAP plugin to connect to an existing ZAP instance that is running on your PC. If you wish to connect to ZAP in this fashion, provide the existing ZAP Proxy Port and ZAP API Key stored in the ZAP GUI's configuration.

Once you have entered your ZAP plugin configuration, save the changes and exit the Eclipse Preferences screen.

ZAP Startup

Once you have your ZAP configuration in place, you can start ZAP in headless mode using the plugin. First, you need to open the ZAP Eclipse View. It is located under:

Window -> Show View -> Other... -> Security Testing -> ZAP Scanner

You will see a blank ZAP Scanner view panel open, with the Start ZAP Server button (a green triangle icon) activated, as seen in the image below. If you have not provided all of the required ZAP configuration, then all of the activity buttons will be disabled.

ZAP Scanner Ready for Startup

Click on the Start ZAP Server button and the Eclipse Console will begin logging activity as a headless instance of the ZAP scanner is started. Once ZAP has fully initialized, the ZAP Scanner view panel will populate with the scan parameter view, as seen in the image below.

ZAP Scanner Parameter View

The ZAP Scanner parameter view allows you to provide the following information for performing a ZAP scan against a web application:

ZAP Execution

Once you have provided all of the parameters in the ZAP Scanner parameter view, you are now ready to start your scan. At the top of the ZAP Scanner parameter view, you will see the Run ZAP Spider/Ascan button (a yellow flashlight icon), as seen in the image below. Click on the Run ZAP Spider/Ascan button to start the scan.

Start ZAP Scan Button

Once the scan has started, the ZAP Scanner view will switch to a progress tracker, as seen in the image below. If for some reason you decide that you need to cancel the currently running scan, you can click on the Cancel ZAP Spider/Ascan button (the red X icon) to stop the current scan and return to the ZAP Scanner parameter view.

ZAP Scan Progress Tracker and Cancel Button

After the scan has completed, you will be returned to the ZAP Scanner parameter view. Additionally, the results of your scan will be dumped into files in an Eclipse project called SecurityTesting under the ZAPScanResults folder, as seen in the image below. These files contain the spider and scan results from all of your ZAP plugin runs, so make sure to find the files that start with the correct Scan Result File name.

ZAP Scan Results Project

ZAP Shutdown

When the plugin starts the headless ZAP server instance, it is created as an independent process. As such, it will not automatically be shutdown when you close Eclipse. In order to prevent your ZAP server process from continuing to run until you shut down your computer, you can click on the Stop ZAP Server button (the red square icon) from the ZAP Scanner parameter view. This will shut down the headless ZAP server instance and return the ZAP Server view to the original blank startup view.

ZAP Server Shutdown Button