Path matrix parameters

There are three ways rules can be created in the system. Rules may be:

When entering rules manually, you specify the path segments of a URL that should be treated as parameters.

The rules use special characters to designate parts of the actual URL that contain parameters. If a URL matches a rule, OpenText DAST parses the parameters and attacks them. Notable components of a rule  are:

Definition of path segment

A path segment starts with ‘/’ characters and is terminated either by another ‘/’ character or by end of line. To illustrate, path "/a" has one segment whereas path "/a/" has two segments (the first containing the string “a” and the second being empty. Note that paths "/a" and "/a/" are not equal. When attempting to determine if a URL matches a rule, empty segments are considered.

Special elements for rules

A rule may contain the special elements described in the following table.

Element Description
* Asterisk. May appear in production defined below; presence in non-path productions means that this part of the URL will not participate in matching (or, in other words, will match anything).
{   }

Group; a named parameter that may appear within the path of the rule. The content has no special meaning and is used during reporting as the name of the attacked parameter. The character set allowed within the delimiting brackets that designate a group {  } is defined in RFC 3986 as *pchar:

pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
pct-encoded = "%" HEXDIG HEXDIG
unreserved = ALPHA  DIGIT - . _ ~
reserved = gen-delims / sub-delims
gen-delims = :  /   ? # [ ] @"
sub-delims = ! $ & ' ( ) * + , ; =

A group’s content cannot include the "open bracket" and "close bracket" characters, unless escaped as pct-encoded element.

The rules for placing * out of path are described below. Within a path segment, any amount of * and {} groups can be placed, provided they’re interleaved with plain text. For example:

Valid rule: /gp/c/*={param}
Invalid rule: /gp/c/*{}

Rules with segments having **, *{}, {}* or {}{} entries are invalid.

For a rule to match a URL, all components of the rule should match corresponding components of the crawled URL. Path comparison is done segment-wise, with * and {} groups matching any number of characters (including zero characters), plain text elements matching corresponding plain text elements of the path segment of the URL. So, for example:

/gp/c/{book_name} is a match for these URLs:

But it is not a match for any of these:

OpenText DAST will treat elements of path segments matched by {…} groups in the rule URL as parameters, similar to those found in a query. Moreover, query parameters of crawled URLs matched by rule will be attacked along with parameters within the URL’s path. In the following example of a matched URL, OpenText DAST would conduct attacks on the format and price parameters and on the third segment of the path (Singularity_Sky):

http://www.amazon.com/gp/c/Singularity_Sky?format=pdf&:price=0

Asterisk placeholder

The “*” placeholder may appear in the following productions and subproductions of the URL:

Benefit of using placeholders

The main benefit of using placeholders is that it enables you to create rules that combine matrix parameters and URL path-based parameters within single rule. For relevant URL

http://www.amazon.com/gp/color;foreground=green;background=black/something?format=dvi

the following rule will allow attacks on all parameters

gp/*/{param}

with the matrix parameter segment being ignored by * placeholder within second segment of the path, but recognized by OpenText DAST and attacked properly.

Multiple rules matching a URL

In the case of multiple rules matching a given URL, there are two options:

For instance, for the following URL

http://mySite.com/store/books/Areopagitica/32/1

the following rules both match

OpenText DAST will try to collect parameters from both rules to ensure the greatest attack coverage, so all three segments (“Areopagitica”, “32” and “1” in the example above) will be attacked.