Conversation
This adds support to specify multiple conditions to match a rule. Syntax: multi:<match_condition1>;<match_condition2>;...<match_conditionN>; Examples: Match all rules including the term "nmap" but just from the "emerging-scan.rules" file. multi:filename:rule/emerging-scan.rules; re:nmap; Match all rules with a recent cve reference and a perimeter deployment multi:re:cve-202[23];metadata: deployment perimeter; Ticket: #2509
|
Sorry for taking so long to get to this. One issue I have is not all valid regex's are supported. For example: works... but: appears to work, but actually fails to properly load as it will only take up to the |
|
That's a good point. My quick idea would be to use a [TAB] as a delimiter. A good regex would use Certainly its a good idea to throw some warning or error if a child matcher is not a valid one. I think that would happen with with your example. |
Yeah, I'm not sure either. It was not created with more parameters on a line than one in mind... Proper quoting could work, but also a breaking change as we don't currently require quoting now. |
|
After some thoughts i would suggest to use So your example combined with some other matchers would look something like this. Why i like this solution:
If that's an acceptable solution i would go ahead and implement it. |
Make sure these boxes are signed before submitting your Pull Request
-- thank you.
https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Contributing
contribution agreement at
https://suricata-ids.org/about/contribution-agreement/
changes made (if applicable)
This is an implementation of redmine 2509
Describe changes:
This is a resubmit of pr #37. After reworking to fit the 2023 code base.
It adds support to specify multiple conditions to match a rule.
Syntax:
multi:<match_condition1>;<match_condition2>;...<match_conditionN>;Examples:
Match all rules including the term "nmap" but just from the "emerging-scan.rules" file.
multi:filename:rule/emerging-scan.rules; re:nmap;Match all rules with a recent cve reference and a perimeter deployment
multi:re:cve-202[23];metadata: deployment perimeter;