sigma_to_wazuh icon indicating copy to clipboard operation
sigma_to_wazuh copied to clipboard

Rule mapping issue

Open n00bsteam opened this issue 2 years ago • 10 comments

I think it would be better to use sysmon group matching instead windows if_sid. Example: We have Sigma Rule category like image_load, it corresponds to the event sysmon EventID 7 then we can use <if_group>sysmon_event7</if_group>.

n00bsteam avatar Apr 12 '22 15:04 n00bsteam

Unfortunately due to the amount of rules it will create an Out Of Memory error the way Wazuh builds those group rule dependencies in memory.

theflakes avatar Apr 12 '22 15:04 theflakes

For reference see: https://groups.google.com/g/wazuh/c/hFlw_w-3tnY

theflakes avatar Apr 12 '22 15:04 theflakes

Just tested it and works all good. There only 27 sysmon rules in that groups.

n00bsteam avatar Apr 12 '22 15:04 n00bsteam

here my sysmon base rules: https://github.com/n00bsteam/SigmaWazuhRules/blob/main/sysmon_groups.xml

n00bsteam avatar Apr 12 '22 15:04 n00bsteam

here my sysmon base rules:

https://github.com/n00bsteam/SigmaWazuhRules/blob/main/sysmon_groups.xml

Dude, do you have hash on filecreation? 11id

n0rthl1ght avatar Apr 12 '22 15:04 n0rthl1ght

I've changed the logic to prefer any if_group setting defined in the ini config file. If an if_group setting does not exist for a Sigma logsource.product or logsource.service it will use anything in if_sid it finds for them instead.

theflakes avatar Apr 12 '22 20:04 theflakes

Dude, do you have hash on filecreation? 11id

no

n00bsteam avatar Apr 13 '22 09:04 n00bsteam

I've changed the logic to prefer any if_group setting defined in the ini config file. If an if_group setting does not exist for a Sigma logsource.product or logsource.service it will use anything in if_sid it finds for them instead.

Nice job! Thx!

n00bsteam avatar Apr 13 '22 09:04 n00bsteam

But can you add logsource.category? And will be matched before logsource.service and logsource.product in if_sid?

n00bsteam avatar Apr 13 '22 10:04 n00bsteam

Need to think about this. Category is broader than the other two. I may want to make this the last option actually.

theflakes avatar Apr 13 '22 12:04 theflakes