[Paper Review] REST-ler: Automatic Intelligent REST API Fuzzing
REST-ler is the first automatic, intelligent fuzzer for REST APIs that analyzes Swagger specifications to infer request dependencies and dynamically learn invalid request sequences from service responses. It generates intelligent test sequences to efficiently explore complex API behavior, discovering security-relevant bugs in real-world services like GitLab with minimal manual effort.
Cloud services have recently exploded with the advent of powerful cloud-computing platforms such as Amazon Web Services and Microsoft Azure. Today, most cloud services are accessed through REST APIs, and Swagger is arguably the most popular interface-description language for REST APIs. A Swagger specification describes how to access a cloud service through its REST API (e.g., what requests the service can handle and what responses may be expected). This paper introduces REST-ler, the first automatic intelligent REST API security-testing tool. REST-ler analyzes a Swagger specification and generates tests that exercise the corresponding cloud service through its REST API. Each test is defined as a sequence of requests and responses. REST-ler generates tests intelligently by (1) inferring dependencies among request types declared in the Swagger specification (e.g., inferring that "a request B should not be executed before a request A" because B takes as an input argument a resource-id x returned by A) and by (2) analyzing dynamic feedback from responses observed during prior test executions in order to generate new tests (e.g., learning that "a request C after a request sequence A;B is refused by the service" and therefore avoiding this combination in the future). We show that these two techniques are necessary to thoroughly exercise a service under test while pruning the large search space of possible request sequences. We also discuss the application of REST-ler to test GitLab, a large popular open-source self-hosted Git service, and the new bugs that were found.
Motivation & Objective
- To address the lack of automated, intelligent tools for security testing of REST APIs in cloud services.
- To reduce the enormous search space of possible request sequences by inferring dependencies and learning from runtime feedback.
- To improve the effectiveness and coverage of automated API fuzzing beyond traditional grammar-based or traffic-replay approaches.
- To identify and report security-critical vulnerabilities in real-world, production-grade cloud services like GitLab.
- To demonstrate that intelligent, feedback-directed API fuzzing is essential for thorough and efficient testing.
Proposed method
- Analyzes Swagger specifications to statically infer dependencies between API requests, such as requiring a resource ID from a prior response to invoke a subsequent request.
- Employs dynamic feedback analysis by observing service responses to learn which request sequences are invalid or rejected, avoiding redundant or harmful test paths.
- Generates test cases as sequences of requests and responses, guided by inferred dependencies and feedback-driven pruning of invalid paths.
- Implements multiple search strategies (e.g., depth-first, breadth-first, and feedback-guided exploration) to navigate the large state space of possible API interactions.
- Uses a black-box approach, observing only HTTP requests and responses without reverse-engineering internal service logic or source code.
- Extends fuzzing with learning mechanisms inspired by model-based testing and API testing in object-oriented systems to improve test diversity and coverage.
Experimental results
Research questions
- RQ1Can intelligent dependency inference from Swagger specifications significantly reduce the search space of possible API request sequences?
- RQ2Can dynamic feedback from service responses improve the effectiveness and efficiency of API fuzzing?
- RQ3How do different search strategies impact the discovery of new and complex API behaviors in real-world services?
- RQ4Can automated, intelligent API fuzzing uncover security-relevant bugs that are missed by traditional testing or manual penetration testing?
- RQ5To what extent can such a tool be effective in finding vulnerabilities in large, complex, real-world cloud services like GitLab?
Key findings
- REST-ler successfully discovered multiple new security-relevant bugs in GitLab, including concurrency-related issues in database operations that could lead to data corruption or leaks.
- The combination of static dependency inference and dynamic feedback analysis was essential to achieve high test coverage while avoiding invalid or redundant request sequences.
- Feedback-directed learning significantly pruned the search space, allowing REST-ler to explore deeper and more complex API interaction patterns efficiently.
- Among the evaluated search strategies, feedback-guided exploration outperformed depth-first and breadth-first approaches in discovering new and complex behaviors.
- The tool demonstrated that automated, intelligent fuzzing of REST APIs is feasible and effective, even for large, complex services with intricate state dependencies.
- The results suggest that REST-ler can serve as a scalable, complementary tool to manual penetration testing for identifying security vulnerabilities in cloud services.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.