r/Wazuh • u/mirage_45 • 15d ago
Pulling Microsoft SQL execution logs on to Wazuh Dashboard
Has anyone setup audit feature in Microsoft sql server and pushed that data into wazuh dashboard
Getting logs on sql commands execution like insert, delete, create etc.
Any kind of writeups or guides are appreciated
1
Upvotes
1
u/External_Ad2172 15d ago
Yea, you need to run audit script on the mssql server, that will set audit and those events will start arriving at microsoft event channels
1
u/Wazuh_Marcos 15d ago
Yes, this works. The simplest way is to have SQL Server Audit write to the Windows Application log. The Wazuh agent already collects that log by default, so you only need a few custom rules on the manager to turn the events into alerts in the dashboard.
For example, the ossec.conf file includes this:
You will need custom rules. Here is an example:
This is the documentation about custom rules: https://documentation.wazuh.com/current/user-manual/ruleset/rules/custom.html. You need to restart the manager to apply the new rules, and then you can find the SQL alerts in the dashboard when the events are generated.