This section explains how to perform advanced editing of custom risk items. For information on custom risk items, see Customize risk profiles.
Overview
You can customize Risk Profiles by defining custom risk items. Custom risk items allow you to define more complex risks by composing the XQL query of your choice. For example, you can define risks for the following types of allowed traffic:
Group of several services from X to Y
Insecure external access to device
Over N machines can manage your device
TCP on over M ports can enter your network
"From A to B with service C" rules
All operators used in risk item XQL queries are standard XQL operators: $eq$, $ne$, $lt$, $gt$, $and$, $or$, $match$ (checks against a regular expression, e.g. '/abc[de]/'), $no_match$, brackets().
Risk item types
AFA supports the following types of risk items:
Type
Description
Traffic
Relates to risks regarding traffic allowed through the device.
This type of risk item can be used to detect risky traffic allowed by the device.
In standard risk items, this type is represented by the letters D,J,Z,K,I,S,O,M,E, C. In custom risk items, this type is represented by the letter U.
Host Group
Relates to risks regarding host group definitions.
This type of risk item can be used to detect certain host groups defined on the device, according to specific criteria.
In standard risk items, this type is represented by the letter H. In custom risk items, this type is represented by the letter U.
Properties
Relates to risks regarding device property definitions.
This type of risk item can be used to detect the value of certain device properties.
In standard risk items, this type is represented by the letter P. In custom risk items, this type is represented by the letter U.
Rules
Relates to risks regarding rule definitions.
This type of risk item can be used to detect specific rules in the policy, for example rules with "Any" as their source and so on.
In standard risk items, this type is represented by the letter R. In custom risk items, this type is represented by the letter U.
This section describes the type of traffic between the source and destination zones (specified in QIndex) that will trigger the risk. In the preceding example, a traffic query issued to the device simulation engine will trigger this risk if the service is HTTP and the number of affected destination IP addresses is over 256.
Parameters
@srv
The service that was queried.
@action
The action that occurred:
PASS. Traffic was passed by the device.
DROP. Traffic was blocked by the device.
@is_external_src
Indicates whether the source zone of the traffic is external or not:
yes. The source zone is external.
no. The source zone is not external.
@n_src_impact_ips
The total number of source IP addresses detected as relevant for this query.
@n_dst_impact_ips
The total number of destination IP addresses detected as relevant for this query.
@n_TCP_dst_ports
The total number of destination TCP ports detected as relevant for this query.
@n_UDP_dst_ports
The total number of destination UDP ports detected as relevant for this query.
This section describes the type of traffic query results that will trigger the risk. In the preceding example, the traffic must be not encrypted in order for this risk to be triggered.
Parameters
@srv
The service that was queried.
@app
The application that was queried.
@is_vpn
Indicates whether encrypted traffic should trigger the risk or not.
yes (default): Encrypted traffic should trigger the risk
no: Encrypted traffic should not trigger the risk
@pass_rule
The name of the rule that is relevant for this traffic in AFA.
@n_risky_src_ips
The total number of source IP addresses detected as risky for this query.
@n_risky_dst_ips
The total number of destination IP addresses detected as risky for this query.
This query checks whether the pre-defined "Trusted_hosts" object (which represents servers that can manage this firewall) contains a certain number of IP addresses.
Property risk items are used to detect the value of certain firewall properties. These properties are extracted by AFA during analysis. For a full list of properties, refer to the properties.xml file in the relevant report directory.
Note: Properties will differ between firewall vendors. Parameters can be created for Check Point firewalls from the asm.C file.
Note: AFA performs these queries on its internal "Expanded rules". To see these rules in your device report, go to Explore Policy -> Expanded Rules.
Assessment and remedy keywords
The following keywords can be added to risk item assessments and remedies, for richer user-defined risk descriptions in the report. Keyword use is optional.
Sometimes due to caching issues, 0 search results are returned for every query . When this happens try pressing SHIFT+F5 several times to clear your browser’s cache.
You can search for a complete word or number string.
Note
The full text search is not case-sensitive. For example, a search for the word "run" will find matches for "Run" and "run." The full text search also matches with variant endings. For example, a search for the word "run" will also find matches for words such as, "runner," "running," and "runs."
You can search for phrases by enclosing their search terms in quotation marks (" "). This is useful when you want to restrict a search to locate terms that appear in an exact order.