论文标题
网络应用程序防火墙上的进化多任务注射测试
Evolutionary Multi-Task Injection Testing on Web Application Firewalls
论文作者
论文摘要
如今,Web应用程序防火墙(WAF)在保护Web应用程序免受SQL注入,XML注入和PHP注入等各种恶意注入攻击的情况下扮演着不可或缺的角色。但是,鉴于注射攻击的复杂性不断发展,调整WAF的复杂性越来越复杂,确保WAF没有注射脆弱性是一项挑战,因此它将阻止所有恶意注射攻击而不会错误地影响合法信息。因此,自动测试WAF是及时且必不可少的任务。在本文中,我们提出了一种自动注射测试工具Danuoyi,该工具同时生成了对WAF上多种注射攻击的测试输入。我们的基本思想来自自然语言处理领域中的跨语性翻译。特别是,不同类型的注射攻击的测试输入在句法上是不同的,但在语义上可能是相似的。因此,跨多种编程语言共享语义知识可以刺激更复杂的测试输入的产生,并发现WAF的注入漏洞,原本很难找到。为此,在Danuoyi中,我们使用多任务学习来训练多个注射翻译模型,该学习将任何一对注射攻击之间的测试输入转换。然后,该模型由新型的多任务进化算法使用,以共同进化测试输入,以通过每一代人的共享交配池和特定于域特异性突变算子促进的不同类型的注射攻击。我们对三个现实世界中的开源WAF和六种注射攻击进行了实验,结果表明,与其最新的最新单件任务相比,Danuoyi最高生成高达3.8倍和5.78倍的有效测试输入(即绕过基础WAF),以及基于上下文的无上下文基于上下文的注射构建。
Web application firewall (WAF) plays an integral role nowadays to protect web applications from various malicious injection attacks such as SQL injection, XML injection, and PHP injection, to name a few. However, given the evolving sophistication of injection attacks and the increasing complexity of tuning a WAF, it is challenging to ensure that the WAF is free of injection vulnerabilities such that it will block all malicious injection attacks without wrongly affecting the legitimate message. Automatically testing the WAF is, therefore, a timely and essential task. In this paper, we propose DaNuoYi, an automatic injection testing tool that simultaneously generates test inputs for multiple types of injection attacks on a WAF. Our basic idea derives from the cross-lingual translation in the natural language processing domain. In particular, test inputs for different types of injection attacks are syntactically different but may be semantically similar. Sharing semantic knowledge across multiple programming languages can thus stimulate the generation of more sophisticated test inputs and discovering injection vulnerabilities of the WAF that are otherwise difficult to find. To this end, in DaNuoYi, we train several injection translation models by using multi-task learning that translates the test inputs between any pair of injection attacks. The model is then used by a novel multi-task evolutionary algorithm to co-evolve test inputs for different types of injection attacks facilitated by a shared mating pool and domain-specific mutation operators at each generation. We conduct experiments on three real-world open-source WAFs and six types of injection attacks, the results reveal that DaNuoYi generates up to 3.8x and 5.78x more valid test inputs (i.e., bypassing the underlying WAF) than its state-of-the-art single-task counterparts and the context-free grammar-based injection construction.