Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues
For example, merging the following two configs would result in an incomplete output config:
and
would result in the following merge when using
merge_sysmon_configs.py
:Note that it misses the rule that includes
C:\Windows\SysWOW64\wscript.exe
because the second rule group wasn't processed.2) Both Python and PowerShell implementations for merging configs don't consider the case when rules are outside of the rule group.
The following config is also considered valid:
Note that it doesn't have the
RuleGroup
- this is equivalent to having the rules inside<RuleGroup groupRelation="or">
When trying to merge with such config, the following error is thrown:
Desired result
In both cases, the final merged config should look like this (in my opinion):
Proposed solutions
Comment
Since there is no concrete specification for the Sysmon config, this way of merging is my interpretation of how it should be, however, I might be wrong, so I am open to different opinions :)