SEP: Condition Extension in Temporal Correlation Rules
Author(s)
Nasreddine Bencherchali - @nasbench
Ryan Stillions - @rstillio
SEP Type
New Detection Logic (correlation types, aggregation functions)
Abstract
Allow the expression of complex conditions in temporal correlation rules through the condition attribute, maintaining consistency with standard Sigma rule syntax.
Problem Statement
Currently correlations allow only for the expression of positive matches with a logical AND linking.
In cases where we want to express the absence of events for example, the specification and by extension pySigma does not define a clear syntax on how we should do that.
The proposal is for the specification to allow the usage of negation when referencing rules in correlations through a familiar condition attribute that mirrors the approach used in standard Sigma rules.
Use Cases
The main gain is the ability to express detections with a complex condition for example to express the absence of specific events while maintaining a familiar Sigma syntax pattern that doesn't require rule authors to context switch between standard rules and correlation rules.
Detailed Specification
This change will affect the Related rules section and introduce a new condition attribute to the correlation specification.
Condition
Attribute: condition
Use: optional
Supported Correlation Types:
The condition attribute is supported for the following correlation types:
- temporal
- temporal_ordered
The condition attribute defines the logical relationship between referenced rules using string-based rule identifiers (names or IDs from the rules attribute).
The condition attribute supports:
- Rule identifiers: References to rules defined in the
rules attribute by their name or id.
- Logical operators:
and, or, not.
- Parentheses for grouping:
() to define operator precedence.
condition: rule_A and not rule_B and rule_C
Important: Conditions reference rule identifiers (strings) defined in the rules section, unlike standard Sigma rules where conditions reference map keys (selections) defined in the detection section.
Negation Behavior for Temporal Correlations:
-
For temporal: Rules prefixed with a not keyword in the condition attribute, must NOT produce any matching events within the timespan for the same group-by values. The presence of any negated rule match will exclude that group from the results.
-
For temporal_ordered: Rules prefixed with a not keyword in the condition attribute, must NOT produce any matching events within the timespan for the same group-by values. Negated rules do not affect the ordering requirement of positively referenced rules; only the non-negated rules must appear in the specified order.
Examples
Example 1: Temporal Correlation with Negation
title: Correlation - Successful Login Without MFA Verification
id: 7f8e9d6c-5b4a-3c2d-1e0f-9a8b7c6d5e4f
status: experimental
description: Detects successful authentication events that are not followed by MFA verification
author: Nasreddine Bencherchali
date: 2025-12-04
correlation:
type: temporal
rules:
- successful_login
- mfa_verification
group-by:
- User
- ComputerName
timespan: 5m
condition: successful_login and not mfa_verification
falsepositives:
- Service accounts without MFA
- Legacy systems
level: medium
Example 2: Temporal Ordered with Multiple Filters
title: Correlation - Process Chain Without Expected Parent
id: 8a9b0c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d
status: experimental
description: Detects suspicious process execution chain without legitimate parent spawn
author: Nasreddine Bencherchali
date: 2025-12-04
correlation:
type: temporal_ordered
rules:
- high_privilege_process
- legitimate_parent_spawn
group-by:
- ComputerName
- ProcessId
timespan: 30s
condition: high_privilege_process and not legitimate_parent_spawn
falsepositives:
- Administrative tools
- Software installers
level: high
Backward Compatibility Impact
As @thomaspatzke suggested.
Regarding backend support I think that this should be supported by most backends that already support the current temporal correlations. To maintain backwards compatibility I would add this internally as separate correlation subtype to pySigma, such that existing backends with temporal correlation support continue to work.
Implementation Areas
Implementation Notes
N/A
Submitter Checklist
Implementation Assistance
Yes, I can help with the review of the implementation and documentation.
Additional Context
N/A
SEP: Condition Extension in Temporal Correlation Rules
Author(s)
Nasreddine Bencherchali - @nasbench
Ryan Stillions - @rstillio
SEP Type
New Detection Logic (correlation types, aggregation functions)
Abstract
Allow the expression of complex conditions in temporal correlation rules through the
conditionattribute, maintaining consistency with standard Sigma rule syntax.Problem Statement
Currently correlations allow only for the expression of positive matches with a logical
ANDlinking.In cases where we want to express the absence of events for example, the specification and by extension pySigma does not define a clear syntax on how we should do that.
The proposal is for the specification to allow the usage of negation when referencing rules in correlations through a familiar
conditionattribute that mirrors the approach used in standard Sigma rules.Use Cases
The main gain is the ability to express detections with a complex condition for example to express the absence of specific events while maintaining a familiar Sigma syntax pattern that doesn't require rule authors to context switch between standard rules and correlation rules.
Detailed Specification
This change will affect the
Related rulessection and introduce a newconditionattribute to the correlation specification.Condition
Attribute: condition
Use: optional
Supported Correlation Types:
The condition attribute is supported for the following correlation types:
The condition attribute defines the logical relationship between referenced rules using string-based rule identifiers (names or IDs from the
rulesattribute).The condition attribute supports:
rulesattribute by theirnameorid.and,or,not.()to define operator precedence.Important: Conditions reference rule identifiers (strings) defined in the
rulessection, unlike standard Sigma rules where conditions reference map keys (selections) defined in thedetectionsection.Negation Behavior for Temporal Correlations:
For
temporal: Rules prefixed with anotkeyword in theconditionattribute, must NOT produce any matching events within the timespan for the same group-by values. The presence of any negated rule match will exclude that group from the results.For
temporal_ordered: Rules prefixed with anotkeyword in theconditionattribute, must NOT produce any matching events within the timespan for the same group-by values. Negated rules do not affect the ordering requirement of positively referenced rules; only the non-negated rules must appear in the specified order.Examples
Example 1: Temporal Correlation with Negation
Example 2: Temporal Ordered with Multiple Filters
Backward Compatibility Impact
As @thomaspatzke suggested.
Regarding backend support I think that this should be supported by most backends that already support the current temporal correlations. To maintain backwards compatibility I would add this internally as separate correlation subtype to pySigma, such that existing backends with temporal correlation support continue to work.
Implementation Areas
Implementation Notes
N/A
Submitter Checklist
Implementation Assistance
Yes, I can help with the review of the implementation and documentation.
Additional Context
N/A