27.3. IPS Signature Management

Supported Types of IPS Signature Files

The IPS subsystem can make use of the following types of IPS signature files:

Vendor Signature Types

The signatures in the vendor file can be further broken down into the following types:

Signature File Uploading

All signature files are stored on the firewall in a folder called ipssigs. File uploading is done using SCP. A typical SCP client upload command might look like the following:
> scp custom.sig admin@192.168.26.200:ipssigs/
Note that SSH access should be enabled for SCP to function.

The following should be noted about signature file uploading:

Activating Signature Files

The ips command is used to activate a vendor or custom signature file:
System:/> ips -activate my_file.sig
The following should be noted about signature file activation:

Signature File Validation

cOS Stream verifies the validity of signature files used with the IPS subsystem when they are activated. Files that are found to be invalid will produce an explanatory message on the console. Below is an example console message that indicates activation of the file my_file.sig has failed because it is invalid:
 File 'my_file.sig' is not a valid signature file.

When activating custom signature files only, the following additional steps are performed first, before trying to validate the file further:

Note that if a signature file is invalid at activation time, it is not deleted and continues to appear in the list of available signature files.

Signature File Deletion

Any active signature file, vendor or custom, can be deleted using the ips -remove command:
System:/> ips -remove my_file.sig
Inactive files cannot be deleted in this way but, as mentioned previously, will be deleted automatically if cOS Stream restarts.

Browsing Signature Files

The ips command can be used to browse through all signature files. For example, to show all the currently active signature files:
System:/> ips -show=file

File        Origin  Status
----------  ------  ------
vendor.sig  Vendor  Active
custom.sig  Custom  Active

To display all the categories available in the signature files:

System:/> ips -show=category

         IPS Signature categories

Category                   # of signatures
-------------------------  ---------------
custom.sig                               1
IPS_WEB_POLICY                          43
IPS_WEB_PACKAGES                         7
IPS_WEB_ACTIVEX                          1

Note here that all the signatures in the custom.sig file are listed as one single category that has the same name as the file. The other categories are found in the active vendor file.

To now view the signatures in one of the categories, name the category and use the -verbose option:

System:/> ips -show=category IPS_WEB_ACTIVEX -verbose
		
Category            Origin       SID  Signature
------------------  ------  --------  ------------------------------------
   IPS_WEB_ACTIVEX  Vendor  20041463  VerifyPackageCatalog.SiteMgr.ActiveX
                    Vendor  20047813  npdivx.DivX.ActiveX.A.Policy

The following command shows all the signatures in categories that begin with IPS_WEB_:

System:/> ips -show=category IPS_WEB_* -num=50 -verbose

The -verbose option must be used to show the whole signature instead of just the number of matching signatures. The -num option will cause only 50 matching signatures to be shown at a time. The -num option has a default value of 20. Note that the signature search is always through the active vendor file first and then any active custom files.

Displaying Currently Active Signatures

The ips -show=rule command can be used to display the number of signatures that all currently configured IPSRule objects can trigger during IPS processing:
System:/> ips -show=rule
				
              IPS Rules

Rule          Ignore  Audit  Protect
------------  ------  -----  -------
1(IPSRule_1)       0      1       42
Alternatively, the command could have shown the signatures for a particular rule but note the rule reference must be qualified with the IntrusionPrevention object prefix:
System:/> ips -show=rule  IntrusionPrevention/1
Adding the -verbose option will display the individual signatures:
System:/> ips -show=rule IntrusionPrevention/1 -verbose
		
                        IPS Signatures by Rule IPSRule_1

Rule          Action   Origin       SID  Signature
------------  -------  ------  --------  ------------------------------
1(IPSRule_1)  PROTECT  Vendor  20049377  CAB.File.Policy
              PROTECT  Vendor  20031289  CONNECT.HTTP-TUNNEL.POLICY
              PROTECT  Vendor  20046620  content.UUSee.Policy

Similarly, the -show=group option can show the number of signatures that are included in IPSSIgnatureGroup objects:

System:/>  ips -show=group IntrusionPrevention/my_grp
		
 IPS Signature Groups

Group   # of signatures
------  ---------------
my_grp                1

Adding the -verbose option will list the signatures:

System:/>  ips -show=group IntrusionPrevention/my_grp -verbose
		
                IPS Signatures by group my_grp

Group   Origin       SID  Signature        Category
------  ------  --------  ---------------  -----------------
my_grp  Vendor  20049378  ZIP.File.Policy  IPS_WEB_POLICY

Snort File Usage

As mentioned, a custom signature file is in Snort format and these can be created by third parties or by the system administrator. Snort is described in depth at https://snort.org. The standard form of Snort signatures is a filter followed by options:
action protocol src-net src-ports direction dest-net dest-ports ( options )
However, it is important to be aware of how some Snort file conventions are interpreted by cOS Stream and what limitations exist. This is described next.