Network analysis rules
You can define network analysis rules that allow you to match the raw data records collected by the system. For example, a rule can be defined to match on flow records with a specific destination IP address or a DNS request for a specific domain name.
Rules can be used in two ways: online and offline:
-
In online mode, a rule is matched to incoming data records as they are collected and analyzed: this can be used to generate alerts for specific activity of interest as soon as it is detected.
-
In offline mode, a rule is matched to historical data records: this can be used to search for a specific activity in past records (within your data-retention limits).
Network analysis rule syntax
A network analysis rule is a combination of clauses that express a condition on attributes of a record type. A rule has the following format:
record_type . attribute relation value
A rule consists of four parts:
-
record_type — The record type to be matched. The following record types are supported:
The record type and its attribute are separated by a dot (
.
). -
attribute — The attribute to be matched. The attributes vary depending on the record type.
-
relation — The relation between the record and its attribute and the value to match for. Supported relation types are:
-
Equality (
:
) -
Inequality (
NOT
) -
Greater than (
:>
) -
Less than (
:<
)
-
-
value — The value to match against the record_type and attribute.
You can search for a value that contains whitespace by surrounding it with single-quotes. For example:
host.os:'Windows 8.1'
Following are the supported combinations of record types and attributes.
Filehash rules
Attribute |
Description |
Examples |
---|---|---|
|
Matches file downloads where a file with the given MD5 hash was downloaded. |
Show which host downloaded a file with the MD5 hash
|
|
Matches file downloads with the given recipient IP address (the downloader). |
Show which files
|
|
Matches file downloads with the given sender IP address. |
Show which host downloaded files from server
|
|
Matches file downloads where a file with the given SHA1 hash was downloaded. |
Show which host downloaded a file with the SHA1 hash
|
These rules are matched in offline mode only and are ignored in online mode.
Host rules
Attribute |
Description |
Examples |
---|---|---|
|
Matches hosts that were found to run the given application (typically, name and version). |
Show which host is running
|
|
Matches hosts that were determined to be the given device category/type. |
Show which host is determined to be a mobile phone or tablet.
|
|
Matches hosts that were found to run the given operating system. |
Show which host is running Android.
Show which host is running Windows 8.1.
|
|
Matches hosts that were found to run the given service. |
Show the SMB servers in the network.
|
These rules are matched in offline mode only and are ignored in online mode.
Kerberos rules
Attribute |
Description |
Examples |
---|---|---|
|
Matches Kerberos messages where the destination host is running the given application. This rule can only be matched in online mode. |
Show messages where the destination host is running Microsoft Word.
|
|
Matches Kerberos messages where the source host is running the given application. This rule can only be matched in online mode. |
Show messages where the source host is running an Apache Web server.
|
|
Matches Kerberos messages where the destination host is determined to be the given device category/type. This rule can only be matched in online mode. |
Show messages where the destination host is determined to be a mobile phone or tablet.
|
|
Matches Kerberos messages where the source host is determined to be the given device category/type. This rule can only be matched in online mode. |
Show messages where the source host is determined to be a server.
|
|
Matches Kerberos messages with the given destination IP (typically, the server). |
Show which Kerberos messages were received by
|
|
Matches Kerberos messages with the given destination port. Port 88 is the standard Kerberos port. |
Show which Kerberos messages were sent to a non-standard port, not port
|
|
Matches Kerberos messages where the |
Show Kerberos messages where the
|
|
Matches Kerberos messages where the |
Show Kerberos messages where the
|
|
Matches Kerberos messages where the destination host has been tagged with the given value. The tag is an arbitrary string assigned to the host. Rules with this attribute are only matched in online mode. |
Show messages where the destination host was tagged as "ceo-laptop".
|
|
Matches Kerberos messages where the source host has been tagged with the given value. The tag is an arbitrary string assigned to the host. Rules with this attribute are only matched in online mode. |
Show messages where the source host was tagged as "server1".
|
|
Matches Kerberos messages with the given client principal name. |
Show Kerberos messages where the cname is the
|
|
Matches Kerberos messages with the given encryption used. |
Show Kerberos messages using
|
|
Matches Kerberos messages with the given message type. |
Show Kerberos error (
|
|
Matches Kerberos messages with the given server realm. |
Show Kerberos messages where the
|
|
Matches Kerberos messages with the given server principal name. |
Show Kerberos messages where the
|
|
Matches Kerberos messages that have weak ( |
Show Kerberos messages using weak encryption.
|
|
Matches Kerberos messages where the destination host is determined to be the given operating system. This rule can only be matched in online mode. |
Show messages where the destination host is determined to be running Windows 10.
|
|
Matches Kerberos messages where the source host is determined to be the given operating system. This rule can only be matched in online mode. |
Show messages where the source host is determined to be running Linux.
|
|
Matches Kerberos messages where the destination host is determined to be running the given service. This rule can only be matched in online mode. |
Show messages where the destination host is determined to be running SMB.
|
|
Matches Kerberos messages where the source host is determined to be running the given service. This rule can only be matched in online mode. |
Show messages where the source host is determined to be running SMB.
|
|
Matches Kerberos messages with the given source IP (typically, a client issuing a request). |
Show which Kerberos messages were issued by
|
These rules are matched in both online and offline mode.
Flow record rules
Attribute |
Description |
Examples |
---|---|---|
|
Matches |
Show all records where the destination host is running Microsoft Word.
|
|
Matches |
Show all HTTPS connections
|
|
Matches |
Show all records where the source host is running an Apache Web server.
|
|
Matches |
Show all records where the destination host is determined to be a mobile phone or tablet.
|
|
Matches |
Show all records where the source host is determined to be a server.
|
|
Matches |
Show all connections to
|
|
Matches |
Show all SSH (port 22) connections
Show connections to all ports except HTTP (port 80)
|
|
Matches |
Show all records where the
|
|
Matches |
Show all records where the
|
|
Matches |
Show all records where the destination host was tagged as "ceo-laptop".
|
|
Matches |
Show all records where the source host was tagged as "server1".
|
|
Matches |
Show all records where the destination host is determined to be running Windows 10.
|
|
Matches |
Show all records where the source host is determined to be running Linux.
|
|
Matches |
Show all records where the destination host is determined to be running SMB.
|
|
Matches |
Show all records where the source host is determined to be running SMB.
|
|
Matches |
Show all connections from
|
|
Matches |
Show all connections to source port
|
These rules are matched in both online and offline mode.
Passive DNS rules
Attribute |
Description |
Examples |
---|---|---|
|
Matches |
Show all records where the destination host is running Microsoft Word.
|
|
Matches |
Show all records where the source host is running an Apache Web server.
|
|
Matches |
Show all records where the destination host is determined to be a mobile phone or tablet.
|
|
Matches |
Show all records where the source host is determined to be a server.
|
|
Matches |
Show all queries to the Google nameservers.
|
|
Matches |
Show queries that resolved to
Show all queries that had any kind of error.
|
|
Matches |
Show all records where the
|
|
Matches |
Show all records where the
|
|
Matches |
Show all records where the destination host was tagged as "ceo-laptop".
|
|
Matches |
Show all records where the source host was tagged as "server1".
|
|
Matches |
Show all records where the destination host is determined to be running Windows 10.
|
|
Matches |
Show all records where the source host is determined to be running Linux.
|
|
Matches |
Show which host attempted to resolve
|
|
Matches |
Show which host requested a lookup of
|
|
Matches |
Show all records where the destination host is determined to be running SMB.
|
|
Matches |
Show all records where the source host is determined to be running SMB.
|
|
Matches |
Show all queries from
|
These rules are matched in both online and offline mode.
SMB rules
Attribute |
Description |
Examples |
---|---|---|
|
Matches SMB messages where the destination host is running the given application. This rule can only be matched in online mode. |
Show messages where the destination host is running Microsoft Word.
|
|
Matches SMB messages where the source host is running the given application. This rule can only be matched in online mode. |
Show messages where the source host is running an Apache Web server.
|
|
Matches SMB messages where the destination host is determined to be the given device category/type. This rule can only be matched in online mode. |
Show messages where the destination host is determined to be a mobile phone or tablet.
|
|
Matches SMB messages where the source host is determined to be the given device category/type. This rule can only be matched in online mode. |
Show messages where the source host is determined to be a server.
|
|
Matches SMB messages with the given command value. |
Show who issued
|
|
Matches SMB messages with the given destination IP (typically, the server). |
Show who issued SMB requests to
|
|
Matches SMB messages with the given destination port. |
Show who issued SMB requests to port
|
|
Matches SMB messages where the |
Show all messages where the
|
|
Matches SMB messages where the |
Show all messages where the
|
|
Matches SMB messages where the destination host has been tagged with the given value. The tag is an arbitrary string assigned to the host. Rules with this attribute are only matched in online mode. |
Show messages where the destination host was tagged as "ceo-laptop".
|
|
Matches SMB messages where the source host has been tagged with the given value. The tag is an arbitrary string assigned to the host. Rules with this attribute are only matched in online mode. |
Show messages where the source host was tagged as "server1".
|
|
Matches SMB messages where the destination host is determined to be the given operating system. This rule can only be matched in online mode. |
Show messages where the destination host is determined to be running Windows 10.
|
|
Matches SMB messages where the source host is determined to be the given operating system. This rule can only be matched in online mode. |
Show messages where the source host is determined to be running Linux.
|
|
Matches SMB messages where the destination host is determined to be running the given service. This rule can only be matched in online mode. |
Show messages where the destination host is determined to be running SMB.
|
|
Matches SMB messages where the source host is determined to be running the given service. This rule can only be matched in online mode. |
Show messages where the source host is determined to be running SMB.
|
|
Matches SMB messages with the given source IP (typically, a client issuing a request). |
Show which SMB messages were issued by
|
These rules are matched in both online and offline mode.
TLS rules
Attribute |
Description |
Examples |
---|---|---|
|
Matches TLS records where the destination host is running the given application. This rule can only be matched in online mode. |
Show all records where the destination host is running Microsoft Word.
|
|
Matches TLS records where the source host is running the given application. This rule can only be matched in online mode. |
Show all records where the source host is running an Apache Web server.
|
|
Matches TLS records where the destination host is determined to be the given device category/type. This rule can only be matched in online mode. |
Show all records where the destination host is determined to be a mobile phone or tablet.
|
|
Matches TLS records where the source host is determined to be the given device category/type. This rule can only be matched in online mode. |
Show all records where the source host is determined to be a server.
|
|
Matches TLS records with the given destination IP (typically, a server receiving a TLS connection). |
Show TLS connections ending at a given host (a Google IP address in this case).
|
|
Matches TLS records with the given destination port. |
Show TLS connections which are not using the default HTTPS port 443.
|
|
Matches TLS records where the |
Show all records where the
|
|
Matches TLS records where the |
Show all records where the
|
|
Matches TLS records where the destination host has been tagged with the given value. The tag is an arbitrary string assigned to the host. Rules with this attribute are only matched in online mode. |
Show all records where the destination host was tagged as "ceo-laptop".
|
|
Matches TLS records where the source host has been tagged with the given value. The tag is an arbitrary string assigned to the host. Rules with this attribute are only matched in online mode. |
Show all records where the source host was tagged as "server1".
|
|
Matches TLS records with the given JA3 hash. |
Show TLS connections with a well-known JA3 hash (listed in the JA3 malicious reputation).
|
|
Matches TLS records where the destination host is determined to be the given operating system. This rule can only be matched in online mode. |
Show all records where the destination host is determined to be running Windows 10.
|
|
Matches TLS records where the source host is determined to be the given operating system. This rule can only be matched in online mode. |
Show all records where the source host is determined to be running Linux.
|
|
Matches TLS records where the destination host is determined to be running the given service. This rule can only be matched in online mode. |
Show all records where the destination host is determined to be running SMB.
|
|
Matches TLS records where the source host is determined to be running the given service. This rule can only be matched in online mode. |
Show all records where the source host is determined to be running SMB.
|
|
Matches TLS records with the given Server Name Indication value. |
Show TLS connections with a given SNI value.
|
|
Matches TLS records with the given source IP (typically, a client setting up a TLS connection). |
Show TLS connections initiated by a given host.
|
These rules are matched in offline mode only and are ignored in online mode.
Webrequest rules
Attribute |
Description |
Examples |
---|---|---|
|
Matches |
Show all records where the destination host is running Microsoft Word.
|
|
Matches |
Show all records where the source host is running an Apache Web server.
|
|
Matches |
Show all records where the destination host is determined to be a mobile phone or tablet.
|
|
Matches |
Show all records where the source host is determined to be a server.
|
|
Matches |
Show which hosts sent HTTP requests to
|
|
Matches |
Show which hosts sent HTTP requests to port
|
|
Matches |
Show all records where the
|
|
Matches |
Show all records where the
|
|
Matches |
Show which hosts sent HTTP requests to
|
|
Matches |
Show all records where the destination host was tagged as "ceo-laptop".
|
|
Matches |
Show all records where the source host was tagged as "server1".
|
|
Matches |
Show which hosts requested
|
|
Matches |
Show all records where the destination host is determined to be running Windows 10.
|
|
Matches |
Show all records where the source host is determined to be running Linux.
|
|
Matches |
Show which hosts sent HTTP requests for resource path
|
|
Matches |
Show all records where the destination host is determined to be running SMB.
|
|
Matches |
Show all records where the source host is determined to be running SMB.
|
|
Matches |
Show the requests made by
|
These rules are matched in both online and offline mode.
Combined rules
You can combine network analysis rules of the same record type with the
AND
and OR
operators:
-
Show which hosts connected to port
4142
on IP address6.6.6.6
.netflow.dst_port:4142 AND netflow.dst_ip:6.6.6.6
Rules on different object types can be combined with OR
(taking the union
of the results provided by each query):
-
Show which hosts downloaded a file with the MD5 hash
d41d8cd98f00b204e9800998ecf8427e
or resolvedevil.com
.filehash.md5:d41d8cd98f00b204e9800998ecf8427e OR pdns.rrname:evil.com
Rules on different object types can also be combined with >>
, taking
the temporal sequence of the results provided by each query.
-
Show which hosts downloaded a file with the MD5 hash
d41d8cd98f00b204e9800998ecf8427e
and then resolvedevil.com
.filehash.md5:d41d8cd98f00b204e9800998ecf8427e >> pdns.rrname:evil.com
The time window used for the offline matching of these rules corresponds to the selected time window in the User Portal, while for online matching, it is set to 1 hour.
Regular expression support
You can use regular expressions and wildcards in network analysis rules. The following fields support regular expressions and wildcards:
netflow.app_layer_protocol
pdns.rrname
webrequest.hostname
webrequest.normalized_url
webrequest.resource_path
Wildcard support
The following wildcards are supported:
-
*
— Matches any character sequence (including an empty string). -
?
— Matches any single character.
Regular expression support
The field value must be wrapped in /
(slash) to
indicate that it is to be interpreted as a regular expression pattern. In a regular
expression pattern, the following regexp operators are supported:
-
.
— Represents any character. -
+
— Repeat the preceding shortest pattern once or more times. -
*
— Match the preceding shortest pattern zero or more times. -
?
— Makes the preceding shortest pattern optional. -
"{}"
— Specifies a minimum and (optionally) maximum number of times the preceding shortest pattern can repeat. -
()
— Define a sub-pattern. -
|
— Defines theOR
operator. -
[]
— Specifies a character range.
Regular expressions are implicitly anchored: the pattern provided must match the entire string.
Escape
To force the field value to be interpreted literally, it must be enclosed in double quotes.
Regex examples
Search for webrequest
records where hostname
starts with
example
:
webrequest.hostname:example*
Search for webrequest
records where hostname
matches the
regular expression ex.+
:
webrequest.hostname:/ex.+/