PortSet

Represents a set of listening ports.

Tag Attributes

These are XML attributes of the tag itself, as opposed to the attributes of the Entity monitored by Integrity Monitoring Rules.

Attribute Description Required Default Value Allowed Values
onChange Will be monitored in real time No false true, false
Entity Set Attributes

These are the attributes of the Entity that can be monitored by Integrity Monitoring Rules.

Meaning of "Key"

The key is in the following format:

<PROTOCOL>/<IP ADDRESS>/<PORT>

For example:

tcp/172.14.207.94/80
udp/172.14.207.94/68

IPV6

If the IP address is IPv6 the key is in the same format, but the protocol is TCP6 or UDP6 and the IP address is an IPv6 address as returned by the getnameinfo API:

tcp6/3ffe:1900:4545:3:200:f8ff:fe21:67cf/80
udp6/3ffe:1900:4545:3:200:f8ff:fe21:67cf/68

Matching of the Key

This is not a hierarchical key, so ** is not applicable. Unix-style glob matching is possible using * and ?. The following pattern matches port 80 on the IP addresses 72.14.207.90 through 72.14.207.99:

*/72.14.207.9?/80

The following pattern matches port 80 on the IP addresses 72.14.207.2, 72.14.207.20 through 72.14.207.29 as well as 72.14.207.200 through 72.14.207.255:

*/72.14.207.2*/80

The following pattern matches port 80 on any IP.

*/80

The following example would monitor for any change in the listening ports but ignore port 80 for TCP in IPV4 and IPV6:

<PortSet>
<include key="*"/>
<exclude key="tcp*/*/80"/>
</PortSet>

Sub Elements

See the general description of include/exclude for their allowed attributes and sub elements. Only information specific to include/excludes relating to this EntitySet class are included here.

Special attributes of Include/Exclude for PortSets:

Various other attributes of the port may be used in include/exclude feature tests. These tests compare a value against the value of an attribute of the port; take note of the platform support for various attributes - not all attributes are available across platforms or even platform revisions, hence the use of these tests in include/exclude tags is of limited use. The feature tests support Unix glob-style wildcarding with * and ?, and there is no normalization of path separators or other characters - it is a simple match against the value of the attribute.

Path

Checks for a wildcard match against the path attribute of the port. The following example would monitor ports owned by processes running the main IIS binary:

<PortSet>
<include path="*\system32\inetsrv\inetinfo.exe"/>
</PortSet>

Process

Checks for a wildcard match against the process attribute of the port. The following example would monitor ports owned by anything running in a svchost.exe or outlook.* binary:

<PortSet>
<include process="svchost.exe"/>
<include process="outlook.*"/>
</PortSet>

User

Checks for a wildcard match against the user attribute of the port. The following example would monitor ports on a Unix system that were owned by the super-user (root):

<PortSet>
<include user="root"/>
</PortSet>