Hello Wazuh Support Team,
I hope you are doing well.
We are currently testing login monitoring for the Wazuh Dashboard and have encountered an issue where dashboard login events are being collected successfully, but custom alert generation is not working as expected.
curl -sO https://packages.wazuh.com/4.14/wazuh-install.sh
sudo bash ./wazuh-install.sh -a
We want to generate a Wazuh alert whenever a user successfully logs into the Wazuh Dashboard.
Example:
Wazuh Dashboard Successful Login
User: <username>
Source IP: <ip>
Time: <timestamp>
This is required for SOC monitoring and access auditing.
Dashboard login events are being generated and collected successfully.
We can see events similar to:
{
"program_name": "opensearch-dashboards",
"message": "POST /api/login 200 63ms - 9.0B"
}
and
{
"url": "/api/login",
"statusCode": 200
}
These events are stored in:
/var/ossec/logs/archives/archives.json
Example command used:
grep -a 'POST /api/login' /var/ossec/logs/archives/archives.json
The login events are visible and continuously updated.
We added the following rule in:
/var/ossec/etc/rules/local_rules.xml
<group name="wazuh_dashboard_login">
<rule id="100555" level="10">
<program_name>opensearch-dashboards</program_name>
<match>POST /api/login 200</match>
<description>Wazuh Dashboard Successful Login</description>
<group>authentication_success,</group>
</rule>
</group>
The rule matches successfully using:
sudo /var/ossec/bin/wazuh-logtest
Result:
Phase 1: Completed pre-decoding
program_name: opensearch-dashboards
Phase 2: Completed decoding
Phase 3: Completed filtering
id: 100555
description: Wazuh Dashboard Successful Login
Alert to be generated
Despite successful rule matching in wazuh-logtest:
/var/ossec/logs/alerts/alerts.json
/var/ossec/logs/alerts/alerts.log
However, login events continue to be collected in:
/var/ossec/logs/archives/archives.json
Journald collection is enabled:
<localfile>
<log_format>journald</log_format>
<location>journald</location>
</localfile>
Dashboard service:
sudo systemctl status wazuh-dashboard
Status:
active (running)
POST /api/login the recommended approach?
wazuh-logtest indicate that an alert will be generated while no event appears in alerts.json?
We would appreciate any guidance or best practices regarding monitoring Wazuh Dashboard authentication events.
Thank you for your support.
SOC Analyst / Security Engineer
[Company Name]
Wazuh Version: 4.14.5
Ubuntu Server
--
You received this message because you are subscribed to the Google Groups "Wazuh | Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wazuh/c660653e-b6c2-40f8-a8c7-2ae4fa9061d4n%40googlegroups.com.
