Root cause: multiple <match> elements in a Wazuh rule are ORed, not ANDed. Rule 110311 (A2-01 RDP allowed) matched every FortiGate traffic log (~5M hits/day) because type=traffic OR action=accept is almost always true. Fixes: - 110311: single pcre2 regex (?=.*dstport=3389)(?=.*action=accept) to require BOTH dstport=3389 AND action=accept in same raw log. Note: dstport/action are Wazuh static fields — <field> tag rejected; PCRE2 lookaheads in <regex> are the correct AND mechanism. - 110320: single pcre2 regex for type=traffic AND threat_label=known-c2. - 110331: pcre2 regex for ssl-login-success AND user=guest (AND fix). - 110332: pcre2 regex for ssl-login-success AND previous_country=. - 110333: pcre2 regex for ssl-login-success AND failed_attempts_before_success=. Verified with wazuh-logtest: dstport=3389+accept fires 110311; dstport=161 only fires parent 81618. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
||
| 29 |
|
29 |
|
| 30 |
|
30 |
|
| 31 |
|
31 |
|
| 32 |
|
|
|
| 33 |
|
|
|
| 34 |
|
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
| 35 |
|
37 |
|
| 36 |
|
38 |
|
| 37 |
|
|
|
| 38 |
|
|
|
| 39 |
|
|
|
|
39 |
|
|
| 40 |
|
40 |
|
| 41 |
|
41 |
|
| 42 |
|
42 |
|
|
|
||
| 126 |
|
126 |
|
| 127 |
|
127 |
|
| 128 |
|
128 |
|
| 129 |
|
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
|
|
| 130 |
|
133 |
|
| 131 |
|
134 |
|
| 132 |
|
|
|
| 133 |
|
|
|
|
135 |
|
|
| 134 |
|
136 |
|
| 135 |
|
137 |
|
| 136 |
|
138 |
|
|
|
||
| 22 |
|
22 |
|
| 23 |
|
23 |
|
| 24 |
|
24 |
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
| 25 |
|
28 |
|
| 26 |
|
29 |
|
| 27 |
|
30 |
|
| 28 |
|
31 |
|
| 29 |
|
32 |
|
| 30 |
|
|
|
|
33 |
|
|
|
34 |
|
|
| 31 |
|
35 |
|
| 32 |
|
36 |
|
| 33 |
|
|
|
| 34 |
|
|
|
|
37 |
|
|
| 35 |
|
38 |
|
| 36 |
|
39 |
|
| 37 |
|
40 |
|
|
|
||
| 41 |
|
44 |
|
| 42 |
|
45 |
|
| 43 |
|
46 |
|
| 44 |
|
|
|
| 45 |
|
|
|
|
47 |
|
|
| 46 |
|
48 |
|
| 47 |
|
49 |
|
| 48 |
|
50 |
|
|
|
||
| 52 |
|
54 |
|
| 53 |
|
55 |
|
| 54 |
|
56 |
|
| 55 |
|
|
|
| 56 |
|
|
|
|
57 |
|
|
| 57 |
|
58 |
|
| 58 |
|
59 |
|
| 59 |
|
60 |
|