fuzzing section of the HTTP request. This allows creating templates for generic Web Application vulnerabilities like SQLi, SSRF, CMDi, etc without any information of the target like a classic web fuzzer. We call this concept as Fuzzing for Unknown Vulnerabilities.
Filters
More often than not, we want to only attempt fuzzing on those requests where it makes sense. For example,- Fuzz Body When Body is Present
- Ignore PreFlight and CONNECT requests
filters section which contains conditions when the template should be executed.
Filters can be considered a twin of matchers in nuclei. They support all matcher types, including DSL, and the only difference is that this serves a different purpose.
For example, to only execute template on POST request with some body, you can use the following filter.
Currently, Only request data like header, host, input, method, path, etc is available, but soon, response data will be available once the support for loading the response along with the request is added.
Part
Part specifies what part of the request should be fuzzed based on the specified rules. Available options for this parameter are - query (default) - fuzz query parameters for URL
Type
Type specifies the type of replacement to perform for the fuzzing rule value. Available options for this parameter are -- replace (
default) - replace the value with payload - prefix - prefix the value with payload
- postfix - postfix the value with payload
- infix - infix the value with payload (place in between)
- replace-regex - replace the value with payload using regex
Key-Value Abstraction
In a HTTP request, there are various parts like query, path, headers, cookies, and body and each part has different in various formats. For example, the query part is a key-value pair, the path part is a list of values, the body part can be a JSON, XML, or form-data. To effectively abstract these parts and allow them to be fuzzed, Nuclei exposes these values askey and value pairs. This allows users to fuzz based on the key or value of the request part.
For example, Below sample HTTP request can be abstracted as key-value pairs as shown below.
part: Query
part: Path
part: Header
part: Cookie
part: Body
Note: XML, JSON, Form, Multipart-FormData will be in kv format, but if the Body is binary or in any other format, the entire Body will be represented as a single key-value pair with key as
value and value as the entire Body.
This abstraction really levels up the game since you only need to write a single rule for the Body, and it will be applied to all formats. For example, if you check for SQLi in body values, a single rule will work on all formats, i.e., JSON, XML, Form, Multipart-FormData, etc.
Mode
Mode specifies the mode in which to perform the replacements. Available modes are -- multiple (
default) - replace all values at once - single - replace one value at a time
Note: default values are set/used when other options are not defined.
Component Data Filtering
Multiple filters are supported to restrict the scope of fuzzing to only interesting parameter keys and values. Nuclei HTTP Fuzzing engine converts request parts into Keys and Values which then can be filtered by their related options. The following filter fields are supported -- keys - list of parameter names to fuzz (exact match)
- keys-regex - list of parameter regex to fuzz
- values - list of value regex to fuzz
Fuzz
Fuzz specifies the values to replace with atype for a parameter. It supports payloads, DSL functions, etc and allows users to fully utilize the existing nuclei feature-set for fuzzing purposes.