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.
翻译:网络应用防火墙(WAF)在当今保护网络应用程序免遭各种恶意注射攻击(如SQL注射、XML注射和PHP注射等)方面发挥着不可或缺的作用。然而,鉴于注射攻击的复杂程度不断演进,而且对WAF的调整越来越复杂,因此,确保WAF没有注射上的脆弱性,这样就可以阻止所有恶意注射攻击,而不会错误地影响合法信息,自动测试WAF是一项及时和重要的任务。在本文中,我们提议DaNuooYi是一个自动注射测试工具,可以同时为WAF的多种注射攻击提供测试投入。我们的基本想法来自自然语言处理域的跨语言翻译。特别是,不同类型注射攻击的测试投入是同步的,但可能具有内在相似性。分享多种编程语言的语义知识,因此可以刺激更复杂的测试投入,并发现WAFF的不易找到。为此,在DaNuOYi,我们通过使用多塔克攻击来培训数个模式翻译模型翻译模型模型,通过使用多种语言操作的六种测试模型,通过使用不同版本的版本的进化进化实验模型,可以产生不同进化进化进化的进化的进化工具。