Proteggiamo il tuo ambiente digitale da qualsiasi attacco informatico. Sfrutta tutte le potenzialitร  della piattaforma SGBox!

Gallery

Contatti

Via Melchiorre Gioia, 168 - 20125 Milano

info@sgbox.it

+39 02 60830172

Search another article?

You are here:
< Back

LCE โ†’ Rules

๐Ÿ“ Add and modify new rule

This page allows you to create and edit a rule.

A correlation rule is used to alert the admin when an event, or a series of events, occur in a specified time range.

โœ”๏ธ Requirements:

  • A mail server must be configured. Check the Configure a Mail server section for setup instructions.
  • The pattern must belong to a specific class and be assigned to hosts.

Using the SGBox web interface: SGBox โ†’ LCE โ†’ Rules

  1. The plus icon opens the rule creation page.
  2. The play icon redirects the user to the edit page with a test view.
  3. The clone icon opens a modal that allows the user to fill in the name and description fields.
  4. The edit icon redirects the user to the edit page for modifications.
  5. The trash icon highlights the row in red and enables the delete button (6).

LCE Rules

๐Ÿ› ๏ธ Rule Creation Interface

  1. Left Section: Users can select one or more patterns to include in the rule. To choose a category, click on the category navigation button.
  2. Right Section (Pattern/Category Containers): Displays selected elements with their associated parameters. Categories show only common parameters among patterns.
  3. Header Section: Defines time intervals and shows available actions triggered by the Rule Engine.
  4. Bottom Section: Contains the Test and Save buttons.

LCE Rules

Clicking on the Show Actions button opens a sidebar displaying the available actions.

LCE Rules


๐Ÿš€ Actions

โœ‰๏ธ Send Mail

ParameterDescription
RecipientsEnter a list of valid email addresses separated by commas.
Email SubjectWhen triggered, an email with the specified subject will be sent to all recipients.

LCE Rules


๐Ÿ—“๏ธ Generate Event

ParameterDescription
HostThe event will be registered using localhost or the host associated with the event.
ClassThe selected class will be linked to the generated event. You can create a new class if needed.
SubfamilyThe selected subfamily will be associated with the event. The rule inherits its score.
EventSpecify the name and description of the event.
ParametersSelect up to 10 parameters to include in the event. Parameters from different patterns/categories cannot be duplicated.
Issue AggregationRefers to the IM Module.

LCE Rules


โœ๏ธ Generate Log

ParameterDescription
Log Line TextCreates a log entry in SGBox upon rule trigger. View logs via LM โ†’ Analysis โ†’ Historical Search.
Rule PatternDisplays a dropdown with pattern parameters, allowing values to be assigned.

LCE Rules


๐Ÿ“‹ Add To List

ParameterDescription
ListThe selected pattern will be added to the list if not already present.
ParameterThe parameter to add to the selected list.

LCE Rules


</> Execute Script

ParameterDescription
Log Line TextCreates a log entry in SGBox when the rule is triggered. View logs via LM โ†’ Analysis โ†’ Historical Search.
HostSpecify the host (IP address or hostname) where the script is located.
User nameProvide the username for access.
PasswordProvide the associated password.
Script PathSpecify the scriptโ€™s location.
Script ArgumentsArguments passed to the script.
Rule PatternDisplays a dropdown with pattern parameters, allowing values to be assigned.

LCE Rules


๐Ÿ’ป Execute Application

ParameterDescription
ApplicationThe selected application will execute upon rule trigger.
ActionDefines the action the application will perform.
Application ArgumentsArguments passed to the application.
Rule PatternDisplays a dropdown with pattern parameters, allowing values to be assigned.

LCE Rules


๐Ÿ“ฒ Call API

ParameterDescription
API UrlThe URL of the API to call when the rule is triggered.
Data FieldThe selected parameter will be sent via GET request by default.
Use POSTIf enabled, all parameters will be sent using a POST request in JSON format.

LCE Rules


๐Ÿ“Œ Practical Example

This rule is designed to identify suspicious behavior where a failed login attempt to SGBox is immediately followed by a successful login and a user modification action. Such a sequence could indicate an unauthorized attempt to gain access and alter user credentials.

To make the detection more precise, the rule is configured to trigger only outside regular working hours by setting the time interval to Non-Working Hours. Additionally, it applies only if the access attempt is made by a specific user listed in a predefined group. The first pattern is restricted to localhost, meaning only login attempts on the local machine are considered relevant.

To ensure the integrity of the detection process, the rule verifies that all events originate from the same machine by enabling the Previous Host option. This prevents unrelated events from being linked together incorrectly. Furthermore, the Relative Column is used to maintain consistency in event parameters, ensuring that the entire sequence follows a logical flow before triggering an alert.

