Rule Conditions
Rule conditions are a powerful tool that enables fine-tuned customization of analytics rules through exclusions, allowing you to adapt the system to their unique needs. As part of the Exabeam domain-specific language, these expressions offer a structured yet flexible way to define and refine the conditions under which data is included or excluded from evaluations. This capability ensures that analytics remain focused, precise, and relevant to the organization's objectives.
Rule Expressions are at the core of configuring exclusions for rules. By leveraging these expressions, you can specify conditions to exclude certain events, users, or behaviors from triggering alerts or being flagged for analysis. This process helps eliminate noise, reduce false positives, and tailor the system to prioritize what matters most.
For example:
You might want to exclude routine administrative logins from being flagged as suspicious.
Or you might exclude specific IP ranges commonly used by internal systems from being considered as potential attack vectors.
Refer to the following topics for the full set of allowable expressions:
Key Features that Enable Effective Exclusions
Rule conditions offer several features that make them highly effective for tuning rules through exclusions. These features ensure that analytics rules remain precise, adaptable, and focused on what matters most.
Boolean Logic for Precision
Rule Expressions use Boolean operators like AND
, OR
, and NOT
to create precise exclusion criteria.
The following expression excludes login events from specific IPs unless the user is an administrator:
((src_ip == "192.168.1.1" || src_ip == "192.168.1.2") && EventType == "Login") && NOT(user == "admin")
Dynamic Context from Event Fields
By referencing event fields directly in the expressions, exclusions can dynamically adapt to the actual data flowing through the system.
This expression dynamically identifies and excludes events for a specific user-device combination:
concat(user, "-", src_host) == "robert-MBP123"
String Operations for Granular Conditions
String functions like startswith
, endswith
, and concat
allow for highly specific exclusions.
This expression excludes emails sent from internal automated systems:
startswith(src_email, "noreply") && endswith(src_email, "@company.com")
Case Insensitivity for Simplicity
Rule functions are case-insensitive, simplifying their usage and reducing errors in complex exclusion logic.
The following expressions are equivalent:
startsWith("anip", user)
STARTSWITH("anip", user)
Nesting and Parentheses for Complexity
Parentheses and nested expressions make it easy to combine multiple conditions into a single rule, enabling nuanced exclusions.
The following expression ensures the exclusion applies to all but guest roles:
((true || false) && NOT(role == "guest"))
General Expressions
These Expressions perform general operations such as mathematical calculations or basic data evaluation:
Expression | Description |
---|---|
| Adds numerical arguments. Example: |
| Returns the least integer greater than or equal to the argument. Example: |
| Returns the greatest integer less than or equal to the argument. Example: |
|
Performs division of Example: |
| Returns the first expression that evaluates to true, non-empty, or non-zero. Example: |
| Formats arguments according to a specified format string. Example: |
| Optimized "or" chain for matching field-value conditions. Example: |
String Expressions
Expressions for manipulating or evaluating string data:
Expression | Description |
---|---|
|
Checks if the string |
|
Checks if |
|
Removes all characters after and including the Example: |
|
Removes all characters before and including the Example: |
|
Concatenates multiple values as strings. Example: |
|
Tests whether the string Example: |
|
Tests whether |
|
Removes the first Example: |
|
Removes the last Example: |
|
Tests whether the string Example: |
|
Checks if |
|
Returns the zero-based index of the first occurrence of pattern Example: |
Boolean and Conditional Expressions
Expressions for logical operations and condition evaluation:
Expression | Description |
---|---|
| Logical AND of all expressions. Example: |
| Evaluates the expression Example: |
| Checks if the Example: |
| Checks if all values are defined and non-empty. Example: |
IP and Network Expressions
Expressions specific to IP address evaluation:
Expression | Description |
---|---|
| Checks if Example: |
| Checks if Example: |
| Checks if Example: |
| Checks if Example: |
| Checks if Example: |
| Checks if Example: |
Context Expressions
Expressions involving contextual data or operations:
Expression | Description |
---|---|
| Checks whether the context table Returns Example: |
| Identifies unauthorized access attempts by users outside the specified department. Example: If |
| Verifies if a URL's domain belongs to a list of suspicious domains. Example: If |
Entity Expressions
Expressions that interact with entities and their attributes:
Expression | Description |
---|---|
| Checks if the entity matching the Example: |
| Retrieves the value of the attribute Example: |
| Determines if the entity matching the Example: |
| Checks if the entity's attribute equals the given value. The comparison can be case-sensitive or insensitive. Example: |
| Retrieves the entity ID for the entity matching the Example: |