From b2b7c8c4cd24d9d52b8eb12867e2c239a4a32696 Mon Sep 17 00:00:00 2001 From: newklei Date: Tue, 14 Jul 2026 00:59:54 -0400 Subject: [PATCH 1/5] Add Caddy web server decoder and detection rules for Wazuh 5.0 --- integrations/caddy/README.md | 109 ++++++++++++++++++ .../decoders/decoder_caddy-access_0.yml | 41 +++++++ .../rules/rule_996004_sql-injection.yml | 24 ++++ .../rule_996005_sensitive-path-probe.yml | 24 ++++ .../caddy/ruleset/rules/rule_996008_xss.yml | 24 ++++ .../rules/rule_996009_command-injection.yml | 24 ++++ .../rules/rule_996010_known-scanner-tool.yml | 24 ++++ .../rules/rule_996011_trace-track-method.yml | 24 ++++ .../rules/rule_996012_log4shell-jndi.yml | 24 ++++ .../rule_996013_sensitive-file-access.yml | 24 ++++ ...rule_996014_credential-key-file-access.yml | 24 ++++ .../rules/rule_996015_backup-db-dump.yml | 24 ++++ .../rule_996016_source-control-artifact.yml | 24 ++++ .../rules/rule_996017_app-log-file-access.yml | 24 ++++ .../rules/rule_996020_suspicious-filename.yml | 24 ++++ .../rule_996021_auth-endpoint-access.yml | 22 ++++ .../rules/rule_996023_encoding-evasion.yml | 24 ++++ .../ruleset/rules/rule_996024_lfi-rfi.yml | 24 ++++ .../caddy/ruleset/rules/rule_996025_ssrf.yml | 24 ++++ .../rule_996026_graphql-introspection.yml | 24 ++++ .../rules/rule_996027_unusual-http-method.yml | 24 ++++ .../rule_996028_suspicious-user-agent.yml | 24 ++++ .../rule_996029_dangerous-file-upload.yml | 24 ++++ .../rules/rule_996030_oversized-uri.yml | 24 ++++ .../rule_996031_double-extension-bypass.yml | 24 ++++ .../rule_996032_archive-macro-upload.yml | 24 ++++ integrations/caddy/sample_logs.txt | 7 ++ 27 files changed, 731 insertions(+) create mode 100644 integrations/caddy/README.md create mode 100644 integrations/caddy/ruleset/decoders/decoder_caddy-access_0.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996004_sql-injection.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996005_sensitive-path-probe.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996008_xss.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996009_command-injection.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996010_known-scanner-tool.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996011_trace-track-method.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996012_log4shell-jndi.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996013_sensitive-file-access.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996014_credential-key-file-access.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996015_backup-db-dump.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996016_source-control-artifact.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996017_app-log-file-access.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996020_suspicious-filename.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996021_auth-endpoint-access.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996023_encoding-evasion.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996024_lfi-rfi.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996025_ssrf.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996026_graphql-introspection.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996027_unusual-http-method.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996028_suspicious-user-agent.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996029_dangerous-file-upload.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996030_oversized-uri.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996031_double-extension-bypass.yml create mode 100644 integrations/caddy/ruleset/rules/rule_996032_archive-macro-upload.yml create mode 100644 integrations/caddy/sample_logs.txt diff --git a/integrations/caddy/README.md b/integrations/caddy/README.md new file mode 100644 index 0000000..86ca97c --- /dev/null +++ b/integrations/caddy/README.md @@ -0,0 +1,109 @@ +# Caddy-Wazuh Integration + +## Table of Contents + +* [Introduction](#introduction) +* [Prerequisites](#prerequisites) +* [Installation and Configuration](#installation-and-configuration) + * [Installing Caddy](#installing-caddy) + * [Initial Caddy Configuration](#initial-caddy-configuration) + * [Installing Wazuh (if applicable)](#installing-wazuh-if-applicable) + * [Initial Wazuh Configuration (if applicable)](#initial-wazuh-configuration-if-applicable) + * [Using the Integration Files](#using-the-integration-files) +* [Integration Steps](#integration-steps) +* [Integration Testing](#integration-testing) +* [Sources](#sources) + +--- + +### Introduction + +Caddy (caddyserver.com) is a modern open source web server with automatic HTTPS. It writes structured JSON access logs by default with no extra configuration needed, and there was no coverage for it in the Wazuh ruleset. This integration adds a decoder and a set of Sigma format detection rules for Wazuh 5.0, parsing Caddy's JSON access logs into ECS fields and catching common web attacks and recon activity, things like path traversal, SQL injection, XSS, Log4Shell, credential file access, and dangerous file uploads. + +A parallel version of this integration for Wazuh 4.x (XML decoder and rules) is available in a separate branch/PR of this repository. + +--- + +### Prerequisites + +* Wazuh manager 5.0 beta2 or later, the ruleset format described here is specific to the new engine introduced in 5.0 +* Caddy web server configured to write JSON access logs + +--- + +### Installation and Configuration + +#### Installing Caddy + +Follow the official installation guide at https://caddyserver.com/docs/install for your platform. + +#### Initial Caddy Configuration + +Caddy needs to be told to write JSON access logs. Add this to your Caddyfile: + +``` +{ + log { + format json + } +} +``` + +A sample log line looks like this: + +```json +{"level":"info","ts":1700000000.0,"logger":"http.log.access","msg":"handled request","request":{"remote_ip":"10.0.0.1","remote_port":"12345","proto":"HTTP/1.1","method":"GET","host":"example.com","uri":"/","headers":{"User-Agent":["Mozilla/5.0"]}},"status":200,"size":1024,"duration":0.002} +``` + +#### Installing Wazuh (if applicable) + +A standard Wazuh 5.0 beta installation is assumed. See the beta documentation at https://documentation.wazuh.com/5.0-beta/getting-started/index.html. + +#### Initial Wazuh Configuration (if applicable) + +No special manager configuration is needed beyond registering the decoder and rules described below and pointing the agent at the Caddy log file. + +#### Using the Integration Files + +In 5.0, decoders and rules are authored as YAML assets rather than XML, and rules follow the Sigma rule specification (https://github.com/SigmaHQ/sigma-specification). The easiest way to add this integration is through the dashboard's Security Analytics section, under Normalization and Detection, both have a Create option with a YAML editor. + +* `ruleset/decoders/decoder_caddy-access_0.yml`, paste into Normalization, Decoders, Create, YAML Editor. Set its parent integration to a new or existing `caddy` integration. +* `ruleset/rules/*.yml`, each file is one rule, paste into Detection, Rules, Create, YAML Editor, same `caddy` integration. + +Once added, content should be promoted from the Draft space through Test and into Custom or Standard depending on your review process, so it is picked up by live detection. + +--- + +### Integration Steps + +Once Caddy is writing JSON logs and the agent is forwarding them, every request Caddy handles becomes a log event. The decoder recognizes the `http.log.access` logger field and maps the request into ECS fields (`source.ip`, `url.original`, `http.request.method`, `http.response.status_code`, `user_agent.original`, and so on). The rules then match against those ECS fields and raise an alert when a known attack or recon pattern is found. + +A request like `GET /../../../../etc/passwd` gets caught by the path traversal rule, and a request containing `${jndi:ldap://...}` gets caught by the Log4Shell rule. + +--- + +### Integration Testing + +This was verified using the Wazuh 5.0 beta2 dashboard's Log test tool (Security Analytics, Log test). Custom content was authored in the Draft space and promoted to the Test space before running it against sample logs, since Draft content alone is not evaluated by Log test. + +Running the path traversal sample log through Log test produces a decoded event with all ECS fields populated correctly, and the Detection tab shows the corresponding rule matched, alongside the other rules evaluated against the same log. + +The remaining rules in `ruleset/rules/` were built the same way and follow the same pattern, each targets one field (mostly `url.original`, occasionally `user_agent.original` or `http.request.method`) with a regex modifier. + +Three rules from the original Wazuh 4.x ruleset (repeated auth endpoint hits, repeated sensitive path probes, repeated path traversal attempts) rely on frequency and correlation logic across multiple events rather than a single log line, and are not included here as Sigma rules. That kind of correlation looks like it belongs in the dashboard's Detectors feature instead, which is still to be worked out and would follow in a later update. + +--- + +### Sources + +* Caddy JSON access log format, https://caddyserver.com/docs/logging +* Sigma rule specification, https://github.com/SigmaHQ/sigma-specification +* MITRE ATT&CK, https://attack.mitre.org/ + +## Provenance and Maintenance + +* Original source, ported from a Wazuh 4.x XML decoder and ruleset I wrote for the same Caddy log format, adapted to the 5.0 YAML and Sigma format. +* Adapted by, Anmol Vats (GitHub: NucleiAv) +* Tested versions, Wazuh 5.0.0 beta2, current Caddy JSON access log format as documented at caddyserver.com/docs/logging +* Maintainer, Anmol Vats (GitHub: NucleiAv) +* Support boundary, community maintained, provided as is, format may need updates as the 5.0 engine moves past beta diff --git a/integrations/caddy/ruleset/decoders/decoder_caddy-access_0.yml b/integrations/caddy/ruleset/decoders/decoder_caddy-access_0.yml new file mode 100644 index 0000000..92ab106 --- /dev/null +++ b/integrations/caddy/ruleset/decoders/decoder_caddy-access_0.yml @@ -0,0 +1,41 @@ +name: decoder/caddy-access/0 +enabled: true +metadata: + title: Caddy Access Log Decoder + description: Decodes Caddy web server structured JSON access logs + author: Anmol Vats + references: [] + documentation: 'https://caddyserver.com/docs/json/apps/http/servers/logs/' + supports: [] + +parents: + - decoder/core-wazuh-message/0 + +check: string_equal($_tmp_json.logger, "http.log.access") + +normalize: + - map: + - event.kind: event + - event.category: array_append(web) + - event.type: array_append(access) + - event.action: http-request + - event.dataset: caddy-access + - service.type: caddy + - source.ip: $_tmp_json.request.remote_ip + - source.address: $_tmp_json.request.remote_ip + - http.request.method: $_tmp_json.request.method + - url.original: $_tmp_json.request.uri + - destination.domain: $_tmp_json.request.host + - http.response.status_code: $_tmp_json.status + - http.response.body.bytes: $_tmp_json.size + - event.duration: $_tmp_json.duration + - network.protocol: $_tmp_json.request.proto + - user_agent.original: $_tmp_json.request.headers.User-Agent.0 + - check: int_less($http.response.status_code, 400) + map: + - event.outcome: success + - check: int_greater_or_equal($http.response.status_code, 400) + map: + - event.outcome: failure + - map: + - _tmp_json: delete() diff --git a/integrations/caddy/ruleset/rules/rule_996004_sql-injection.yml b/integrations/caddy/ruleset/rules/rule_996004_sql-injection.yml new file mode 100644 index 0000000..32d88db --- /dev/null +++ b/integrations/caddy/ruleset/rules/rule_996004_sql-injection.yml @@ -0,0 +1,24 @@ +id: '7f3a1c2e-4b6d-4e91-9a2f-1d8c6b3e0a17' +logsource: + product: caddy +tags: + - attack.initial-access + - attack.t1190 +falsepositives: + - Legitimate content containing SQL-like keywords in search or content fields +level: high +status: experimental +enabled: true +metadata: + title: Caddy SQL Injection Attempt + author: Anmol Vats + description: Detects SQL injection patterns (UNION SELECT, OR 1=1, etc.) in the request URI. + references: + - 'https://github.com/wazuh/wazuh/issues/37033' + documentation: '' + supports: + - '5.0' +detection: + selection: + url.original|re: '(?i)(union.+select|select.+from|insert.+into|drop.+table|(%27|'')(\s|%20)*(or)(\s|%20)+|(\s|%20)(or)(\s|%20)+1(\s|%20)*(%3D|=)(\s|%20)*1)' + condition: selection diff --git a/integrations/caddy/ruleset/rules/rule_996005_sensitive-path-probe.yml b/integrations/caddy/ruleset/rules/rule_996005_sensitive-path-probe.yml new file mode 100644 index 0000000..923dd76 --- /dev/null +++ b/integrations/caddy/ruleset/rules/rule_996005_sensitive-path-probe.yml @@ -0,0 +1,24 @@ +id: '2c9e4f1a-8b3d-4c72-b1e6-3f7a9d2c5e04' +logsource: + product: caddy +tags: + - attack.reconnaissance + - attack.t1595 +falsepositives: + - Vulnerability scanning performed by authorized security teams +level: high +status: experimental +enabled: true +metadata: + title: Caddy Sensitive Path Probe + author: Anmol Vats + description: Detects probing of common sensitive paths such as .env, .git, wp-admin, phpmyadmin. + references: + - 'https://github.com/wazuh/wazuh/issues/37033' + documentation: '' + supports: + - '5.0' +detection: + selection: + url.original|re: '(?i)(\/\.env$|\/\.git|\/wp-admin|\/phpmyadmin|\/admin\.php|\/config\.php|\/backup)' + condition: selection diff --git a/integrations/caddy/ruleset/rules/rule_996008_xss.yml b/integrations/caddy/ruleset/rules/rule_996008_xss.yml new file mode 100644 index 0000000..0625cb6 --- /dev/null +++ b/integrations/caddy/ruleset/rules/rule_996008_xss.yml @@ -0,0 +1,24 @@ +id: 'e6d2a4f8-1c3b-4a95-8e7d-2b6f9a1c3d58' +logsource: + product: caddy +tags: + - attack.execution + - attack.t1059.007 +falsepositives: + - Legitimate pages containing script-related keywords in content +level: high +status: experimental +enabled: true +metadata: + title: Caddy XSS Attempt in URI + author: Anmol Vats + description: Detects cross-site scripting payloads in the request URI. + references: + - 'https://github.com/wazuh/wazuh/issues/37033' + documentation: '' + supports: + - '5.0' +detection: + selection: + url.original|re: '(?i)(%3Cscript| Date: Tue, 14 Jul 2026 01:14:04 -0400 Subject: [PATCH 2/5] Rename integration folder to caddy_integration_wazuh_v5.0beta, add missing path traversal rule file, tighten testing evidence in README --- .../README.md | 4 ++-- .../decoders/decoder_caddy-access_0.yml | 0 .../rules/rule_996003_path-traversal.yml | 24 +++++++++++++++++++ .../rules/rule_996004_sql-injection.yml | 0 .../rule_996005_sensitive-path-probe.yml | 0 .../ruleset/rules/rule_996008_xss.yml | 0 .../rules/rule_996009_command-injection.yml | 0 .../rules/rule_996010_known-scanner-tool.yml | 0 .../rules/rule_996011_trace-track-method.yml | 0 .../rules/rule_996012_log4shell-jndi.yml | 0 .../rule_996013_sensitive-file-access.yml | 0 ...rule_996014_credential-key-file-access.yml | 0 .../rules/rule_996015_backup-db-dump.yml | 0 .../rule_996016_source-control-artifact.yml | 0 .../rules/rule_996017_app-log-file-access.yml | 0 .../rules/rule_996020_suspicious-filename.yml | 0 .../rule_996021_auth-endpoint-access.yml | 0 .../rules/rule_996023_encoding-evasion.yml | 0 .../ruleset/rules/rule_996024_lfi-rfi.yml | 0 .../ruleset/rules/rule_996025_ssrf.yml | 0 .../rule_996026_graphql-introspection.yml | 0 .../rules/rule_996027_unusual-http-method.yml | 0 .../rule_996028_suspicious-user-agent.yml | 0 .../rule_996029_dangerous-file-upload.yml | 0 .../rules/rule_996030_oversized-uri.yml | 0 .../rule_996031_double-extension-bypass.yml | 0 .../rule_996032_archive-macro-upload.yml | 0 .../sample_logs.txt | 0 28 files changed, 26 insertions(+), 2 deletions(-) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/README.md (90%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/decoders/decoder_caddy-access_0.yml (100%) create mode 100644 integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996003_path-traversal.yml rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996004_sql-injection.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996005_sensitive-path-probe.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996008_xss.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996009_command-injection.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996010_known-scanner-tool.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996011_trace-track-method.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996012_log4shell-jndi.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996013_sensitive-file-access.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996014_credential-key-file-access.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996015_backup-db-dump.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996016_source-control-artifact.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996017_app-log-file-access.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996020_suspicious-filename.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996021_auth-endpoint-access.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996023_encoding-evasion.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996024_lfi-rfi.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996025_ssrf.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996026_graphql-introspection.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996027_unusual-http-method.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996028_suspicious-user-agent.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996029_dangerous-file-upload.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996030_oversized-uri.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996031_double-extension-bypass.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/ruleset/rules/rule_996032_archive-macro-upload.yml (100%) rename integrations/{caddy => caddy_integration_wazuh_v5.0beta}/sample_logs.txt (100%) diff --git a/integrations/caddy/README.md b/integrations/caddy_integration_wazuh_v5.0beta/README.md similarity index 90% rename from integrations/caddy/README.md rename to integrations/caddy_integration_wazuh_v5.0beta/README.md index 86ca97c..0b5eccc 100644 --- a/integrations/caddy/README.md +++ b/integrations/caddy_integration_wazuh_v5.0beta/README.md @@ -86,9 +86,9 @@ A request like `GET /../../../../etc/passwd` gets caught by the path traversal r This was verified using the Wazuh 5.0 beta2 dashboard's Log test tool (Security Analytics, Log test). Custom content was authored in the Draft space and promoted to the Test space before running it against sample logs, since Draft content alone is not evaluated by Log test. -Running the path traversal sample log through Log test produces a decoded event with all ECS fields populated correctly, and the Detection tab shows the corresponding rule matched, alongside the other rules evaluated against the same log. +Running the path traversal sample log (`/../../../../etc/passwd`) through Log test produces a decoded event with all ECS fields populated correctly. The Detection tab reports 25 rules evaluated with 2 matches on that single log line, the path traversal rule (996003) and the suspicious filename rule (996020), both firing correctly against the same request. -The remaining rules in `ruleset/rules/` were built the same way and follow the same pattern, each targets one field (mostly `url.original`, occasionally `user_agent.original` or `http.request.method`) with a regex modifier. +The other 23 rules in `ruleset/rules/` were built the same way and follow the same pattern. 21 target `url.original`, 2 target `user_agent.original` (996010, 996028), and 2 target `http.request.method` (996011, 996027), each with a regex modifier. Three rules from the original Wazuh 4.x ruleset (repeated auth endpoint hits, repeated sensitive path probes, repeated path traversal attempts) rely on frequency and correlation logic across multiple events rather than a single log line, and are not included here as Sigma rules. That kind of correlation looks like it belongs in the dashboard's Detectors feature instead, which is still to be worked out and would follow in a later update. diff --git a/integrations/caddy/ruleset/decoders/decoder_caddy-access_0.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/decoders/decoder_caddy-access_0.yml similarity index 100% rename from integrations/caddy/ruleset/decoders/decoder_caddy-access_0.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/decoders/decoder_caddy-access_0.yml diff --git a/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996003_path-traversal.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996003_path-traversal.yml new file mode 100644 index 0000000..a51c0a7 --- /dev/null +++ b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996003_path-traversal.yml @@ -0,0 +1,24 @@ +id: '78c290a5-bc22-4691-9661-81db77125f54' +logsource: + product: caddy +tags: + - attack.discovery + - attack.t1083 +falsepositives: + - Legitimate use of ../ in query parameters by specific applications +level: high +status: experimental +enabled: true +metadata: + title: Caddy Path Traversal Attempt + author: Anmol Vats + description: Detects path traversal attempts in Caddy access logs via ../ or its URL encoded variants in the request URI. + references: + - 'https://github.com/wazuh/wazuh/issues/37033' + documentation: '' + supports: + - '5.0' +detection: + selection: + url.original|re: '(?i)(\.\./|\.\.\\|%2e%2e|%252e%252e)' + condition: selection diff --git a/integrations/caddy/ruleset/rules/rule_996004_sql-injection.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996004_sql-injection.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996004_sql-injection.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996004_sql-injection.yml diff --git a/integrations/caddy/ruleset/rules/rule_996005_sensitive-path-probe.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996005_sensitive-path-probe.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996005_sensitive-path-probe.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996005_sensitive-path-probe.yml diff --git a/integrations/caddy/ruleset/rules/rule_996008_xss.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996008_xss.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996008_xss.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996008_xss.yml diff --git a/integrations/caddy/ruleset/rules/rule_996009_command-injection.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996009_command-injection.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996009_command-injection.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996009_command-injection.yml diff --git a/integrations/caddy/ruleset/rules/rule_996010_known-scanner-tool.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996010_known-scanner-tool.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996010_known-scanner-tool.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996010_known-scanner-tool.yml diff --git a/integrations/caddy/ruleset/rules/rule_996011_trace-track-method.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996011_trace-track-method.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996011_trace-track-method.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996011_trace-track-method.yml diff --git a/integrations/caddy/ruleset/rules/rule_996012_log4shell-jndi.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996012_log4shell-jndi.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996012_log4shell-jndi.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996012_log4shell-jndi.yml diff --git a/integrations/caddy/ruleset/rules/rule_996013_sensitive-file-access.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996013_sensitive-file-access.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996013_sensitive-file-access.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996013_sensitive-file-access.yml diff --git a/integrations/caddy/ruleset/rules/rule_996014_credential-key-file-access.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996014_credential-key-file-access.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996014_credential-key-file-access.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996014_credential-key-file-access.yml diff --git a/integrations/caddy/ruleset/rules/rule_996015_backup-db-dump.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996015_backup-db-dump.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996015_backup-db-dump.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996015_backup-db-dump.yml diff --git a/integrations/caddy/ruleset/rules/rule_996016_source-control-artifact.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996016_source-control-artifact.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996016_source-control-artifact.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996016_source-control-artifact.yml diff --git a/integrations/caddy/ruleset/rules/rule_996017_app-log-file-access.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996017_app-log-file-access.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996017_app-log-file-access.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996017_app-log-file-access.yml diff --git a/integrations/caddy/ruleset/rules/rule_996020_suspicious-filename.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996020_suspicious-filename.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996020_suspicious-filename.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996020_suspicious-filename.yml diff --git a/integrations/caddy/ruleset/rules/rule_996021_auth-endpoint-access.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996021_auth-endpoint-access.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996021_auth-endpoint-access.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996021_auth-endpoint-access.yml diff --git a/integrations/caddy/ruleset/rules/rule_996023_encoding-evasion.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996023_encoding-evasion.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996023_encoding-evasion.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996023_encoding-evasion.yml diff --git a/integrations/caddy/ruleset/rules/rule_996024_lfi-rfi.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996024_lfi-rfi.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996024_lfi-rfi.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996024_lfi-rfi.yml diff --git a/integrations/caddy/ruleset/rules/rule_996025_ssrf.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996025_ssrf.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996025_ssrf.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996025_ssrf.yml diff --git a/integrations/caddy/ruleset/rules/rule_996026_graphql-introspection.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996026_graphql-introspection.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996026_graphql-introspection.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996026_graphql-introspection.yml diff --git a/integrations/caddy/ruleset/rules/rule_996027_unusual-http-method.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996027_unusual-http-method.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996027_unusual-http-method.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996027_unusual-http-method.yml diff --git a/integrations/caddy/ruleset/rules/rule_996028_suspicious-user-agent.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996028_suspicious-user-agent.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996028_suspicious-user-agent.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996028_suspicious-user-agent.yml diff --git a/integrations/caddy/ruleset/rules/rule_996029_dangerous-file-upload.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996029_dangerous-file-upload.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996029_dangerous-file-upload.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996029_dangerous-file-upload.yml diff --git a/integrations/caddy/ruleset/rules/rule_996030_oversized-uri.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996030_oversized-uri.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996030_oversized-uri.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996030_oversized-uri.yml diff --git a/integrations/caddy/ruleset/rules/rule_996031_double-extension-bypass.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996031_double-extension-bypass.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996031_double-extension-bypass.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996031_double-extension-bypass.yml diff --git a/integrations/caddy/ruleset/rules/rule_996032_archive-macro-upload.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996032_archive-macro-upload.yml similarity index 100% rename from integrations/caddy/ruleset/rules/rule_996032_archive-macro-upload.yml rename to integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996032_archive-macro-upload.yml diff --git a/integrations/caddy/sample_logs.txt b/integrations/caddy_integration_wazuh_v5.0beta/sample_logs.txt similarity index 100% rename from integrations/caddy/sample_logs.txt rename to integrations/caddy_integration_wazuh_v5.0beta/sample_logs.txt From 8d8e28cfabb7c8d706361770e754bce9e35fded6 Mon Sep 17 00:00:00 2001 From: newklei Date: Tue, 14 Jul 2026 01:33:59 -0400 Subject: [PATCH 3/5] Fix rule field-count precision in Integration Testing section --- integrations/caddy_integration_wazuh_v5.0beta/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/caddy_integration_wazuh_v5.0beta/README.md b/integrations/caddy_integration_wazuh_v5.0beta/README.md index 0b5eccc..202fd6e 100644 --- a/integrations/caddy_integration_wazuh_v5.0beta/README.md +++ b/integrations/caddy_integration_wazuh_v5.0beta/README.md @@ -88,7 +88,7 @@ This was verified using the Wazuh 5.0 beta2 dashboard's Log test tool (Security Running the path traversal sample log (`/../../../../etc/passwd`) through Log test produces a decoded event with all ECS fields populated correctly. The Detection tab reports 25 rules evaluated with 2 matches on that single log line, the path traversal rule (996003) and the suspicious filename rule (996020), both firing correctly against the same request. -The other 23 rules in `ruleset/rules/` were built the same way and follow the same pattern. 21 target `url.original`, 2 target `user_agent.original` (996010, 996028), and 2 target `http.request.method` (996011, 996027), each with a regex modifier. +The other 23 rules in `ruleset/rules/` were built the same way and follow the same pattern. 19 target `url.original`, 2 target `user_agent.original` (996010, 996028), and 2 target `http.request.method` (996011, 996027), each with a regex modifier. Across all 25 rules, 21 target `url.original` in total. Three rules from the original Wazuh 4.x ruleset (repeated auth endpoint hits, repeated sensitive path probes, repeated path traversal attempts) rely on frequency and correlation logic across multiple events rather than a single log line, and are not included here as Sigma rules. That kind of correlation looks like it belongs in the dashboard's Detectors feature instead, which is still to be worked out and would follow in a later update. From b366c62b8f5e80b767463b823371ab79c1292458 Mon Sep 17 00:00:00 2001 From: newklei <105632119+NucleiAv@users.noreply.github.com> Date: Tue, 14 Jul 2026 01:45:31 -0400 Subject: [PATCH 4/5] Update README with additional images Added images and clarified ruleset evaluation details in README. Signed-off-by: newklei <105632119+NucleiAv@users.noreply.github.com> --- integrations/caddy_integration_wazuh_v5.0beta/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/integrations/caddy_integration_wazuh_v5.0beta/README.md b/integrations/caddy_integration_wazuh_v5.0beta/README.md index 202fd6e..cd45556 100644 --- a/integrations/caddy_integration_wazuh_v5.0beta/README.md +++ b/integrations/caddy_integration_wazuh_v5.0beta/README.md @@ -90,6 +90,9 @@ Running the path traversal sample log (`/../../../../etc/passwd`) through Log te The other 23 rules in `ruleset/rules/` were built the same way and follow the same pattern. 19 target `url.original`, 2 target `user_agent.original` (996010, 996028), and 2 target `http.request.method` (996011, 996027), each with a regex modifier. Across all 25 rules, 21 target `url.original` in total. +image +image + Three rules from the original Wazuh 4.x ruleset (repeated auth endpoint hits, repeated sensitive path probes, repeated path traversal attempts) rely on frequency and correlation logic across multiple events rather than a single log line, and are not included here as Sigma rules. That kind of correlation looks like it belongs in the dashboard's Detectors feature instead, which is still to be worked out and would follow in a later update. --- From b3ab30f303c1fa3372b0b00f885394d94afca73f Mon Sep 17 00:00:00 2001 From: newklei Date: Tue, 21 Jul 2026 04:29:47 -0400 Subject: [PATCH 5/5] Fix ECS field mapping issues from Copilot review: split network.protocol/http.version, remove unconverted event.duration, fix YAML quoting bug in suspicious User-Agent regex --- .../ruleset/decoders/decoder_caddy-access_0.yml | 4 ++-- .../ruleset/rules/rule_996028_suspicious-user-agent.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/integrations/caddy_integration_wazuh_v5.0beta/ruleset/decoders/decoder_caddy-access_0.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/decoders/decoder_caddy-access_0.yml index 92ab106..e3c97f6 100644 --- a/integrations/caddy_integration_wazuh_v5.0beta/ruleset/decoders/decoder_caddy-access_0.yml +++ b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/decoders/decoder_caddy-access_0.yml @@ -28,8 +28,8 @@ normalize: - destination.domain: $_tmp_json.request.host - http.response.status_code: $_tmp_json.status - http.response.body.bytes: $_tmp_json.size - - event.duration: $_tmp_json.duration - - network.protocol: $_tmp_json.request.proto + - network.protocol: http + - http.version: $_tmp_json.request.proto - user_agent.original: $_tmp_json.request.headers.User-Agent.0 - check: int_less($http.response.status_code, 400) map: diff --git a/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996028_suspicious-user-agent.yml b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996028_suspicious-user-agent.yml index 6e84778..b274046 100644 --- a/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996028_suspicious-user-agent.yml +++ b/integrations/caddy_integration_wazuh_v5.0beta/ruleset/rules/rule_996028_suspicious-user-agent.yml @@ -20,5 +20,5 @@ metadata: - '5.0' detection: selection: - user_agent.original|re: '^(\[\]|''''|-)$|^.{500,}' + user_agent.original|re: '^(\[\]|-|\s*)$|^.{500,}' condition: selection