通过数据流融合对 PHP 解释器进行模糊测试
Fuzzing the PHP Interpreter via Dataflow Fusion
AI总结:
本文提出首个针对 PHP 解释器内存错误的自动化模糊测试框架 FlowFusion,通过数据流融合合并测试用例并结合变异、接口模糊测试和环境交叉策略,发现 158 个未知漏洞,并已集成到官方 PHP 工具链。
摘要:
PHP 是 Web 开发中占主导地位的脚本语言,为从个人博客到大型平台的大量网站提供支持。虽然现有研究主要关注 PHP 应用层安全问题(如代码注入),但 PHP 解释器内部的内存错误在很大程度上被忽视了。由于 PHP 解释器拥有庞大的 C 代码库,这些内存错误普遍存在,对 PHP 服务器的机密性、完整性和可用性构成重大风险。本文介绍了 FlowFusion,这是首个用于检测 PHP 解释器中内存错误的自动化模糊测试框架。FlowFusion 利用数据流作为 PHP 开发人员维护的测试用例的高效表示,将两个或多个测试用例合并以生成具有更复杂代码语义的融合测试用例。此外,FlowFusion 采用了测试变异、接口模糊测试和环境交叉等策略来提高漏洞发现能力。在我们的评估中,FlowFusion 在 PHP 解释器中发现了 158 个未知漏洞,其中 125 个已修复,11 个已确认。将 FlowFusion 与官方测试套件和朴素的测试拼接方法进行比较,FlowFusion 能够检测到这些方法遗漏的新漏洞,同时实现更高的代码覆盖率。FlowFusion 还优于最先进的模糊测试工具 AFL++ 和 Polyglot,在 24 小时的模糊测试后多覆盖了 24% 的代码行。FlowFusion 已获得 PHP 开发人员的广泛认可,现已集成到官方 PHP 工具链中。
英文摘要:
PHP, a dominant scripting language in web development, powers a vast range of websites, from personal blogs to major platforms. While existing research primarily focuses on PHP application-level security issues like code injection, memory errors within the PHP interpreter have been largely overlooked. These memory errors, prevalent due to the PHP interpreter's extensive C codebase, pose significant risks to the confidentiality, integrity, and availability of PHP servers. This paper introduces FlowFusion, the first automatic fuzzing framework to detect memory errors in the PHP interpreter. FlowFusion leverages dataflow as an efficient representation of test cases maintained by PHP developers, merging two or more test cases to produce fused test cases with more complex code semantics. Moreover, FlowFusion employs strategies such as test mutation, interface fuzzing, and environment crossover to increase bug finding. In our evaluation, FlowFusion found 158 unknown bugs in the PHP interpreter, with 125 fixed and 11 confirmed. Comparing FlowFusion against the official test suite and a naive test concatenation approach, FlowFusion can detect new bugs that these methods miss, while also achieving greater code coverage. FlowFusion also outperformed state-of-the-art fuzzers AFL++ and Polyglot, covering 24% more lines of code after 24 hours of fuzzing. FlowFusion has gained wide recognition among PHP developers and is now integrated into the official PHP toolchain.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。