Web application firewall(WAF)is critical defensive mechanisms against persistent threats,yet its security assessment has long been challenging. Traditional manual testing methods are inefficient and resource-intensive,while existing reinforcement learning(RL)based methods suffer from two major limitations:first,attackers cannot perceive the opaque rule logic of WAF,leading to low efficiency in black-box testing; second,the Boolean feedback of WAF causes the problem of sparse/delayed rewards—sparse rewards tend to trap intelligent agents in blind exploration,and delayed rewards hinder the association between early actions and final outcomes,seriously impairing learning efficiency. To break through these bottlenecks,this study proposed“Ouroboros”—ablack-box WAF testing framework—for the first time.Its core lies in converting the extracted WAF rules into an interpretable recurrent neural network(RNN)to provide fine-grained confidence scores,and integrating these scores with outcome-level rewards to drive RL-based testing.Experiments show that this framework can achieve a maximum bypass success rate of 89.2% on feature-based WAF. This not only alleviates the sparse reward problem and provides an efficient black-box testing solution,but also offers important references for optimizing WAF rules.
| 科 Family | 属数 Number of genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) | 属 Genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) |
|---|---|---|---|---|---|---|
| 鹅膏菌科Amanitaceae | 2 | 11 | 5.26 | 鹅膏菌属 Amanita | 10 | 4.78 |
| 小菇科 Mycenaceae | 2 | 12 | 5.74 | 丝盖伞属 Inocybe | 5 | 2.39 |
| 多孔菌科 Polyporaceae | 8 | 14 | 6.70 | 蜡蘑属 Laccaria | 5 | 2.39 |
| 红菇科 Russulaceae | 3 | 23 | 11.00 | 小皮伞属 Marasmius | 6 | 2.87 |
| 小菇属 Mycena | 11 | 5.26 | ||||
| 光柄菇属 Pluteus | 5 | 2.39 | ||||
| 红菇属 Russula | 17 | 8.13 | ||||
| 栓菌属 Trametes | 5 | 2.39 |