White-Box Fuzzing RPC-Based APIs with EvoMaster: An Industrial Case Study

Author:

Zhang Man1ORCID,Arcuri Andrea2ORCID,Li Yonggang3ORCID,Liu Yang3ORCID,Xue Kaiming3ORCID

Affiliation:

1. Kristiania University College, Oslo, Norway

2. Kristiania University College and Oslo Metropolitan University, Oslo, Norway

3. Meituan, Beijing, China

Abstract

Remote Procedure Call (RPC) is a communication protocol to support client-server interactions among services over a network. RPC is widely applied in industry for building large-scale distributed systems, such as Microservices. Modern RPC frameworks include, for example, Thrift, gRPC, SOFARPC, and Dubbo. Testing such systems using RPC communications is very challenging, due to the complexity of distributed systems and various RPC frameworks the system could employ. To the best of our knowledge, there does not exist any tool or solution that could enable automated testing of modern RPC-based services. To fill this gap, in this article we propose the first approach in the literature, together with an open source tool, for fuzzing modern RPC-based APIs. The approach is in the context of white-box testing with search-based techniques. To tackle schema extraction of various RPC frameworks, we formulate a RPC schema specification along with a parser that allows the extraction from source code of any JVM RPC-based APIs. Then, with the extracted schema we employ a search to produce tests by maximizing white-box heuristics and newly defined heuristics specific to the RPC domain. We built our approach as an extension to an open source fuzzer (i.e., EvoMaster ), and the approach has been integrated into a real industrial pipeline that could be applied to a real industrial development process for fuzzing RPC-based APIs. To assess our novel approach, we conducted an empirical study with two artificial and four industrial web services selected by our industrial partner. In addition, to further demonstrate its effectiveness and application in industrial settings, we report results of employing our tool for fuzzing another 50 industrial APIs autonomously conducted by our industrial partner in their testing processes. Results show that our novel approach is capable of enabling automated test case generation for industrial RPC-based APIs (i.e., 2 artificial and 54 industrial). We also compared with a simple gray-box technique and existing manually written tests. Our white-box solution achieves significant improvements on code coverage. Regarding fault detection, by conducting a careful review with our industrial partner of the tests generated by our novel approach in the selected four industrial APIs, a total of 41 real faults were identified, which have now been fixed. Another 8,377 detected faults are currently under investigation.

Funder

European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Reference79 articles.

1. [n. d.]. AFL. https://github.com/google/AFL. Accessed August 26 2022.

2. [n. d.]. Dubbo. https://dubbo.apache.org/en/. Accessed August 26 2022.

3. [n. d.]. EvoMaster. https://github.com/EMResearch/EvoMaster. Accessed August 26 2022.

4. [n. d.]. EvoMaster Benchmark (EMB). https://github.com/EMResearch/EMB. Accessed August 26 2022.

5. [n. d.]. GraphQL Foundation. https://graphql.org/foundation/. Accessed August 26 2022.

Cited by 5 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Random Testing and Evolutionary Testing for Fuzzing GraphQL APIs;ACM Transactions on the Web;2024-01-05

2. Automated Test Generation for Medical Rules Web Services: A Case Study at the Cancer Registry of Norway;Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering;2023-11-30

3. Open Problems in Fuzzing RESTful APIs: A Comparison of Tools;ACM Transactions on Software Engineering and Methodology;2023-09-30

4. JavaScript SBST Heuristics to Enable Effective Fuzzing of NodeJS Web APIs;ACM Transactions on Software Engineering and Methodology;2023-09-28

5. Overview of Machine Learning Processes Used in Improving Security in API-Based Web Applications;Artificial Intelligence Application in Networks and Systems;2023

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3