| 1 | --- |
| 2 | title: Detection rules (Wazuh) |
| 3 | description: View and manage Wazuh detection rules in CoPilot to tune signal vs noise. |
| 4 | --- |
| 5 | |
| 6 | # Detection rules (Wazuh) |
| 7 | |
| 8 | **Menu:** Agents → Detection Rules |
| 9 | |
| 10 | Detection rules in CoPilot map to **Wazuh detection rules**. These rules are what Wazuh uses to generate alerts from decoded telemetry. |
| 11 | |
| 12 | CoPilot lets you **view, search, and manage** these rules without SSH’ing into the Wazuh manager. |
| 13 | |
| 14 |  |
| 15 | |
| 16 | --- |
| 17 | |
| 18 | ## What you’re looking at |
| 19 | |
| 20 |  |
| 21 | |
| 22 | This page exposes the rule files that live on the **Wazuh manager** (e.g., the standard `*_rules.xml` files and your local exclusions/custom rules). |
| 23 | |
| 24 | Key point: |
| 25 | - **Rules still live on the Wazuh manager.** CoPilot pulls them via API and can upload/save changes back to the manager. |
| 26 | |
| 27 | --- |
| 28 | |
| 29 | ## Why this matters |
| 30 | |
| 31 | Rules are one of your main control points for: |
| 32 | - reducing noisy alerts (exclusions) |
| 33 | - adding new detection logic for emerging threats |
| 34 | - aligning alerting to what you actually care about in a given customer environment |
| 35 | |
| 36 | --- |
| 37 | |
| 38 | ## Common tasks |
| 39 | |
| 40 | ### Search for rules |
| 41 | |
| 42 |  |
| 43 | |
| 44 | Use search when you need to: |
| 45 | - find a rule by **ID** |
| 46 | - locate a specific field match / keyword |
| 47 | - quickly identify which file contains the logic you need to adjust |
| 48 | |
| 49 | ### Add an exclusion (reduce noise) |
| 50 | |
| 51 | A typical workflow (from the video): |
| 52 | 1) Open your exclusions/custom rule file |
| 53 | 2) Add or modify a rule (incrementing the rule ID when needed) |
| 54 | 3) Update the match conditions/fields |
| 55 | 4) Save/upload the file |
| 56 | |
| 57 |  |
| 58 | |
| 59 | ### Upload/save changes to the Wazuh manager |
| 60 | |
| 61 | After editing, you must upload/save so the updated file is written to the manager. |
| 62 | |
| 63 | Important: |
| 64 | - Saving changes updates the file on the **Wazuh manager**. |
| 65 | |
| 66 | ### Restart Wazuh to apply rule changes |
| 67 | |
| 68 | Rule changes typically require a Wazuh manager restart/reload to take effect. |
| 69 | |
| 70 |  |
| 71 | |
| 72 | Operational note: |
| 73 | - Treat restarts as a controlled change (maintenance window, customer comms if needed). |
| 74 | |
| 75 | --- |
| 76 | |
| 77 | ## When to use it |
| 78 | |
| 79 | Use Detection Rules when you need to: |
| 80 | - reduce false positives / noisy detections |
| 81 | - validate why an alert did or did not fire |
| 82 | - tune alert fidelity for a specific customer |
| 83 | - add detection logic for a new threat/use case |
| 84 | |
| 85 | --- |
| 86 | |
| 87 | ## Gotchas |
| 88 | |
| 89 | - Rule changes can impact alert volume immediately—roll out carefully and document changes. |
| 90 | - Keep ownership/change control clear (avoid ad-hoc production edits). |
| 91 | - Any restart/reload step should be treated as operationally significant. |
| 92 | |
| 93 | --- |
| 94 | |
| 95 | ## Video context |
| 96 | |
| 97 | This page and workflow are demonstrated here: |
| 98 | - https://www.youtube.com/watch?v=31lCr80-NVM |