Closed burnsn1 closed 5 months ago
The original intention of fields
was to describe what is important to the analyst if a breakdown of the event should be shown instead of the whole event. There are lots of other representations that are useful and make sense, I also prefer a stats
aggregation by such fields with first/last seen times, counts and sparklines.
I think a possible solution would be to use a Jinja2 post-processing template that iterates over all fields to generate the stats. Something like {query} | stats {% for field in rule.fields %}values({field}) {% endfor %}
could solve this.
I'd like to have this backend output a dynamic stats command based on the
fields
field.Take this example detection
Output of
sigma convert --target splunk -p splunk_windows rules/example_detection.yml
:I'd like the output to be:
I've tried using a post processing query template transformation but that doesn't provide any field name translations which forces me to create a template per data source which is onerous.
Any thoughts on how I could achieve this with pySigma?