WAFBooster: Automatic Boosting of WAF Security Against Mutated Malicious Payloads

Cong Wu, Jing Chen, Simeng Zhu, Wenqi Feng, Kun He, Ruiying Du, Yang Xiang

Abstract

Web Application Firewalls (WAFs) are critical components of modern web security, yet they often struggle to detect mutated or obfuscated malicious payloads that deviate from static, rule-based signatures. This paper presents WAFBOOSTER, an automated, black-box framework designed to identify these security gaps and proactively generate robust defense rules. By utilizing a combination of deep learning for payload generation and a novel signature production mechanism, WAFBOOSTER improves the True Rejection Rate (TRR) of mutated attacks from a baseline of 21% to 96% across eight real-world WAFs, while maintaining a zero false rejection rate.

1. Introduction

The security of web applications relies heavily on WAFs to filter malicious traffic. However, the effectiveness of these systems is frequently undermined by the "cat-and-mouse" game of payload mutation. Attackers employ various techniques—such as encoding, whitespace variations, and comment injection—to bypass pattern-matching rules. Traditional methods for testing and updating WAFs are often manual, labor-intensive, and fail to generalize across different attack vectors like SQL Injection (SQLi) or Cross-Site Scripting (XSS). WAFBOOSTER addresses these challenges by automating the discovery of bypasses and the subsequent generation of protective signatures.

2. The WAFBOOSTER Framework

WAFBOOSTER operates as a four-stage pipeline designed to work in a black-box environment, requiring no internal knowledge of the target WAF’s ruleset.

2.1 Stage 1: Shadow Model Construction

To avoid the overhead and potential disruption of testing millions of payloads against a production WAF, WAFBOOSTER trains a Shadow Model. This model is a Convolutional Neural Network (CNN) trained to mimic the behavior of the target WAF. Once trained, the shadow model serves as a high-speed proxy for adversarial testing.

2.2 Stage 2: Adversarial Payload Generation

Using a Recurrent Neural Network (RNN) with Gated Recurrent Units (GRU), the framework learns the underlying structure of successful attacks. It then generates new, mutated variations specifically designed to evade the shadow model. This approach allows the system to explore a vast space of potential mutations that human-authored rules might overlook.

2.3 Stage 3: Semantic Correction

AI-generated payloads can occasionally result in syntactically invalid code. WAFBOOSTER employs a Payload Corrector that uses Levenshtein distance (edit distance) to compare generated strings against a library of high-frequency attack keywords (e.g., SELECT, UNION, SCRIPT). This ensures that the generated attacks remain semantically valid and capable of executing on a target application.

2.4 Stage 4: Automated Signature Production

The final stage identifies the critical components of a successful bypass. By systematically deleting or replacing tokens and observing the impact on the WAF's detection, the system calculates an "importance score" for each part of the payload. It then clusters these essential tokens and generates simplified regular expressions (regex) using \S* qualifiers. These signatures are designed to be flexible enough to catch future mutations without introducing significant computational overhead.

3. Experimental Evaluation

3.1 Datasets and Setup

The researchers evaluated WAFBOOSTER using a combination of public and synthetic data. Benign traffic was sourced from the CSIC 2010 HTTP dataset, while malicious payloads were generated using grammars for SQLi, XSS, and Command Injection (CI). The generation process was seeded using payloads from industry-standard tools like sqlmap and XSStrike.

3.2 Performance Metrics

The framework was tested against eight real-world WAFs, including ModSecurity, Naxsi, and Safedog. The primary metrics were the True Rejection Rate (TRR) and the False Rejection Rate (FRR).

  • Security Enhancement: WAFBOOSTER increased the TRR for mutated payloads from an average of 21% to 96%.
  • Precision: The system achieved a 0% False Rejection Rate, ensuring that the newly generated rules did not interfere with legitimate user traffic.
  • Evasion Capability: In comparative testing, WAFBOOSTER’s generated payloads were 3x more effective at bypassing firewalls than those produced by state-of-the-art tools like WAF-A-MoLE.

4. Discussion and Limitations

WAFBOOSTER demonstrates that deep learning can be effectively harnessed to automate the maintenance of rule-based security systems. By focusing on "importance scoring," the framework avoids the trap of creating overly complex regex that could degrade server performance.

However, some limitations remain. The current framework does not address network-layer threats like Distributed Denial of Service (DDoS) attacks. Additionally, the system's efficacy depends on the quality of the initial training data; poisoned datasets could lead to inaccuracies in the shadow model. Future work will explore the integration of Large Language Models (LLMs) to enhance payload variety and expand the system's coverage to other attack types, such as PHP and XPath injection.

5. Conclusion

WAFBOOSTER provides a scalable, automated solution to the persistent problem of payload mutation. By bridging the gap between black-box vulnerability discovery and automated rule generation, it offers a proactive defense mechanism that significantly hardens Web Application Firewalls against evolving cyber threats.

Summary updated

BibTeX
@article{wu2025wafbooster,
  author = {Cong Wu and Jing Chen and Simeng Zhu and Wenqi Feng and Kun He and Ruiying Du and Yang Xiang},
  title = {{WAFBooster: Automatic Boosting of WAF Security Against Mutated Malicious Payloads}},
  journal = {IEEE Trans. Dependable Secur. Comput.},
  year = {2025},
  doi = {10.1109/tdsc.2024.3429271},
}
Figure