Abstract
More and more people are depending on web applications in their daily life as a result of the development of big data and cloud computing technologies. A lot of data is processed through web applications, however, security vulnerabilities in web applications provide a continuing threat to people's private data. Traditional black-box scanners and white-box analysis tools struggle to identify vulnerabilities for runtime web applications precisely and effectively in the production environment, and web application firewalls are unable to get the runtime context environment in which they are executed, leading to a large number of false positive reports. In this paper, we propose a novel fuzzing and tainting-based system for web application runtime self-protection, which simultaneously implements web application vulnerability detection and attack protection from adversaries at runtime and generates comprehensive vulnerability reports for website administrators along with potential fix recommendations and patch code. We implemented and evaluated a basic prototype system for XSS vulnerabilities in PHP-based web applications. Our results show that although RASP based on fuzzing and tainting causes about a 30% reduction in website efficiency, it is fully defendable against almost all XSS attacks, while the fuzzer finds new data flow paths that could trigger the same XSS vulnerability and provides corresponding remediation recommendations.
Introduction
Web application security is traditionally a tug-of-war between accuracy and performance. Black-box scanners often miss deep logic because they only see the application's external interface, while white-box static analysis tools lack runtime context, leading to excessive false positives. Furthermore, Web Application Firewalls (WAFs) sit at the network edge and inspect traffic without understanding how the application actually processes data, often failing to distinguish between legitimate complex queries and malicious payloads. This research addresses these limitations by proposing a hybrid system that combines Runtime Application Self-Protection (RASP) with taint tracing and coverage-guided fuzzing.
Methodology
The proposed system integrates directly into the web server environment through a multi-stage pipeline designed to act as both a shield and a scout:
- Instrumentation: The system tokenizes the application's source code to build an Abstract Syntax Tree (AST) and a Control Flow Graph (CFG). It hooks into input sources and "dangerous sink functions" (such as
echoorprintfor XSS). - Taint Tracing: Data from HTTP requests is marked as "tainted" and tracked as it propagates through variables and functions.
- Runtime Protection: If tainted data reaches a dangerous sink without proper sanitization, the RASP system identifies the attack, blocks it, and records the specific Data Flow Graph (DFG).
- Coverage-Guided Fuzzing: The blocked attack serves as a "seed." An external fuzzer uses the DFG to mutate the input and explore alternative paths in the CFG that might hit the same sink, providing developers with comprehensive vulnerability reports and suggested patches.
Evaluation and Results
The prototype was evaluated using the Damn Vulnerable Web Application (DVWA) to test defensive efficacy and real-world Content Management Systems (CMS) like WordPress and Joomla to measure performance overhead.
Defensive Efficacy
In tests against DVWA, the system successfully defended against nearly all XSS attacks. Even at the "high" security level, it identified and blocked payloads while discovering four additional data flow paths that could lead to the same vulnerability. However, the system did record some false negatives in "low" security settings (439 payloads missed), a conscious trade-off made to limit the performance overhead of hooking every data-spreading function.
Performance Overhead
Deep runtime inspection incurs a "security tax." The results showed an average 30% reduction in website efficiency (throughput). For example, WordPress throughput dropped from approximately 7.03 to 4.57 requests per second.
Conclusion
By combining RASP with fuzzing, this system moves security from a reactive "block and forget" model to a proactive "block and fix" model. While the 30% performance hit is significant for high-traffic production sites, the system provides high-precision protection and automated remediation recommendations. Future work will focus on optimizing the hooking mechanism and exploring specialized mutation strategies for web protocols to improve fuzzing efficiency.
Summary updated