Kaspersky Unified Monitoring and Analysis Platform

Standard correlation rules

December 4, 2023

ID 221197

Standard correlation rules are used to identify complex patterns in processed events.

The search for patterns is conducted by using buckets

The correlation rule window contains the following configuration tabs:

  • General—used to specify the main settings of the correlation rule. On this tab, you can select the type of correlation rule.
  • Selectors—used to define the conditions that the processed events must fulfill to trigger the correlation rule. Available settings vary based on the selected rule type.
  • Actions—used to set the triggers that will activate when the conditions configured in the Selectors settings block are fulfilled. The Correlation rule resource must have at least one trigger. Available settings vary based on the selected rule type.

General tab

  • Name (required)—a unique name for this type of resource. Must contain 1 to 128 Unicode characters.
  • Tenant (required)—the tenant that owns the correlation rule.
  • Type (required)—a drop-down list for selecting the type of correlation rule. Select standard if you want to create a standard correlation rule.
  • Identical fields (required)—the event fields that should be grouped in a Bucket. The hash of the values of the selected fields is used as the Bucket key. If the selector (see below) triggers, the selected fields will be copied to the correlation event.

    If different selectors of the correlation rule use fields that have different values ​​in events, do not specify these fields in the Identical fields section.

  • Unique fields—event fields that should be sent to the Bucket. If this parameter is set, the Bucket will receive only unique events. The hash of the selected fields' values is used as the Bucket key.

    You can use local variables in the Identical fields and Unique fields sections. To access a variable, its name must be preceded with the "$" character.
    For an example of using local variables in these sections, refer to the rule provided with KUMA: R403_Access to malicious resources from a host with disabled protection or an out-of-date anti-virus database.

  • Rate limit—maximum number of times a correlation rule can be triggered per second. The default value is 100.

    If correlation rules employing complex logic for pattern detection are not triggered, this may be due to the specific method used to count rule triggers in KUMA. In this case, try to increase the value of Rate limit to 1000000, for example.

  • Window, sec (required)—bucket lifetime, in seconds. Default value: 86,400 seconds (24 hours). This timer starts when the Bucket is created (when it receives the first event). The lifetime is not updated, and when it runs out, the On timeout trigger from the Actions group of settings is activated and the bucket is deleted. The On every threshold and On subsequent thresholds triggers can be activated more than once during the lifetime of the bucket.
  • Base events keep policy—this drop-down list is used to specify which base events must be stored in the correlation event:
    • first (default value)—this option is used to store the first base event of the event collection that triggered creation of the correlation event.
    • last—this option is used to store the last base event of the event collection that triggered creation of the correlation event.
    • all—this option is used to store all base events of the event collection that triggered creation of the correlation event.
  • Priority—base coefficient used to determine the importance of a correlation rule. The default value is Low.
  • Order by—in this drop-down list, you can select the event field that will be used by the correlation rule selectors to track situational changes. This could be useful if you want to configure a correlation rule to be triggered when several types of events occur sequentially, for example.
  • Description—the description of a resource. Up to 4,000 Unicode characters.

Selectors tab

A rule of the standard kind can have multiple selectors. You can add selectors by clicking the Add selector button and can remove them by clicking the Delete selector button. Selectors can be moved by using the DragIcon button.

The order of conditions specified in the selector of the correlation rule is significant and affects system performance. We recommend putting the most unique condition in the first place in the selector.

Consider two examples of selectors that select successful authentication events in Microsoft Windows.

Selector 1:

Condition 1. DeviceProduct = Microsoft Windows

Condition 2. DeviceEventClassID = 4624

Селектор 2:

Condition 1. DeviceEventClassID = 4624

Condition 2.  DeviceProduct = Microsoft Windows

The order of conditions in Selector 2 is preferable because it causes less load on the system.

In the selector of the correlation rule, you can use regular expressions conforming to the RE2 standard.

Using regular expressions in correlation rules is computationally intensive compared to other operations. Therefore, when designing correlation rules, we recommend limiting the use of regular expressions to the necessary minimum and using other available operations.

To use a regular expression, you must use the match comparison operator. The regular expression must be placed in a constant. The use of capture groups in regular expressions is optional. For the correlation rule to trigger, the field text matched against the regexp must exactly match the regular expression.

