基于 OpenAPI 规范的黑盒扫描器,可扫描 API 以查找错误。免费使用!
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!
The fuzzer has been used to find bugs in numerous software. Some of the well-known fuzzed software include[^1]:
Kubernetes
Gitea
Vault
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.
To build the fuzzer, you will need to have rust installed.
cargo install openapi-fuzzergit clone [email protected]:matusf/openapi-fuzzer.git
cd openapi-fuzzer
# Install to the $PATH
cargo install --path .
# Or build inside the repo
cargo build --releasepodman pull ghcr.io/matusf/openapi-fuzzerAfter installation you will have the openapi-fuzzer binary available to you, which offers two subcommands - run and resend. The run subcommand will fuzz the API according to the specification and report any findings. All findings will be stored in a JSON format in a results directory (the name of the directory can be specified by --results-dir flag).
If the fuzzer finds a bug it will save the seed that leads to the generation of the payload triggering the bug. Those seeds are saved in a regressions file called openapi-fuzzer.regressions. The seeds will be used in the next runs of the fuzzer to check if the bug persists. You shall save it alongside your project.
When you are done with fuzzing, you can use openapi-fuzzer resend to resend payloads that triggered bugs and examine the cause in depth.
OpenAPI fuzzer supports version 3 of the OpenAPI specification in YAML or JSON format. You can convert older versions at editor.swagger.io.
-i flag. It is advised to fuzz it in two stages. Firstly, run the fuzzer without -i flag. Then check the 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./v1 or /api, however, the specifications are sometimes written without it. Do not forget to include the path prefix in the url.-H flag. It may be useful when you would like to increase coverage by providing some sort of authorization. You can use the -H flag to add cookies too. e.g. -H "Cookie: A=1;". Use a single -H flag when adding multiple cookies as well. e.g. -H "Cookie: A=1; B=2; C=3;".--max-test-case-count flag.--skip-tls-verify flag.Retry-After header. If the header is not present, it will use an exponential backoff algorithm with a starting value of 1 second. After 10 unsuccessful retries, fuzzing of the endpoint is aborted.…When you are done fuzzing you can replay the findings. All findings are stored in the results folder. Name of each file consists of concatenated endpoint, HTTP method and received status code. To resend the same payload to API, you need to run openapi-fuzzer resend and specify a path to the finding file as an argument and a url of the api. You can overwrite the headers with -H flag as well, which is useful, when you need authorization.
…[^1]: not all found bugs are linked
暂无开放 Issues,或尚未同步最近议题。