All Projects → matusf → openapi-fuzzer

matusf / openapi-fuzzer

Licence: AGPL-3.0 License
Black-box fuzzer that fuzzes APIs based on OpenAPI specification. Find bugs for free!

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to openapi-fuzzer

kompendium
Ktor OpenAPI Spec Generator
Stars: ✭ 46 (-86.14%)
Mutual labels:  openapi
flaskerk
A flask extension for api doc and validation of request&response.
Stars: ✭ 24 (-92.77%)
Mutual labels:  openapi
fastify-openapi-glue
A plugin for Fastify to autogenerate a configuration based on a OpenApi(v2/v3) specification.
Stars: ✭ 94 (-71.69%)
Mutual labels:  openapi
revshfuzz
A tool for fuzzing for ports that allow outgoing connections
Stars: ✭ 18 (-94.58%)
Mutual labels:  fuzzer
boats
Beautiful Open Api Template System
Stars: ✭ 28 (-91.57%)
Mutual labels:  openapi
tuya-connector
tuya-connector helps you efficiently create cloud development projects regarding the OpenAPI or message subscription capabilities. You can put all the focus on business logic without taking care of server-side programming nor relational databases.
Stars: ✭ 28 (-91.57%)
Mutual labels:  openapi
openapi-generator-for-spring
Open API v3 Generator for Spring Boot applications
Stars: ✭ 54 (-83.73%)
Mutual labels:  openapi
oas2
OpenAPI 2.0 (aka Swagger) utils for Golang.
Stars: ✭ 19 (-94.28%)
Mutual labels:  openapi
home
This is the home page for the API specification toolbox.
Stars: ✭ 16 (-95.18%)
Mutual labels:  openapi
openapi-assert
Asserting data against OpenAPI docs.
Stars: ✭ 17 (-94.88%)
Mutual labels:  openapi
micronaut-openapi-codegen
OpenAPI codegen for Micronaut
Stars: ✭ 26 (-92.17%)
Mutual labels:  openapi
openapi-schema-validator
OpenAPI schema validator for Python
Stars: ✭ 35 (-89.46%)
Mutual labels:  openapi
oatts
DEPRECATED in favor of https://github.com/google/oatts
Stars: ✭ 26 (-92.17%)
Mutual labels:  openapi
COP
Cosco shipping lines Open api Platform
Stars: ✭ 31 (-90.66%)
Mutual labels:  openapi
bluepine
A DSL for defining API schemas/endpoints, validating, serializing and generating Open API v3
Stars: ✭ 21 (-93.67%)
Mutual labels:  openapi
iGap-API
iGap Core Messaging offer Open APIs for developers . This API allows you to build your own customized iGap clients.
Stars: ✭ 22 (-93.37%)
Mutual labels:  openapi
thema
A CUE-based framework for portable, evolvable schema
Stars: ✭ 41 (-87.65%)
Mutual labels:  openapi
openapi-schemas
JSON Schemas for every version of the OpenAPI Specification
Stars: ✭ 22 (-93.37%)
Mutual labels:  openapi
covid19-api
Covid19 Data API (JSON) - LIVE
Stars: ✭ 20 (-93.98%)
Mutual labels:  openapi
sbt-openapi-schema
Generate schema sources for Scala, Java and Elm from an openapi 3.0 spec.
Stars: ✭ 12 (-96.39%)
Mutual labels:  openapi

OpenAPI fuzzer

ci

Black-box fuzzer that fuzzes APIs based on OpenAPI specification. All you need to do is to supply URL of the API and its specification. Find bugs for free!

demo

Findings

The fuzzer has been used to find bugs in numerous software. Some of the well-known fuzzed software include1:

The category of bugs differ, but some of the common are parsing bugs, invalid format bugs and querying non-existent entities. If you have found bugs with this fuzzer, please reach out to me. I would love to hear from you. Feel free to submit a PR and add your finding to the list above.

Building & installing

To build the fuzzer, you will need to have rust installed.

# Install from crates.io
cargo install openapi-fuzzer

# Or download the repo and build locally
git clone [email protected]:matusf/openapi-fuzzer.git
cd openapi-fuzzer

# Install to the $PATH
cargo install --path .

# Or build (add --release to build optimized binary) inside the repo
cargo build

Usage

After installation you will have two binaries, openapi-fuzzer and openapi-fuzzer-resender. The openapi-fuzzer will fuzz the API according to the specification and report any findings. All findings will be located in a results directory in a JSON format. After you are done with fuzzing, you can use openapi-fuzzer-resender to resend payloads that triggered a bugs and examine the cause in depth.

Note: This program only supports OpenAPI v3, both YAML and JSON. OpenAPI v2 is not supported and must be converted to v3 before usage.

Tips

  • When the fuzzer receives an unexpected status code, it will report is as a finding. However, many APIs do not specify client error status codes in the specification. To minimize false positive findings ignore status codes that you are not interested in with -i flag. It is adviced to fuzz it two stages. Firstly, run the fuzzer without -i flag for a minute. Then check results folder for the reported findings. If there are reports from status codes you do not care about, add them via -i flag and rerun the fuzzer.
  • Most APIs use some base prefix for endpoints like /v1 or /api, however, the specifications are sometimes writen without it. Do not forget to include the path prefix in the url.
  • You may add an extra header with -H flag. It may be useful when you would like to increase coverage by providing some sort of authorization.
$ openapi-fuzzer --help
Usage: openapi-fuzzer -s <spec> -u <url> [-i <ignore-status-code>] [-H <header>]

OpenAPI fuzzer

Options:
  -s, --spec        path to OpenAPI specification file
  -u, --url         url of api to fuzz
  -i, --ignore-status-code
                    status codes that will not be considered as finding
  -H, --header      additional header to send
  --help            display usage information


$ openapi-fuzzer -s ./spec.yaml -u http://127.0.0.1:8200/v1/ -i 404

Replaying findings

When you are done fuzzing you can replay the findings. All findings are stored in the results folder in path according to finding's endpoint and method. To resend the same payload to API, you simply run openapi-fuzzer-resender with path to the finding file as an argument. You can overwrite the headers with -H flag as well, which is useful for example, when the authorization token expired.

$ tree -L 3 results/
results/
├── sys-leases-renew
│   └── POST
│       └── 500
└── sys-seal
    └── POST
        └── 500

$ openapi-fuzzer-resender --help
Usage: openapi-fuzzer-resender <file> [-H <header>]

Resender of openapi-fuzzer results

Options:
  -H, --header      extra header
  --help            display usage information

$ openapi-fuzzer-resender results/sys-seal/POST/500/1b4e8a77.json
Response[status: 500, status_text: Internal Server Error, url: http://127.0.0.1:8200/v1/sys/seal]
{"errors":["1 error occurred: * missing client token"]}

Future plans

  • Add script for minimization of the findings

Footnotes

  1. not all found bugs are linked

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].