For a primer on syntax and examples of correlation rules that use regular expressions in their selectors, see the following rules that are provided with KUMA:

  • R105_04_Suspicious PowerShell commands. Suspected obfuscation.
  • R333_Suspicious creation of files in the autorun folder.

For each selector, the following two tabs are available: Settings and Local variables.

The Settings tab contains the following settings:

  • Alias (required)—unique name of the event group that meets the conditions of the selector. Must contain 1 to 128 Unicode characters.
  • Selector threshold (event count) (required)—the number of events that must be received by the selector to trigger.
  • Filter (required)—used to set the criteria for determining events that should trigger the selector. You can select an existing filter from the drop-down list or create a new filter.

    Creating a filter in resources

    Filtering based on data from the Extra event field

  • Recovery—this check box must be selected when the Correlation rule must NOT trigger if a certain number of events are received from the selector. By default, this check box is cleared.

On the Local variables tab, use the Add variable button to declare variables that will be used within the limits of this correlation rule.

Actions tab

A rule of the standard kind can have multiple triggers.

  • On first threshold—this trigger activates when the Bucket registers the first triggering of the selector during the lifetime of the Bucket.
  • On subsequent thresholds—this trigger activates when the Bucket registers the second and all subsequent triggering of the selector during the lifetime of the Bucket.
  • On every threshold—this trigger activates every time the Bucket registers the triggering of the selector.
  • On timeout—this trigger activates when the lifetime of the Bucket ends, and is linked to the selector with the Recovery check box selected. In other words, this trigger activates if the situation detected by the correlation rule is not resolved within the defined amount of time.

Every trigger is represented as a group of settings with the following parameters available:

  • Output—if this check box is selected, the correlation event is sent for post-processing: for external enrichment outside the correlation rule, for a response, and to destinations.
  • Loop—if this check box is selected, the created correlation event is processed by the rule chain of the current correlator. This allows hierarchical correlation.

    If both check boxes are selected, the correlation rule will be sent for post-processing first and then to the current correlation rule selectors.

  • Do not create alert—if this check box is selected, an alert will not be created when this correlation rule is triggered.
  • Active lists update settings group—used to assign the trigger for one or more operations with active lists. You can use the Add active list action and Delete active list action buttons to add or delete operations with active lists, respectively.

    Available settings:

    • Name (required)—this drop-down list is used to select the Active list resources.
    • Operation (required)—this drop-down list is used to select the operation that must be performed:
      • Get—get the Active list entry and write the values of the selected fields into the correlation event.
      • Set—write the values of the selected fields of the correlation event into the Active list by creating a new or updating an existing Active list entry. When the Active list entry is updated, the data is merged and only the specified fields are overwritten.
      • Delete—delete the Active list entry.
    • Key fields (required)—this is the list of event fields used to create the Active list entry. It is also used as the Active list entry key.

      The active list entry key depends on the available fields and does not depend on the order in which they are displayed in the KUMA web interface.

    • Mapping (required for Get and Set operations)—used to map Active list fields with events fields. More than one mapping rule can be set.
      • The left field is used to specify the Active list field.

        The field must not contain special characters or numbers only.

      • The middle drop-down list is used to select event fields.
      • The right field can be used to assign a constant to the Active list field is the Set operation was selected.
  • Enrichment settings group—you can modify the fields of correlation events by using enrichment rules. These enrichment rules are stored in the correlation rule where they were created. You can create multiple enrichment rules. Enrichment rules can be added or deleted by using the Add enrichment or Remove enrichment buttons, respectively.
    • Source kind—you can select the type of enrichment in this drop-down list. Depending on the selected type, you may see advanced settings that will also need to be completed.

      Available types of enrichment:

      • constant
      • dictionary
      • table
      • event
      • template
    • Debug—you can use this drop-down list to enable logging of service operations.
    • Description—the description of a resource. Up to 4,000 Unicode characters.
  • Categorization settings group—used to change the categories of assets indicated in events. There can be several categorization rules. You can add or delete them by using the Add categorization or Remove categorization buttons. Only reactive categories can be added to assets or removed from assets.
    • Operation—this drop-down list is used to select the operation to perform on the category:
      • Add—assign the category to the asset.
      • Delete—unbind the asset from the category.
    • Event field—event field that indicates the asset requiring the operation.
    • Category ID—you can click the parent-category button to select the category requiring the operation. Clicking this button opens the Select categories window showing the category tree. You can only select a category with Reactive content type.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.