Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving regex oring #47

Merged
merged 7 commits into from
Dec 17, 2024
Merged

Improving regex oring #47

merged 7 commits into from
Dec 17, 2024

Conversation

arblade
Copy link
Contributor

@arblade arblade commented Dec 10, 2024

  1. I improved the regex oring part, making it cleaner, with clear methods and a readable template.
  2. I added the ability to handle nested fields like Event.EventData.fieldX. Splunk is not allowing dots in regex groups, so I added a field cleaning part. In the case of an Event.EventData.fieldA, we are now getting fieldAMatch instead of Event.EventData.fieldAMatch (which was previously triggering a splunk error in the regex group of the template.

@arblade
Copy link
Contributor Author

arblade commented Dec 14, 2024

Some complements

  • adding a simple matching for cidr as splunk supports fieldA="10.0.0.0/8", see this splunk ref. It supports oring.
  • adding boolean operators as some rules may use boolean and not their string version (like field: true instead of field: 'true' : see this rule which raises an error on the current version).
  • adding fieldref integration (without ORing, maybe later ... )

May fix following issues :

Copy link
Member

@thomaspatzke thomaspatzke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR, thanks a lot!

@thomaspatzke thomaspatzke merged commit 210a51f into SigmaHQ:main Dec 17, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants