Create a Directive
Directives customize the payloads used during a scan. Standard directives fuzz request parameters. Path Based directives fuzz URI paths.
Create a Directive
- Open Directives, click New Directive, and choose a type: Standard or Path Based.
- Enter a name, choose visibility, and add payloads (one per line).
- Choose Replace, Append, or Prepend. Optionally add conditions to limit where the directive applies.
- For a path-based directive, optionally select any HTTP methods and Recursive Mode. Methods default to GET.
- Click Create Directive.
To edit a directive, open it from the Directives page and save your changes.
Path-Based Examples
Without a heuristic condition, the payload applies to the path. Recursive Mode also tests each parent path. For example, recursive with replace mode using a payload list including /status on a target /catalog/items/list will test:
/catalog/items/list/status
/catalog/items/status
/catalog/status
/status
Append and Prepend add the payload after or before the target. For /catalog/items:
| Mode | Payload | Result |
|---|---|---|
| Append | .json | /catalog/items.json |
| Prepend | /preview | /preview/catalog/items |
A heuristic condition targets a matching path segment. For /users/8b1c2d3e-4f50-4678-9abc-def012345678/profile, select the UUID heuristic and use a payload like /backup/:
| Mode | Result |
|---|---|
| Replace | /users/backup/profile |
| Append | /users/8b1c2d3e-4f50-4678-9abc-def012345678/backup/profile |
| Prepend | /users/backup/8b1c2d3e-4f50-4678-9abc-def012345678/profile |
Payloads are URL encoded automatically: /Folder 1/status becomes /Folder%201/status. Existing percent escapes and explicitly repeated slashes are preserved.
Add a Directive to a Scan
Open a collection, select Scan Categories, and choose your directive under Directives & Validators. Save the changes and start a scan. The directive runs where its conditions match.
Conditions
Conditions can match a detected heuristic or a value. Standard directives can also filter by parameter location and name. Path-based directives can filter by path and target segments with a detected heuristic. All conditions must match for the directive to be applied.
Location
For standard directives, include or exclude parameters by where they appear in the request:
- Query: URL query parameters, such as
?id=1. - Header: Request headers, such as
X-User-Id. - Cookie: Cookies, such as
session_id. - Path: Parameters in the URI path, such as
/users/{id}. - Body: The entire request body. Use a more specific location to target structured content:
- Form, Json, YAML, Multipart, or XML: Parameters within the corresponding body format.
Heuristics
Heuristics match detected data types: email address, phone number, file path, Markdown, timestamp, URL, or UUID. Standard directives match a parameter's detected type. Path-based directives target each matching path segment, as in the UUID example above.
Parameter Name
Match a parameter's name using a string or regular expression.
Parameter Value or Path
Match a value using a string or regular expression. For path-based directives, this matches the original escaped path. When a heuristic is also selected, it matches each heuristic segment instead.