Adversarial ModSecurity: Countering Adversarial SQL Injections with Robust Machine Learning

08/09/2023
by   Biagio Montaruli, et al.
0

ModSecurity is widely recognized as the standard open-source Web Application Firewall (WAF), maintained by the OWASP Foundation. It detects malicious requests by matching them against the Core Rule Set, identifying well-known attack patterns. Each rule in the CRS is manually assigned a weight, based on the severity of the corresponding attack, and a request is detected as malicious if the sum of the weights of the firing rules exceeds a given threshold. In this work, we show that this simple strategy is largely ineffective for detecting SQL injection (SQLi) attacks, as it tends to block many legitimate requests, while also being vulnerable to adversarial SQLi attacks, i.e., attacks intentionally manipulated to evade detection. To overcome these issues, we design a robust machine learning model, named AdvModSec, which uses the CRS rules as input features, and it is trained to detect adversarial SQLi attacks. Our experiments show that AdvModSec, being trained on the traffic directed towards the protected web services, achieves a better trade-off between detection and false positive rates, improving the detection rate of the vanilla version of ModSecurity with CRS by 21 our approach is able to improve its adversarial robustness against adversarial SQLi attacks by 42 and trustworthy WAFs.

READ FULL TEXT

page 3

page 9

research
07/11/2021

Attack Rules: An Adversarial Approach to Generate Attacks for Industrial Control Systems using Machine Learning

Adversarial learning is used to test the robustness of machine learning ...
research
11/21/2018

Malicious Web Request Detection Using Character-level CNN

Web parameter injection attacks are common and powerful. In this kind of...
research
02/21/2020

UnMask: Adversarial Detection and Defense Through Robust Feature Alignment

Deep learning models are being integrated into a wide range of high-impa...
research
11/06/2020

Web Application Attack Detection using Deep Learning

Modern web applications are dominated by HTTP/HTTPS messages that consis...
research
03/14/2018

Machine learning-assisted virtual patching of web applications

Web applications are permanently being exposed to attacks that exploit t...
research
01/07/2020

WAF-A-MoLE: Evading Web Application Firewalls through Adversarial Machine Learning

Web Application Firewalls are widely used in production environments to ...
research
09/14/2022

Collaborative SQL-injections detection system with machine learning

Data mining and information extraction from data is a field that has gai...

Please sign up or login with your details

Forgot password? Click here to reset