quadrantsec/sagan-rules

A question and probable syntax issue in json-input/json-message maps

Closed this issue · 1 comments

Hello,

First I wanted to let you know the username key of the "msapi" pattern within the json-input.map seems to have a leading space.

It is written
" username":".UserId"
Which I believe should be
"username":".UserId"

Second I wanted ask if there is any reason the mappings present in the json-input.map could not also be used in the json-message.map.

I know that for the input map the "software" key is actually used to select the pattern while in the message map it's more of a best match across all fields wins evaluation and the "software" key is ignored. That said I noticed a difference in that currently the input map leverages a newly added feature ("|") to alternate values for a key.

I looked at the source trying to determine if the input and message map both support this alternation using "|" and best I can tell is they use the same set of functions to feed the json parser so yes | should work in either json map?

I tested moving the msapi rules over and it ran but invariably I would end up with a segfault after varying amount of time.

Thanks!