#Injection Detector Plug-In for FindBugs
Input Injections are considered as the most common and effective vulnerabilities to exploit in many software systems (esp. web apps). Input injection is caused by executing user inputs which have not been validated or sanitized, so that the purpose of execution is changed by malicious agents into their advantages.
The input injection detector is done by extending an existing static analysis tool, namely FindBugs (currently we only support FindBugs 2.0.3). The detection uses dataflow analysis to monitor user-contaminated variables. To improve accuracy, reducing false positives and false negatives, dataflow analysis is used to monitor variables that have been validated or sanitized by developers.
This plug-in can detect following vulnerabilities:
- SQL injection
- Shell/command injection
- XPath injection
- LDAP injection
- Cross-site scripting (XSS) type-1
- Cross-site scripting (XSS) type-2
- Unvalidated redirects
- Unvalidated forwards
- HTTP response splitting
- Path traversal
- Remote file inclusion
- Clone this repository.
- Download FindBugs 2.0.3 source code (You can download it from SourceForge).
- Extract
findbugs-2.0.3-source.zip
to root directory of this repositories. In the root directory, you should have 3 (three) directories:findbugs-2.0.3
,findbugs-injection-detector
, andvulnerable-sites
. - Rename
findbugs-2.0.3
tofindbugs
. - In terminal, change current directory to
findbugs
, and then runant build
to compile and build FindBugs. - In terminal, change current directory to
findbugs-injection-detector
, and then runant install
to compile, build, and install the detector to FindBugs infindbugs
directory.
You should have injection-detector.jar
in findbugs-injection-detector
after building the plug-in. This file is plug-in for FindBugs. To install to another copy of FindBugs, you could copy injection-detector.jar
to plugin
directory in FindBugs.