Closed ancailliau closed 2 years ago
Apologies for the late reply, was going to respond this morning but I got waylaid at the office!
Yeah so this is a pretty standard problem when it comes to generalised rule formats, I thought I had added type coercing support into the mapping files but I must have forgotten. I will get that done tomorrow, it will probably end up looking something like this:
...
- name: Event ID
from: EventID
to: int(Event.System.EventID.$value)
...
Thanks for the thorough minimal example btw, that will make it much easier for me to add the feature in.
@ancailliau when you get time if you could test the master branch that would be great. Thanks again for filing this as I found a bug in the mapper as well :)
Sorry, I did not see your comment. I'll test as soon as possible and provides feedback.
JSON parser parses 5 as an integer while XML parser parses as a string. We can't write a rule that would match on the same events represented in XML or JSON.
Assuming two simple examples
test.json
and
test.xml
With their respective mappings:
This Sigma rule only triggers on the JSON file.
This Sigma rule only triggers on the XML file.
A single rule is expected to match on both JSON and XML file.