Skip to content

v2.4.0

Latest

Choose a tag to compare

@thomaspatzke thomaspatzke released this 05 Dec 00:33
· 1 commit to main since this release

What's Changed

Security

  • YAML alias expansion is checked for whole documents, for the single-rule and filter APIs, for !!pairs/!!set containers, aliased long strings and for merged global content (GHSA-x727-7hm6-538x)
  • Regular expressions of field name conditions use the regex engine of the pipeline's policy, nested pipelines use the policy of the enclosing pipeline (GHSA-2fxv-5639-4742)
  • A processing pipeline identifier that is registered resolves to that pipeline even if a file or directory with the same name exists in the working directory. Use ./name to refer to the path (GHSA-6r2q-mjwr-4p8v)
  • Chained processing pipeline transformations can't grow a rule without bound: the number of detection items and values and the length of string values are limited (GHSA-m9r6-fg8x-98q2)
  • Limits for stacked modifiers, the condition tree, queries referenced by correlation rules and for global/repeat merging in rule collections (GHSA-9m8f-2h3v-xfjg)
  • sigma.matching: correlation state is limited per group and in the number of groups, lone surrogates in event values no longer abort matching (GHSA-jwqg-mxqc-55x8)
  • Postprocessing items, finalizers and query expressions are limited in the size of queries and output (GHSA-854w-qf3w-rgr2). This does not limit the memory and CPU used while a Jinja2 template is rendered; only the finished output is checked. Don't render templates of untrusted pipelines without further resource limits

New Features

  • New SigmaPolicy settings, all positive integers or None (no limit):

    Setting Default
    max_rule_elements 100000
    max_rule_string_length 1000000
    max_collection_expansion 500000
    max_condition_nodes 50000
    max_correlation_query_length 10000000
    max_modifier_growth 100000
    max_query_size 10000000
    max_output_size 100000000
  • Combining pipelines with different limits (pipeline_a + pipeline_b) uses the smaller, stricter value of each limit. None means no limit. Other differences between policies still raise SigmaPolicyError

  • SigmaCollection.load_ruleset() accepts a policy

  • SigmaMatcher takes max_correlation_state (10000) and max_correlation_groups (100000) and offers correlation_state_statistics

Behaviour changes

  • Rules, rule collections and pipelines that exceed the new limits are rejected with a SigmaError (for example SigmaModifierError, SigmaConditionError, SigmaCollectionError, SigmaTransformationError). The limits can be raised or disabled with the policy settings above
  • SigmaMatcher raises a SigmaConfigurationError when the threshold of a correlation rule (e.g. event_count >= N) is larger than max_correlation_state
  • sigma.matching correlation windows: entries behind the end of the time window of a newer event are no longer counted, and timestamps with and without time zone can be mixed
  • The JSON finalizer accepts an indent from 0 to 16 only
  • The concat finalizer treats a single string as one query instead of joining its characters
  • Query expressions are formatted in the sandboxed formatter: widths and precisions above 1000 and underscore attributes are rejected
  • A registered pipeline identifier now takes precedence over a file or directory with the same name

Full Changelog: v2.3.0...v2.4.0