Replies: 6 comments 12 replies
-
First of all thanks for your contribution and an Interesting proposal indeed. I have a couple of questions first. 1st point is who would provide these "defeats"? Because from what I Understand these are specific to organizations and how they want to apply (or in this case not apply) certain rules depending on certain conditions. Basically, it requires specific knowledge of the org itself. So it cannot be community driven to a certain extent. And in the case where the "defeat" condition is "generic" enough it would be equal to a filter since it would be considered an FP to the rule. 2nd point is. Why make it part of SIGMA if it's specific and different on an org-by-org basis and also backend-dependent? Meaning why would someone write in SIGMA rather than his own backend language? I think of this as typical work of detection/analyst teams. They know their env the best and they choose to apply or remove certain rules based on their knowledge and the tools available to them from a backend perspective (similar to how you showed the example with Splunk). Please correct me if I'm wrong in my understanding. Cheers. |
Beta Was this translation helpful? Give feedback.
-
For me there are 3 completely different things:
Having a way to manage not filter but specific FP in the specifications is a good thing. name: Exclude common administration accounts
description: WHY I do it
ids:
- 12345678-bef0-4204-a928-ef5e620d6fcc # rules/windows/builtin/...
- 91011121-bef0-4204-a928-ef5e620d6fcc # rules/windows/builtin/...
- 31415161-bef0-4204-a928-ef5e620d6fcc # rules/windows/builtin/...
logsource:
exclution:
service_accounts:
AccountName|startswith:
- SVC_
Usage Case:
The converter should work "Signa condition AND NOT sigma exclution" I want to keep this case as simple as possible. |
Beta Was this translation helpful? Give feedback.
-
I really like the idea because of three reasons:
What I don't like is the term "defeats". For me it has a negative connotation. I'd like to propose a different name. It should reflect the function of the rules in the most generic form OR the function for what they're most commonly used. My proposals:
|
Beta Was this translation helpful? Give feedback.
-
The more I think about it, the more I like it 😊 I think the concept fits quite well into the existing Sigma specification and pySigma. The first idea that came into my mind: defeats already look mostly like Sigma rules, why shouldn't we make special-purpose Sigma rules out of it? There's already the Technically, some of the enhancement required for Sigma correlations could also be used for defeats. I plan to implement the dependency resolving into the
The advantage of putting defeats in the front of the Sigma rule conversion process would be that all the rule handling stuff, especially processing pipelines, could be reused for defeats. This would include field name mappings and value transformations as well as generation of lookups from placeholders, like it's done in this example. There must also be no backend support for defeats because all the magic would happen in the Sigma rule preprocessing stage before the backend comes into play. So far I don't believe that Challenge 3 is really one. Regarding the condition I like the idea of @frack113 to define it via the I think we should define defeats as extension to Sigma in a dedicated specification document like we've done with correlations. For the name I would prefer "Sigma Filters", but I'm also fine with naming it "Sigma Defeats" 😉 |
Beta Was this translation helpful? Give feedback.
-
Awesome feedback everyone. I'll be compiling the spec hopefully across this next coming week with implementation across by mid Feb. I'm fairly sure I'm going to name it "Local Filters" (as the best interpretation as someone who is familiar with the concept of "Global Filters", that also gives the best OOTB explanation. Docs could then just contain a section called "Filters" that explain both techniques. |
Beta Was this translation helpful? Give feedback.
-
Added in https://github.com/SigmaHQ/sigma-cli/releases/tag/v1.0.3, closing as complete |
Beta Was this translation helpful? Give feedback.
-
Hi Team,
I've drafted the following proposal on a problem that I had at my previous role. Please let me know your thoughts and if there's anything you're currently doing to fill this gap.
Proposal
Defeats are a way to collect and apply false positives to Sigma rules.
Abstract
Defeats are designed to sit alongside Rules as a method of preventing future false positives when implementing Sigma rules. They answer the question of:
or
The advantages that Defeats have over using the existing
filter
strategy are:These are located in files separated from the Sigma rule itself.
Defeats can but shouldn't replace the commonly seen pattern of including
filter
as a part of the Sigma rule. This strategy of usingfilters
in a Sigma rule should be kept in-place, where everyone in the community can benefit from a contribution of a Pull Request to prevent known false positives.Naming
The name of a "Defeat" came from an analyst team "defeating" reoccurring false-positives as part of the tuning process. Name is not final and is likely to change in later revisions.
Versioning
Defeats are proposed to be implemented in Sigma version 2 and above.
Backwards compatibility
This proposal ensures backwards compatibility by not modifying the existing Sigma rule specification, and exists as an entirely optional feature.
Implementation
Similar to other Sigma standards, Defeats are YAML files that would sit alongside a repository of rules, typically under the
defeats/
directory. They would supply information about when a given detection should not trigger.Some examples of this could include:
Defeats would act as a standard interface that backends can support within pySigma's pipeline hooks.
In the case of Splunk (or other backends that can include CSV lookups) their implementation strategy for defeats could include:
as a method of not bloating out the search string itself. Other backends can inline Defeats within searches.
Usage
Defeats should be applied by passing an additional optional flag to the
sigma-cli convert
command as-D
or--defeat
.The existing method of detection should be used as to not overcomplicate the intent to new users.
ids
field is used to list the rules in which the defeats applies.Applied to an existing rule, you would see the following after conversion.
Basic Interpretation
Complex Interpretation
Challenges
filter
in rules (essentially don't remove)Development
The following developers take on the responsibility of providing the PR as part of pySigma.
Contribution
This proposal welcomes any feedback / changes. When doing so, please ensure constructive feedback if at all possible.
Beta Was this translation helpful? Give feedback.
All reactions