[论文解读] Open Problems in Fuzzing RESTful APIs: A Comparison of Tools
本论文通过在19个真实世界的API上采用黑盒与白盒测试,评估了七种最先进的模糊测试工具在RESTful API上的表现,利用JaCoCo和c8测量实际代码覆盖率。结果表明,没有任何一个模糊测试工具的平均行覆盖率超过60%,其中EvoMaster和Schemathesis表现最佳,并识别出若干关键开放问题,如处理未充分指定的模式以及与外部服务的交互。
RESTful APIs are a type of web services that are widely used in industry. In the last few years, a lot of effort in the research community has been spent in designing novel techniques to automatically fuzz those APIs to find faults in them. Many real faults were automatically found in a large variety of RESTful APIs. However, usually the analyzed fuzzers treat the APIs as black-box, and no analysis of what is actually covered in these systems is done. Therefore, although these fuzzers are clearly useful for practitioners, we do not know what are their current limitations and actual effectiveness. Solving this is a necessary step to be able to design better, more efficient and effective techniques. To address this issue, in this paper we compare seven state-of-the-art fuzzers on 18 open-source and one industrial RESTful APIs. We then analyzed the source code of which parts of these APIs the fuzzers fail to generate tests for. This analysis points to clear limitations of these current fuzzers, listing concrete challenges for the research community to follow up on.
研究动机与目标
- 评估最先进的模糊测试工具在真实RESTful API上的实际代码覆盖率,超越黑盒测试指标。
- 通过分析真实世界API中未被覆盖的代码区域,识别当前模糊测试技术的局限性。
- 结合黑盒与白盒测试策略,对模糊测试工具进行全面且基于实证的比较。
- 突出API模糊测试工具有效性中的开放研究问题,特别是关于模式模糊性与外部服务交互方面。
提出的方法
- 本研究在19个RESTful API(13个基于JVM,6个基于Node.js)上评估了七种模糊测试工具——bBOXRT、EvoMaster、RESTest、RestCT、RESTler、RestTestGen和Schemathesis。
- 每个模糊测试工具每轮运行1小时,重复10次以考虑算法随机性的影响。
- 使用JaCoCo测量JVM API的覆盖率,使用c8测量Node.js API的覆盖率,提供客观的源代码级别指标。
- 分析涵盖黑盒测试(远程SUT)与白盒测试(可访问源代码和覆盖率数据)。
- 对未被覆盖的代码区域进行详细的手动检查,以识别模糊测试行为中的重复性挑战。
- 所有实验脚本与数据均已开源,以确保可复现性。
实验结果
研究问题
- RQ1当前最先进的API模糊测试工具在真实世界RESTful API上实际实现了多高的代码覆盖率?
- RQ2在这些模糊测试工具中,黑盒与白盒测试策略在覆盖率方面有何差异?
- RQ3哪些代码层面的限制导致模糊测试工具无法实现更高覆盖率?
- RQ4在模式设计与外部服务依赖方面,模糊测试行为中反复出现的挑战是什么?
主要发现
- EvoMaster在19个API上的平均行覆盖率最高,Schemathesis紧随其后,但两者均未超过60%的平均覆盖率。
- 平均而言,所有黑盒模糊测试工具的行覆盖率均低于60%,表明代码探索存在显著缺口。
- 白盒测试始终优于黑盒测试,证明了内部代码知识在测试生成中的价值。
- 一个主要限制是模糊测试工具无法处理未充分指定或不完整的OpenAPI模式,导致测试输入生成不完整。
- 模糊测试工具难以生成能够触发涉及外部服务(如数据库和第三方API)的复杂逻辑的输入。
- 手动代码分析显示,许多未被覆盖的代码区域涉及依赖特定输入结构或外部状态的条件逻辑,而当前模糊测试工具未能探索这些区域。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。