Hi,
hotaruRegarding your first question:
You can use the `negate` attribute with the `match` option as you've mentioned:
<match negate="yes">abcxyz</match>
However, you
cannot use multiple match regex options in a single statement. The value used for the match will correspond to the last specified label. If no label is specified, the default behavior will be applied. like:
<match negate="yes">abcxyz</match>
<match>drop database</match>
You can use only one of them and the last one will be considered
For your second question:
If you're using regex in the `
match` field, you need to specify the `
type` attribute. This can be one of the following types: `osmatch`, `osregex`, or `pcre2`. For example:
<match type="osregex">grant \.+ on \.+ for</match>Without specifying the `type` as a regex type (e.g., `osregex`), the match will be treated as a plain string comparison, and it won’t function as a regular expression.
To know more about the match field please refer to
https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/rules.html#matchIf you still have any questions please feel free to ask.