Caddy integration wazuh v4.14.6#98
Open
NucleiAv wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Wazuh integration for Caddy’s structured JSON access logs, providing decoders and a dedicated ruleset to detect common web attacks and reconnaissance activity.
Changes:
- Added Caddy JSON access-log decoder definitions.
- Added a Caddy-focused ruleset (IDs 996000–996032), including correlation/frequency rules.
- Added integration documentation, sample logs, and a ruleset test file (
caddy.ini).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| integrations/caddy_integration_wazuh_v4.14.6/ruleset/decoders/caddy_decoders.xml | Adds a parent/child decoder pair intended to identify and JSON-decode Caddy access logs. |
| integrations/caddy_integration_wazuh_v4.14.6/ruleset/rules/caddy_rules.xml | Adds 29 Caddy detection rules (including frequency-based correlation rules). |
| integrations/caddy_integration_wazuh_v4.14.6/caddy.ini | Adds unit-test style cases for the non-frequency rules. |
| integrations/caddy_integration_wazuh_v4.14.6/sample_logs.txt | Provides sample Caddy JSON log lines to validate decoding and rule hits via logtest. |
| integrations/caddy_integration_wazuh_v4.14.6/README.md | Documents setup, installation, and testing workflow for the integration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ositives on normal PHP query strings, correct MITRE mapping on aggressive scanning rule, fix README test file path, reorder rules to ascending ID sequence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds a decoder and detection ruleset for Caddy (caddyserver.com), a modern open source web server with automatic HTTPS that writes structured JSON access logs by default. There was no coverage for it anywhere in the Wazuh ruleset.
The integration includes a parent/child decoder pair and 29 rules covering path traversal, SQL injection, XSS, command injection, Log4Shell, LFI/RFI, SSRF, scanner and recon detection, credential and sensitive file access, source control exposure, encoding evasion, dangerous uploads, and brute force/scanning correlation. All rules use PCRE2 matching and are MITRE ATT&CK mapped.
Tested against a Wazuh manager 4.14.5 container using wazuh-logtest with the sample logs included in this folder, and against the full core ruleset test suite (
caddy.ini, 26 passing cases, the 3 frequency based rules are excluded from that file since they need repeated events over time rather than a single log line).Changes
ruleset/decoders/caddy_decoders.xml, a parent/child decoder pair using JSON_Decoder to parse Caddy structured access logsruleset/rules/caddy_rules.xmlwith 29 detection rules (IDs 996000-996032) covering SQLi, XSS, command injection, path traversal, Log4Shell, LFI/RFI, SSRF, scanner User-Agents, GraphQL introspection, upload abuse (web shell, double extension, archive/macro), dangerous HTTP methods, encoding evasion, oversized URIs, and brute force correlation. All rules are PCRE2-based and MITRE ATT&CK mapped.caddy.ini. It has 26 unit test cases covering all testable rules (3 frequency-based rules are commented out per convention)Results and Evidence
All 26 tests passed with runtests.py on Wazuh v4.14.5:
Sample wazuh-logtest output confirming rule firing:
and in detail:
Artifacts Introduced
ruleset/decoders/caddy_decoders.xmlruleset/rules/caddy_rules.xmlcaddy.iniTests Introduced
26 unit test cases in
ruleset/testing/tests/caddy.inivalidated with runtests.py against a Wazuh v4.14.5 installation. Each test covers one rule with a real Caddy JSON access log line. Frequency-based rules (996018, 996019, 996022) are commented out per the existing convention in other .ini files.