How to Configure Wazuh Active Response

Wazuh Active Response is a security automation feature that allows Wazuh to take predefined actions automatically when specific threats or suspicious activities are detected.

Instead of simply generating alerts and waiting for an administrator to investigate, Active Response enables Wazuh to react immediately to security events.

Common automated actions include:

  • Blocking malicious IP addresses
  • Disabling compromised user accounts
  • Terminating suspicious processes
  • Removing malicious files
  • Executing custom security scripts

This capability transforms Wazuh from a passive monitoring platform into an active security enforcement tool capable of reducing attacker dwell time and limiting damage.

How Active Response Complements Detection Capabilities

Threat detection alone is often insufficient in modern environments.

Attackers can move laterally, escalate privileges, or deploy malware within minutes of gaining access.

Wazuh’s detection engine identifies suspicious activity through:

  • Log analysis
  • File Integrity Monitoring (FIM)
  • Vulnerability detection
  • Threat intelligence integrations
  • Custom detection rules

Active Response extends these capabilities by allowing immediate remediation after detection occurs.

For example:

  1. Wazuh detects multiple failed SSH login attempts.
  2. A rule triggers an alert.
  3. Active Response automatically blocks the attacking IP.
  4. Future login attempts are prevented.

This automated workflow significantly reduces response times and helps security teams contain threats before they escalate.

According to the SANS Institute, reducing the time between detection and containment is one of the most important factors in minimizing the impact of security incidents.

Difference Between Alerting and Automated Response

Many organizations initially use Wazuh solely for alerting purposes.

AlertingActive Response
Generates notificationsTakes automated action
Requires human interventionExecutes predefined remediation
Slower response timeImmediate response
Useful for investigationUseful for containment
Lower operational riskRequires careful tuning

Alerting remains important because not every security event should trigger an automated action.

However, for high-confidence detections such as brute-force attacks or known malicious IP addresses, Active Response can dramatically improve security outcomes.

How Wazuh Active Response Works

Active Response follows a straightforward workflow.

1. Event Detection

The process begins when Wazuh collects and analyzes security data from monitored systems.

Examples include:

  • Failed SSH logins
  • Windows authentication failures
  • File modifications
  • Malware detections
  • Web application attacks

These events are continuously evaluated by the Wazuh analysis engine.

2. Rule Matching

When an event is received, Wazuh compares it against its ruleset.

If a rule meets predefined conditions, Wazuh generates an alert that includes:

  • Rule ID
  • Severity level
  • Source IP
  • Username
  • Host information

You can also create custom rules to trigger Active Response actions for organization-specific threats.

See our How to Create Custom Detection Rules in Wazuh guide.

3. Response Execution

If the rule is configured for Active Response, Wazuh executes the associated response command.

Examples include:

ActionPurpose
firewall-dropBlock attacker IP
host-denyDeny access from specific hosts
netsh.exeBlock traffic on Windows
Custom scriptsOrganization-specific responses

The action can be executed:

  • On the Wazuh manager
  • On the affected endpoint
  • On multiple endpoints

depending on configuration requirements.

4. Action Logging and Auditing

Every Active Response action is recorded for auditing purposes.

Administrators can review:

  • Triggered rule IDs
  • Response commands executed
  • Execution timestamps
  • Success or failure status
  • Affected systems

This audit trail supports compliance requirements and incident investigations.

Components Involved in Active Response

Several Wazuh components work together to provide automated threat response.

Wazuh Manager

The manager serves as the central decision-making component.

Responsibilities include:

  • Processing incoming events
  • Matching detection rules
  • Determining whether Active Response should execute
  • Sending response instructions to agents

In most deployments, Active Response configurations are managed centrally from the manager.

Wazuh Agents

Agents execute response actions on monitored endpoints.

Examples include:

  • Blocking IP addresses on Linux servers
  • Running PowerShell scripts on Windows systems
  • Disabling accounts
  • Stopping malicious processes

Because the action occurs directly on the endpoint, response times are typically very fast.

See our How to Install a Wazuh Agent on Windows Server guide.

Rules and Decoders

Rules and decoders determine when Active Response actions should be triggered.

  • Decoders extract information from logs.
  • Rules evaluate the extracted data.
  • Active Response uses matching rules as triggers.

A poorly designed rule can create false positives and potentially execute unwanted actions.

