Hello Brian,
Apologies for the inconveniences. We will review the current documentation and we will indicate this information in order to clarify what you found.
I’d like to thank you for digging into this. Please, feel free to collaborate opening a new pull request
to the Wazuh documentation repository or any of our repositories whenever you may want to.
Best regards,
Manuel
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/5332fff8-9a15-4a4f-8b8d-cb12b62a0229%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<decoder name="test"> <regex type="pcre">^[[:punct:]]*:</regex> </decoder>
/* Give the new values for each regex */ switch (*pt) { case 'd': *pt = 1; break; case 'w': *pt = 2; break; case 's': *pt = 3; break; case 'p': *pt = 4; break; case '(': *pt = 5; break; case ')': *pt = 6; break; case '\\': *pt = 7; break; case 'D': *pt = 8; break; case 'W': *pt = 9; break; case 'S': *pt = 10; break; case '.': *pt = 11; break; case 't': *pt = 12; break; case '$': *pt = 13; break; case '|': *pt = 14; break;
case '<': *pt = 15; break;
default: reg->error = OS_REGEX_BADREGEX; goto compile_error; }
#define Regex(x,y) (regexmap[x][y] == TRUECHAR)
0, 0, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 1, 46, 47, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 58, 59, 60, 61, 62, 63, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 91, 92, 93, 94, 1, 96, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 123, 124, 125, 126, 127,
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 240, 241, 242, 243, 244, 245, 246, 247,
<regex>p < q</regex>
<regex>p \< q</regex>
Documentation PR: https://github.com/wazuh/wazuh-documentation/pull/822On the code side, I'd still like to know what's the purpose of regexmap[][] values which are neither zero nor one. Maybe this is a relic from OSSEC or OS_Regex.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/892cf4f5-b3bb-49d2-ba29-72960c3aec9a%40googlegroups.com.
On the other hand, I think we should move to a standard regex library (like PCRE or POSIX) has more sense than extending the current OSSEC regexes. In this context, we may include them as an optional syntax. For example:<decoder name="test"> <regex type="pcre">^[[:punct:]]*:</regex> </decoder>
In any case, we need that the foreign library that we would import is compatible with every platform where Wazuh works.
In this scenario, having { 0, 0, 0, 0, 0, 0, 1, 0, 0, } is equivalent to having { 0, 0, 2, 3, 4, 5, 1, 7, 8 }, but the latter is more readable.
There is a special escaping case: \<, that only matches with the character '<'. I think that the reason for this is in the XML parser library (also inherited from OSSEC).The following text:<regex>p < q</regex>It's illegal in XML because < opens a tag. We need to escape it:<regex>p \< q</regex>However, the XML parser would include the escaping character into the regex. Hence, the regex accepts \< for compatibility with the XML library.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/1c4d1ff0-e545-40a4-99c1-28c6c332edea%40googlegroups.com.
What we want to do is redesign the configuration and move it to YAML. We will use a standard YAML parser (libyaml) for that.
Even more, I'd love to replace the field filters at rules (<srcip> / <dstuser> / <field name="...">) with a single query, like jq.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/76d05968-0dcd-4971-9da7-4f0f1cf67b83%40googlegroups.com.