- Vulnerability: Bypass mod_security to perform SQL injection (login bypass)
- Affected Software: OWASP ModSecurity Core Rule Set
- Affected Version: 2.2.9 (probably also prior versions)
- Patched Version: 3.0.0
- Risk: Low
- Vendor Contacted: 2014-12-07 via mail, 2015-02-18 via github
- Vendor Fix: 2014-12-09 (in dev tree, independent of report)
- Public Disclosure: 2015-02-18 on github
Mod_Security & Core Rule Set
mod_security is an Intrusion Detection System / Web Application Firewall for Apache, IIS, and nginx developed by SpiderLabs. As a filter list it uses the OWASP ModSecurity Core Rule Set.
Using the Core ModSecurity Rule Set ver.2.2.9 with default configuration, SecRuleEngine On, and all base_rules enabled, it is possible to inject the following payload, which can be used to bypass filters in SQL queries:
foo' or true # foo' or false #
With a growing code base, it is good to have tools which can automatically find weaknesses in it, be it duplicate code, bad patterns, possible bugs, bad formatting, or bad design. Here are some of the tools that can analyze Java Code. CheckStyle, FindBugs, PMD – Java Static Code Analysis Google CodePro AnalytiX Eclipse Build-In Java Static Code Analysis NetBeans Java Hints – Java Static Code Analysis iSpace – Dependency Graph QJ-Pro: Java Static Code Analysis Lint4j – Java Static Code Analysis SonarQube Further
A list of resources about NoSQL injection in general and PHP and MongoDB security specifically.
- Intro: NoSQL Databases
- No Security by Default: NoSQL Authentication
- MongoDB Request Injection Attacks
- PHP & MongoDB: execute
- Securing NoSQL
- NoSQL Injection Example Code
- Links: More about NoSQL Security
Intro: NoSQL Databases
NoSQL databases such as MongoDB are used more and more, but there isn’t a lot of information about the security of specific NoSQL databases or the security of NoSQL in general. The direction it seems to be going is: It’s not SQL, so SQL injection is not possible, so it is secure. This is of course not true at all. The damage that can be achieved with NoSQL injections does seem to be smaller than that of SQL injection, but that does not mean that developers should not care about it.