MicroFuzz: An Efficient Fuzzing Framework for Microservices

Peng Di, Bingchang Liu, Yiyi Gao · DOI

Introduction

Fuzzing is a cornerstone of modern software security, traditionally optimized for monolithic applications. However, the industry-wide shift toward microservice architectures has introduced significant complexities—distributed state, non-determinism, and high network latency—that render conventional fuzzers inefficient. MicroFuzz, developed by researchers at Ant Group, is a specialized framework designed to address these challenges at scale.

The Challenges of Microservice Fuzzing

Traditional fuzzers like AFL assume a single memory space and deterministic execution. Microservices disrupt these assumptions in three primary ways:

  1. Execution Inconsistency: Dependencies on external databases or volatile services cause non-deterministic behavior for the same input.
  2. Communication Overhead: Network-based Remote Procedure Calls (RPCs) introduce latency that is orders of magnitude higher than local function calls.
  3. Scale and Resource Management: In environments with thousands of services, continuous fuzzing across all components is computationally prohibitive.

Methodology

MicroFuzz employs several innovative components to bridge the gap between monolithic efficiency and microservice complexity.

The MicroFuzz architecture integrates intelligent switches, distributed tracing, and mocking-assisted execution to handle microservice environments.

Mocking-Assisted Seed Execution

To enforce determinism, MicroFuzz identifies "mocking points" such as RPC calls or system time. By recording values at these points during initial runs and replaying them, the framework ensures that a specific seed always follows a consistent execution path, enabling effective seed selection and trimming.

Distributed Tracing and Pipeline Parallelism

MicroFuzz utilizes agents to collect coverage data across service clusters, linking them via unique traceIds. To mitigate network latency, the framework decouples the fuzzing loop into a parallel pipeline.

Pipeline parallelism allows MicroFuzz to overlap mutation, execution, and analysis, significantly increasing throughput.

The Intelligent Switch

Drawing from the Software Testing as Species Discovery (STADS) model, MicroFuzz monitors the rate of new code coverage. When the discovery of new paths reaches a statistical plateau, an "Intelligent Switch" automatically suspends the process to conserve CPU resources, reactivating only when code changes are detected.

Evaluation and Impact

The framework was evaluated on a massive industrial scale at Ant Group, covering 261 microservice applications and over 74.6 million lines of code.

Key Results:

  • Vulnerability Detection: Over five months, MicroFuzz identified 5,718 potential risks, with 1,764 confirmed and remediated security threats.
  • Coverage Improvement: The framework achieved a 12.24% average increase in line coverage and discovered 38.42% more program paths compared to baseline methods.
  • Efficiency Gains: The pipelined architecture provided an average speedup of 2.67x (peaking at 6.89x).
  • Resource Optimization: The Intelligent Switch reduced computing resource consumption by 61.7% by terminating unproductive sessions.

Conclusion

MicroFuzz demonstrates that by manufacturing determinism through mocking and hiding latency via pipelining, fuzzing can be effectively scaled to complex microservice ecosystems. Its successful deployment at Ant Group underscores its potential as a robust solution for securing large-scale distributed systems.

Summary updated

BibTeX
@inproceedings{di2024microfuzz,
  author = {Peng Di and Bingchang Liu and Yiyi Gao},
  title = {{MicroFuzz: An Efficient Fuzzing Framework for Microservices}},
  booktitle = {ICSE-SEIP},
  year = {2024},
  url = {https://openreview.net/forum?id=HgUHU9DHtu},
}
Figure