LCE Rules
LCE Rules

At this point, the rule must be saved. By clicking the Save button in the Bottom Section, a modal window will appear with the following fields:

NameThe name of the rule, which can be up to 255 characters long. This field is required.
DescriptionA description of the rule, which can be up to 255 characters long. This field is also required.
ScoreThe value inherited from the subfamily when the Generate Event action is set. Otherwise, it will default to 0.
Enable RuleIf set to true, the Rule Engine will analyze the event of this rule to determine when to trigger it.
RetentionDefines after how many days the rule’s history will be deleted (this value is displayed on the main page).
TimeoutThis value specifies the number of seconds in which the event chain must occur.

After configuring these parameters, you can confirm the operation and save the rule.

LCE Rules

After saving the rule, the next step is to set an action and notify the administrators when the rule is triggered. To do so, you will need to configure the Send Mail action and save the entire rule.

LCE Rules

Once the action is set, it is important to enable the rule so that it can be considered by the Rule Engine. Additionally, the retention value must be configured appropriately.

LCE Rules

Here is an example of the email that the administrator will receive once the rule is triggered. The email includes the count of the times the rule has been triggered, as well as all relevant patterns and their details, providing the necessary information to ensure proper understanding of the event that occurred.

LCE Rules

โž• Additional Actions:

  • Swap: Swaps the container with the next selected one.
  • Resize: Shrinks the container, displaying only the pattern name.
  • Delete: Removes the pattern from the rule.

LCE Rules

๐Ÿ”Ž Test View

The Test View provides a way to preview events that match the previously defined rule flow. You can access this view by clicking the Test button. In essence, when one or more triggers occur, this view allows you to verify the corresponding events.

The page is divided into two main sections:

  • Upper Section: Displays an intuitive chart that visually represents the event flow.
  • Bottom Section: Lists the events along with their parameter values.

Users can adjust the time range to refine their analysis. However, it is important to note that rules are a powerful toolโ€”using an excessively wide time range may result in long processing times.

When filters are applied, they appear on the left side of the interface, as shown in the image below. Otherwise, the chart expands to occupy the full available space.

Clicking on an event in the chart automatically filters the table below to display relevant details.

  • N/A indicates that the pattern does not collect that specific parameter.
  • Please note: To ensure an accurate test, make sure that the latest changes have been saved before executing the test.

LCE Rules

๐Ÿ”ง Operators

The various operators are explained below:

OperatorDescription
EqualsMatches values that are exactly the same.
DiffersMatches values that are different.
Greater thanMatches values that are strictly greater than the specified value.
Lower thanMatches values that are strictly lower than the specified value.
Greater or equalMatches values that are greater than or equal to the specified value.
Lower or equalMatches values that are lower than or equal to the specified value.
Contains a substringMatches values that include a specified substring.
Belongs to a setMatches values that exist in a predefined set.
Does not belong to a setMatches values that do not exist in a predefined set.
Belongs to a networkMatches IPs that are within a specified network range.
Does not belong to a networkMatches IPs that are outside a specified network range.
Belongs to a time rangeMatches values that fall within a specific time range.
Does not belong to a time rangeMatches values that fall outside a specific time range.
Belongs to a set - regexpMatches values that conform to a regular expression within a predefined set.
Does not belong to a set - regexpMatches values that do not conform to a regular expression within a predefined set.
Belongs to a set - regexp (case insensitive)Matches values (case insensitive) that conform to a regular expression within a predefined set.
Does not belong to a set - regexp (case insensitive)Matches values (case insensitive) that do not conform to a regular expression within a predefined set.
Regular expression searchMatches values using a specified regular expression.
Regular expression search (case insensitive)Matches values using a case-insensitive regular expression.
host:port corresponds to a vulnerable host:portMatches hosts and ports that are identified as vulnerable.
host:port is associated with a known vulnerabilityMatches hosts and ports linked to documented vulnerabilities.
This host has been tested with NVS moduleMatches hosts that have been analyzed using the NVS module.
host:port is downMatches hosts or ports that are unreachable.
host:port is upMatches hosts or ports that are active and reachable.
A value in left set belongs to a value in right setMatches when at least one value from the left set is present in the right set.
This value has a reputationMatches values that have a known reputation score.
Belongs to a listMatches values that exist in a predefined list.
Does not belong to a listMatches values that do not exist in a predefined list.
Is longer thanMatches values that exceed a specified length.
Is shorter thanMatches values that are below a specified length.
Belongs to a list (exact match)Matches values that exactly match an entry in the list.
Matches with listMatches values that have at least one common element with a predefined list.
Match with regex listMatches values against a list of regular expressions.