Skip to content

Ruleset Synology NAS#90

Draft
leonfullxr wants to merge 2 commits into
mainfrom
synology-nas
Draft

Ruleset Synology NAS#90
leonfullxr wants to merge 2 commits into
mainfrom
synology-nas

Conversation

@leonfullxr

Copy link
Copy Markdown
Member

No description provided.

@leonfullxr leonfullxr self-assigned this Jun 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Synology NAS integration for Wazuh by introducing custom decoders/rules plus accompanying documentation and sample logs to validate expected alerting behavior.

Changes:

  • Introduces a Synology NAS decoder (synology_nas) to parse DSM syslog events (Connection/Security/System).
  • Adds a ruleset to generate alerts for auth events, auto-blocks, updates, shutdown initiation, UPS disconnects, and storage issues.
  • Adds a README and sample log corpus for wazuh-logtest/dashboard validation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
integrations/synology_nas/decoders/nas_synology_decoders.xml New decoder definitions for Synology DSM syslog messages.
integrations/synology_nas/rules/nas_synology_rules.xml New rules mapping decoded Synology events to Wazuh alert levels/groups.
integrations/synology_nas/README.md Setup + validation instructions for the integration.
integrations/synology_nas/sample_logs.txt Example Synology log lines to test decoder/rule matching.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +8 to +13
<rule id="100401" level="5">
<if_sid>100400</if_sid>
<match>failed to log in</match>
<description>Synology NAS: Login FAILURE for user '$(synology_user)' from $(srcip) via $(synology_app).</description>
<group>authentication_failed,</group>
</rule>
Comment on lines +15 to +20
<rule id="100402" level="3">
<if_sid>100400</if_sid>
<match>successfully passed the first authentication of 2FA</match>
<description>Synology NAS: User '$(synology_user)' passed first 2FA step from $(srcip).</description>
<group>authentication_success,</group>
</rule>
Comment on lines +22 to +27
<rule id="100403" level="3">
<if_sid>100400</if_sid>
<match>signed in to</match>
<description>Synology NAS: User '$(synology_user)' successfully logged into $(synology_app) from $(srcip).</description>
<group>authentication_success,</group>
</rule>
Comment on lines +29 to +33
<rule id="100404" level="2">
<if_sid>100400</if_sid>
<match>logged out</match>
<description>Synology NAS: User '$(synology_user)' logged out from $(synology_app).</description>
</rule>
Comment thread integrations/synology_nas/rules/nas_synology_rules.xml
Comment thread integrations/synology_nas/README.md

1. Navigate to **Server Management** --> **Ruleset Test**.
2. Paste a raw log from `sample_logs.txt` (e.g., `Connection: User [admin] from [192.168.1.10] failed to log in via [DSM]`).
3. Verify Phase 2 identifies the `synology-nas` decoder and Phase 3 triggers the expected alert.
#### Verify in Wazuh Dashboard

1. Navigate to the **Discover** tab in the Wazuh Dashboard.
2. Filter by `Field` `decoder.name`, `Operator` `is`, `Value` `synology-nas`.
@leonfullxr
leonfullxr marked this pull request as draft June 12, 2026 14:40
@MiguelCasaresRobles

Copy link
Copy Markdown
Member

Hi @leonfullxr — I know this is still a draft, so this is early feedback to help it along:

  1. Field-name mismatch (blocking). In rules/nas_synology_rules.xml, rules 100401-100404 reference $(synology_user) in their descriptions, but no decoder ever sets a field by that name — nas_synology_decoders.xml uses <order>user, srcip, synology_app</order> (i.e. user). As-is, every one of those alerts renders with an empty username. Reference $(user) (or rename the decoder field).

  2. README validation steps are wrong (high). The testing instructions tell readers to look for decoder name synology-nas (hyphen), but the decoder is declared as synology_nas (underscore). Anyone following the README verbatim will think the integration is broken.

  3. Since there's no CI here, please run the bundled sample logs through wazuh-logtest and paste the output (at least one sample per decoder) so we can confirm the rendered alerts before this leaves draft.

Nits: base rule 100400 (level 3) fires on the benign "Test message from Synology Syslog Client" heartbeat — consider a dedicated low-noise/ignore rule; and 100409 combines drive-removed and volume-degraded into one rule, so its description always mentions both with one left empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants