Wazuh SIEM & XDR / EDR Enterprise Agent Deployment, Hardening & Active Response
Before you begin
- Applies to:Managed deployment and hardening of Wazuh agents and response policies.
- Where to start:Start in the Wazuh management environment with an approved pilot endpoint group.
- What you need:Have deployment access, the approved agent configuration, and an owner for reviewing alerts and any active response changes.
Guide tools
Scope, Architecture & Agent Communication
This standard operating procedure governs the enterprise rollout, security hardening, File Integrity Monitoring (FIM), and automated Active Response mechanisms for the Wazuh Security Information & Event Management (SIEM) / Extended Detection and Response (XDR) platform across all server and workstation assets.
Port & Protocol Communication Matrix (per REF-NET-002):
| Destination Port | Protocol | Source | Service Description | Encryption |
|---|---|---|---|---|
| 1514 | TCP | All Endpoints | Wazuh Agent Data Reporting & Events | TLS 1.3 AES-GCM |
| 1515 | TCP | Enrolling Endpoints | Agent Auto-Enrollment Auth Daemon | TLS Encrypted |
| 55000 | TCP | Admin Workstations | Wazuh RESTful API Daemon | HTTPS |
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ â Wazuh Manager Cluster (10.10.10.50) â âââââââââ˛âââââââââââââââââââââââââ˛ââââââââââââââââ˛ââââââââ â TCP 1514 (Events) â â â TCP 1515 (Enrollment) â â âââââââââ´âââââââââââââââ âââââââââ´âââââââââ ââââââ´ââââââââââââââââââââ â Windows Domain Ctrls â â Linux Servers â â User Workstations â â (FIM + EventLog 4625)â â (Auditd + FIM) â â (Sysmon + Active Resp) â ââââââââââââââââââââââââ ââââââââââââââââââ ââââââââââââââââââââââââââPre-Flight Preparation & Registration Credentials
Configure Manager Registration Secret & Validate Ports
Manager PrepOn the Wazuh Manager, configure the pre-shared enrollment password in authd.pass and verify connectivity on TCP ports 1514 and 1515.
# On Wazuh Manager (/var/ossec/etc/authd.pass)echo "SuperSecretEnrollmentPassword2026!" > /var/ossec/etc/authd.passchmod 640 /var/ossec/etc/authd.passchown root:wazuh /var/ossec/etc/authd.passsystemctl restart wazuh-manager
# Test port from endpoint# Test-NetConnection -ComputerName 10.10.10.50 -Port 1514Windows Enterprise Agent Deployment
Silent Automated MSI Installation & Registration
Windows AgentDeploy via Active Directory Group Policy (Startup Script) or automated PowerShell deployment to install the MSI, pass enrollment parameters, and start the service.
[CmdletBinding()]param( [string]$ManagerIP = "10.10.10.50", [string]$EnrollmentPassword = "SuperSecretEnrollmentPassword2026!", [string]$AgentGroup = "windows-servers", [string]$InstallerUrl = "https://packages.wazuh.com/4.x/windows/wazuh-agent-4.8.0-1.msi")
$DownloadPath = "$env:TEMP\wazuh-agent.msi"Invoke-WebRequest -Uri $InstallerUrl -OutFile $DownloadPath
$Arguments = @( "/i", "`"$DownloadPath`"", "/q", "WAZUH_MANAGER=`"$ManagerIP`"", "WAZUH_REGISTRATION_SERVER=`"$ManagerIP`"", "WAZUH_REGISTRATION_PASSWORD=`"$EnrollmentPassword`"", "WAZUH_AGENT_GROUP=`"$AgentGroup`"")
Start-Process -FilePath "msiexec.exe" -ArgumentList $Arguments -Wait -NoNewWindowSet-Service -Name "WazuhSvc" -StartupType AutomaticStart-Service -Name "WazuhSvc"Get-Service -Name "WazuhSvc"Linux Enterprise Agent Deployment (Debian / Ubuntu / RHEL)
Automated APT / RPM Agent Deployment
Linux AgentImport the official Wazuh repository key, configure the package source, install the agent with enrollment parameters, and arm the systemd daemon.
#!/bin/bashset -euo pipefail
# 1. Install Wazuh GPG key and APT repositorycurl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/wazuh.gpg --importchmod 644 /usr/share/keyrings/wazuh.gpgecho "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main" | tee -a /etc/apt/sources.list.d/wazuh.list
# 2. Install Agent package with enrollment parametersapt updateWAZUH_MANAGER="10.10.10.50" \WAZUH_REGISTRATION_SERVER="10.10.10.50" \WAZUH_REGISTRATION_PASSWORD="SuperSecretEnrollmentPassword2026!" \WAZUH_AGENT_GROUP="linux-servers" \apt install -y wazuh-agent
# 3. Enable and start Wazuh agent daemonsystemctl daemon-reloadsystemctl enable --now wazuh-agentsystemctl status wazuh-agent --no-pagerSecurity Hardening & File Integrity Monitoring (FIM)
Centralized FIM Rule Hardening (agent.conf)
FIM HardeningConfigure centralized real-time File Integrity Monitoring within /var/ossec/etc/shared/default/agent.conf on the Wazuh Manager to automatically synchronize across all registered agents.
<agent_config> <!-- Real-Time File Integrity Monitoring (Syscheck) --> <syscheck> <disabled>no</disabled> <frequency>43200</frequency> <scan_on_start>yes</scan_on_start>
<!-- Linux Critical Filesystems --> <directories check_all="yes" realtime="yes" report_changes="yes">/etc,/usr/bin,/usr/sbin,/bin,/sbin</directories> <ignore>/etc/mtab</ignore> <ignore>/etc/hosts.deny</ignore>
<!-- Windows System Critical Locations --> <directories check_all="yes" realtime="yes" report_changes="yes">C:\Windows\System32\drivers\etc</directories> <directories check_all="yes" realtime="yes" report_changes="yes">C:\Windows\System32\GroupPolicy</directories>
<!-- Registry Keys for Persistence Detection --> <windows_registry>HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run</windows_registry> <windows_registry>HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce</windows_registry> <windows_registry>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services</windows_registry> </syscheck></agent_config>Automated Active Response (Brute Force Defense & Quarantine)
Configure Automated Firewall Drop & IP Ban
Active ResponseIn /var/ossec/etc/ossec.conf on the Wazuh Manager, configure automated host-level firewall drop rules to ban offending IPs for 30 minutes upon repeated SSH/RDP failure detection.
<!-- Define Active Response Command --><command> <name>firewall-drop</name> <executable>firewall-drop</executable> <timeout_allowed>yes</timeout_allowed></command>
<!-- Trigger active response on SSH/RDP repeated authentication failures (Rule 5712 / 60122) --><active-response> <command>firewall-drop</command> <location>local</location> <rules_id>5712,60122</rules_id> <timeout>1800</timeout> <!-- Block IP for 30 minutes --></active-response>Operational Verification & Alert Testing
Validate Agent Telemetry & Trigger Test FIM Alert
VerificationVerify agent status on the manager, then generate a benign file modification on the target endpoint to confirm the real-time FIM alert reaches the dashboard within 5 seconds.
# 1. Verify Registration from Wazuh Manager/var/ossec/bin/agent_control -l
# 2. Trigger Controlled FIM Test Alert on Endpoint# On Linux:echo "# Test SIEM Alert" >> /etc/hosts
# On Windows:# Add-Content -Path "C:\Windows\System32\drivers\etc\hosts" -Value "# Test SIEM Alert"Rollback, Agent Removal & SOC Verification Sign-Off
Clean Agent Removal & De-registration
RollbackIf an agent must be decommissioned or rolled back due to conflicts, stop the local service, remove the binary packages, and purge the registration record on the manager.
# Windows Rollback:# Stop-Service -Name "WazuhSvc" -Force# Start-Process "msiexec.exe" -ArgumentList "/x", "`"$env:TEMP\wazuh-agent.msi`"", "/q" -Wait
# Linux Rollback:systemctl stop wazuh-agentapt purge -y wazuh-agentrm -rf /var/ossec
# Remove Agent Record on Manager:/var/ossec/bin/manage_agents -r <AGENT_ID>SOC Sign-off & Verification Audit
Audit Sign-offVerify that each operational checkpoint meets production compliance criteria and record formal SOC sign-off.
AUDIT CHECKPOINT SUMMARY:[â] Agent Heartbeat: Active status confirmed in Wazuh Manager console[â] FIM Real-Time Trigger: Alert Rule 550 logged for test file modification[â] Active Response Validation: Test brute-force IP successfully blocked in firewall tableYour feedback keeps these production procedures accurate and battle-tested.