Skip to content

Commit

Permalink
Add latest http fuzzers
Browse files Browse the repository at this point in the history
  • Loading branch information
en-milie committed Nov 6, 2023
1 parent 8e8c7e4 commit b944aab
Show file tree
Hide file tree
Showing 11 changed files with 181 additions and 1 deletion.
17 changes: 17 additions & 0 deletions docs/fuzzers/http-fuzzers/empty-body.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
hide_table_of_contents: true
---

# Empty Body

| Item | Description |
|:------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Full Fuzzer Name** | EmptyBodyFuzzer |
| **Log Key** | **EBF** |
| **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. |
12 changes: 11 additions & 1 deletion docs/fuzzers/http-fuzzers/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# HTTP Fuzzers
CATS has currently 7 registered `HTTP` Fuzzers:
CATS has currently 17 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
- `HappyFuzzer` - send a request with all fields and headers populated
- `HttpMethodsFuzzer` - iterate through each undocumented HTTP method and send an empty request
- `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
- `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
- `RandomPositiveIntegerBodyFuzzer` - send a request with a random positive integer body
- `RandomStringBodyFuzzer` - send a request with a random string body
- `RandomUnicodeBodyFuzzer` - send a request with a random unicode string body
- `ZeroDecimalBodyFuzzer` - send a request with decimal 0.0 as body
- `ZeroIntegerBodyFuzzer` - send a request with integer 0 (zero) as body

You can run only these Fuzzers by supplying the `--checkHttp` argument.

Expand Down
17 changes: 17 additions & 0 deletions docs/fuzzers/http-fuzzers/null-body.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
hide_table_of_contents: true
---

# Null Body

| Item | Description |
|:------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Full Fuzzer Name** | NullBodyFuzzer |
| **Log Key** | **NBF** |
| **Description** | This fuzzer will send a request with a `null` 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 a `null` 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/random-negative-decimal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
hide_table_of_contents: true
---

# Random Negative Decimal Body

| Item | Description |
|:------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Full Fuzzer Name** | RandomNegativeDecimalBody |
| **Log Key** | **RNDB** |
| **Description** | This fuzzer will send a request with a random negative decimal 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 a random negative decimal 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. |
Loading

0 comments on commit b944aab

Please sign in to comment.