For this reason, testing is critical before deploying automated responses in production.

See our How to Test Wazuh Rules guide.

Active Response Scripts

Scripts perform the actual remediation tasks.

Wazuh includes several built-in scripts, including:

  • firewall-drop
  • host-deny
  • disable-account
  • restart-service

Organizations can also develop custom scripts to support:

  • SOAR workflows
  • Internal security tools
  • Custom firewall solutions
  • Ticketing systems

The flexibility of custom scripts allows Wazuh to adapt to nearly any security operation workflow.

Integration with Operating System Firewalls

Many Active Response actions rely on native operating system firewall capabilities.

Examples include:

PlatformFirewall Technology
Linuxiptables
Linux (modern distributions)nftables
WindowsWindows Defender Firewall
BSD systemspf
OPNsensepf

When Wazuh executes a blocking action, it often interacts directly with these firewall technologies to deny malicious traffic.

See our How to Integrate Wazuh with OPNsense guide.


Common Wazuh Active Response Use Cases

 

Blocking Brute-Force SSH Attacks

One of the most common Active Response deployments involves defending SSH services from password-guessing attacks.

Detecting Repeated Failed Login Attempts

Attackers frequently attempt thousands of password combinations against exposed SSH servers.

Wazuh can detect:

  • Excessive failed login attempts
  • Authentication failures
  • Invalid usernames
  • Distributed brute-force campaigns

These events are commonly identified through built-in SSH detection rules.

See our How to Monitor Failed SSH Login Attempts Using Wazuh guide.

Automatically Blocking Malicious IP Addresses

Once a brute-force threshold is reached, Wazuh can automatically:

  • Block the source IP
  • Add firewall rules
  • Prevent future connection attempts

This response helps protect systems without requiring manual intervention from administrators.

Responding to Web Application Attacks

Web-facing applications are constant targets for attackers.

Blocking Suspicious Web Requests

Wazuh can analyze web server logs and identify suspicious requests targeting:

  • Login pages
  • Administrative panels
  • API endpoints
  • File upload functions

When malicious activity is detected, Active Response can immediately block the source.

Detecting Common Attack Patterns

Examples include:

  • SQL injection attempts
  • Directory traversal attacks
  • Cross-site scripting (XSS)
  • Command injection attacks

Combining log monitoring with Active Response provides a powerful layer of protection for web applications.

See our How to Monitor Apache Logs with Wazuh guide.

Stopping Malware Activity

Automated containment can significantly reduce the impact of malware infections.

Isolating Compromised Systems

When malware indicators are detected, Active Response can:

  • Block network communication
  • Restrict external connectivity
  • Prevent lateral movement

Containment is often the highest priority during an active incident.

Removing Malicious Files

Custom Active Response scripts can:

  • Delete known malicious files
  • Quarantine suspicious files
  • Trigger antivirus scans
  • Notify security teams

See our How to Detect Ransomware Activity Using Wazuh guide.

Protecting Against Network Scanning

Attackers often perform reconnaissance before launching attacks.

Detecting Reconnaissance Activity

Wazuh can identify behaviors such as:

  • Port scanning
  • Service enumeration
  • Network mapping attempts
  • Repeated connection probes

These indicators frequently appear before exploitation attempts.

Automatically Blocking Scanning Hosts

Once scanning activity exceeds a threshold, Wazuh can:

  • Block the source IP
  • Generate high-priority alerts
  • Escalate incidents for investigation

This helps reduce the attack surface exposed to external adversaries.

Account Protection Scenarios

Compromised credentials remain one of the most common attack vectors.

Disabling Compromised Accounts

When suspicious account activity is detected, Active Response can:

  • Disable user accounts
  • Force password resets
  • Revoke active sessions
  • Prevent unauthorized access

This can be particularly valuable for privileged accounts.

Monitoring Privilege Escalation Attempts

Wazuh can detect:

  • Unauthorized sudo usage
  • Failed privilege escalation attempts
  • Administrative account abuse
  • Suspicious permission changes

Active Response can then trigger immediate containment actions before attackers gain elevated privileges.

Research from the IBM Cost of a Data Breach Report consistently shows that faster detection and containment significantly reduce breach-related costs and operational disruption.

Wazuh Active Response Documentation: https://documentation.wazuh.com/current/user-manual/capabilities/active-response/active-response.html


Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *