Skip to content

Commit

Permalink
Add documentation for new fuzzers
Browse files Browse the repository at this point in the history
  • Loading branch information
en-milie committed Dec 8, 2023
1 parent 2081101 commit a044de4
Show file tree
Hide file tree
Showing 22 changed files with 221 additions and 30 deletions.
17 changes: 17 additions & 0 deletions docs/fuzzers/http-fuzzers/empty-json-array.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
hide_table_of_contents: true
---

# Empty JSON Array Body

| Item | Description |
|:------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Full Fuzzer Name** | EmptyJsonArrayBodyFuzzer |
| **Log Key** | **EJAB** |
| **Description** | This fuzzer will send a request with a empty `[]` body. The expectation is that APIs will reject the request as invalid. |
| **Enabled by default?** | Yes |
| **Expected result** | `4XX` |
| **Fuzzing logic** | Iteratively **sends** a request with an empty `[]` body for each path and HTTP method |
| **Conditions when this fuzzer will be skipped** | None |
| **HTTP methods that will be skipped** | `GET`, `DELETE` |
| **Reporting** | Reports `error` if: *1.* response code is `404`; *2.* response code is documented, but not expected; *3.* any unexpected exception. <br/><br/> Reports `warn` if: *1.* response code is expected and documented, but not matches response schema; *2.* response code is expected, but not documented; *3.* response code is `501`. <br/><br/> Reports `success` if: *1.* response code is expected, documented and matches response schema. |
17 changes: 17 additions & 0 deletions docs/fuzzers/http-fuzzers/empty-json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
hide_table_of_contents: true
---

# Empty JSON Body

| Item | Description |
|:------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Full Fuzzer Name** | EmptyJsonBodyFuzzer |
| **Log Key** | **EJB** |
| **Description** | This fuzzer will send a request with a empty `{}` body. The expectation is that APIs will reject the request as invalid. |
| **Enabled by default?** | Yes |
| **Expected result** | `4XX` |
| **Fuzzing logic** | Iteratively **sends** a request with an empty `{}` body for each path and HTTP method |
| **Conditions when this fuzzer will be skipped** | None |
| **HTTP methods that will be skipped** | `GET`, `DELETE` |
| **Reporting** | Reports `error` if: *1.* response code is `404`; *2.* response code is documented, but not expected; *3.* any unexpected exception. <br/><br/> Reports `warn` if: *1.* response code is expected and documented, but not matches response schema; *2.* response code is expected, but not documented; *3.* response code is `501`. <br/><br/> Reports `success` if: *1.* response code is expected, documented and matches response schema. |
10 changes: 8 additions & 2 deletions docs/fuzzers/http-fuzzers/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# HTTP Fuzzers
CATS has currently 17 registered `HTTP` Fuzzers:
CATS has currently 23 registered `HTTP` Fuzzers:
- `BypassAuthenticationFuzzer` - check if an authentication header is supplied; if yes try to make requests without it
- `CheckDeletedResourcesNotAvailableFuzzer` - checks that resources are not available through `GET` after a successful `DELETE`
- `DummyRequestFuzzer` - send a dummy json request {'cats': 'cats'}
- `EmptyBody` - send a request with a empty string body
- `EmptyBodyFuzzer` - send a request with a empty string body
- `EmptyJsonArrayBody` - send a request with a empty json array body
- `EmptyJsonBody` - send a request with a empty json body
- `HappyFuzzer` - send a request with all fields and headers populated
- `HttpMethodsFuzzer` - iterate through each undocumented HTTP method and send an empty request
- `InsertRandomValuesInBody` - insert invalid data within a valid request body
- `MalformedJsonFuzzer` - send a malformed json request which has the String 'bla' at the end
- `NonRestHttpMethodsFuzzer` - iterate through a list of HTTP method specific to the WebDav protocol that are not expected to be implemented by REST APIs
- `NullBodyFuzzer` - send a request with a NULL body
- `NullUnicodeBody` - send a request with a \u0000 body
- `NullUnicodeSymbolBody` - send a request with a ␀ body
- `RandomDummyInvalidJsonBody` - send a request with dummy invalid json body
- `RandomNegativeDecimalBodyFuzzer` - send a request with a random negative decimal body
- `RandomNegativeIntegerBodyFuzzer` - send a request with a random negative integer body
- `RandomPositiveDecimalBodyFuzzer` - send a request with a random positive decimal body
Expand Down
17 changes: 17 additions & 0 deletions docs/fuzzers/http-fuzzers/insert-random-values.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
hide_table_of_contents: true
---

# Insert Random Values In Body

| Item | Description |
|:------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Full Fuzzer Name** | InsertRandomValuesInBody |
| **Log Key** | **IRVIB** |
| **Description** | This fuzzer will insert random values in valid request bodies. The expectation is that APIs will reject the request as invalid. |
| **Enabled by default?** | Yes |
| **Expected result** | `4XX` |
| **Fuzzing logic** | Iteratively **inserts** random invalid values in valid request bodies for each path and HTTP method |
| **Conditions when this fuzzer will be skipped** | None |
| **HTTP methods that will be skipped** | `GET`, `DELETE` |
| **Reporting** | Reports `error` if: *1.* response code is `404`; *2.* response code is documented, but not expected; *3.* any unexpected exception. <br/><br/> Reports `warn` if: *1.* response code is expected and documented, but not matches response schema; *2.* response code is expected, but not documented; *3.* response code is `501`. <br/><br/> Reports `success` if: *1.* response code is expected, documented and matches response schema. |
Loading

0 comments on commit a044de4

Please sign in to comment.