Step-by-Step Guide: Install Wazuh, Configure Windows Agent, and Create Custom Alert Rules (2025)๐ฅ
๐ก️ Step-by-Step: Install Wazuh, Configure Windows Agent & Custom Alerts
Complete hands-on guide to deploy Wazuh SIEM, connect Windows agents, monitor application installs, and create a custom alert rule.
๐ 1. Prerequisites
Server Requirements
- OS: Ubuntu 20.04 / 22.04 LTS or CentOS 7 / 8 / 9
- CPU: 4 cores (minimum)
- RAM: 8 GB (minimum)
- Storage: 50 GB or more recommended
- Ports: TCP 1514, 1515, 55000, 5601, 9200, 443
Accounts & Permissions
- Root or sudo privileges on Linux server
- Administrator privileges on Windows endpoint
- NTP service enabled for accurate timestamps
⚙️ 2. Wazuh Installation (All-in-One Node)
Step 2.1 – Update the System
# Ubuntu/Debian sudo apt update && sudo apt upgrade -y # CentOS/RHEL sudo yum update -y
Step 2.2 – Install Wazuh
curl -sO https://packages.wazuh.com/4.8/wazuh-install.sh sudo bash wazuh-install.sh --all-in-one
This script automatically installs:
- Wazuh Manager
- Filebeat
- Wazuh Dashboard (Kibana / OpenSearch)
- Wazuh Indexer (OpenSearch / Elasticsearch)
Dashboard Access: URL: https://<server-ip> Credentials: Displayed after installation — note them securely.
๐ฅ️ 3. Adding a Windows Agent
- Download latest agent: Wazuh Agent for Windows
- Run installer as Administrator and enter:
- Manager IP address
- Agent name (e.g., WIN10-LAB)
- Open services.msc → Ensure:
- Wazuh Agent status: Running
- Startup type: Automatic
- (Optional) On Wazuh Manager, register the agent manually:
sudo /var/ossec/bin/manage_agents
๐ช 4. Enable Windows Application Log Monitoring
Edit Wazuh configuration file:
sudo nano /var/ossec/etc/ossec.conf
Add this section:
no Application
Restart the manager: sudo systemctl restart wazuh-manager
๐ง 5. Create Custom Rule for Application Installation
Edit the local rules file:
sudo nano /var/ossec/etc/rules/local_rules.xml
Insert the following rule:
json MsiInstaller TEST ALERT: Windows application installation detected no_full_log
Restart Wazuh Manager to apply the rule: sudo systemctl restart wazuh-manager
๐งช 6. Testing the Custom Alert Rule
Step 6.1 – On Windows Agent
- Download a test MSI file (e.g., 7-Zip Installer).
- Run the installer normally.
Step 6.2 – Verify Alert on Manager
sudo tail -f /var/ossec/logs/alerts/alerts.json
Expected output:
"rule": {
"id": "110000",
"description": "TEST ALERT: Windows application installation detected"
}
Alternatively, open Wazuh Dashboard → Security Events to confirm the alert.
๐ 7. Maintenance & Updates
sudo apt update && sudo apt upgrade wazuh-manager wazuh-agent wazuh-indexer wazuh-dashboard -y
Backup before upgrade:
sudo tar -czvf wazuh-backup.tar.gz /var/ossec/etc
๐ 8. References
© 2025 • Wazuh Setup & Custom Rule Guide — Sidhesh D. ๐ฅ
Comments
Post a Comment