REcollapse: black-box regex fuzzing to bypass validations and discover normalizations in WebApps
REcollapse
REcollapse is a helper tool for black-box regex fuzzing to bypass validations and discover normalizations in web applications.
It can also be helpful to bypass WAFs and weak vulnerability mitigations. For more information, take a look at the REcollapse blog post.
The goal of this tool is to generate payloads for testing. Actual fuzzing shall be done with other tools like Burp (intruder), ffuf, or similar.
Installation
Requirements: Python 3
pip3 install –user –upgrade -r requirements.txt or ./install.sh
Docker
docker build -t recollapse .
Usage
Detailed options explanation
Let’s consider this_is.an_example as the input.
Positions
- Fuzz the beginning of the input: $this_is.an_example
- Fuzz the before and after special characters: this$_$is$.$an$_$example
- Fuzz normalization positions: replace all possible bytes according to the normalization table
- Fuzz the end of the input: this_is.an_example$
Encoding
- URL-encoded format to be used with application/x-www-form-urlencoded or query parameters: %22this_is.an_example
- Unicode format to be used with application/json: \u0022this_is.an_example
- Raw format to be used with multipart/form-data: “this_is.an_example
Range
Specify a range of bytes for fuzzing: -r 1-127. This will exclude alphanumeric characters unless the -an option is provided.
Size
Specify the size of fuzzing for positions 1, 2, and 4. The default approach is to fuzz all possible values for one byte. Increasing the size will consume more resources and generate many more inputs, but it can lead to finding new bypasses.
File
Input can be provided as a positional argument, stdin, or a file through the -f option.
Alphanumeric
By default, alphanumeric characters will be excluded from output generation, which is usually not interesting in terms of responses. You can allow this with the -an option.
Maximum number or normalizations
Not all normalization libraries have the same behavior. By default, three possibilities for normalizations are generated for each input index, which is usually enough. Use the -mn option to go further.
Normalization table
Use the -nt option to show the normalization table.
Copyright (c) 2022 André Baptista
Source: https://github.com/0xacb/