Wazuh active response on Windows: what it does and when teams need it
Wazuh active response lets the Wazuh server run a script on an agent when a rule fires, so a SOC can contain a threat in seconds instead of waiting for an analyst to open a ticket. For Windows endpoints, the default toolkit gives three scripts: netsh.exe blocks an IP address with Windows Firewall rules, route-null.exe adds the address to a null route, and restart-wazuh.exe restarts the Wazuh agent. The per-script behavior, parameters and supported platforms are described in the Wazuh default active response scripts reference, which is the right document to check against your agent version before you rely on any of them.
Automation is justified when the detection is high confidence, the action is reversible, and the affected host or address is unlikely to be needed by the business in the next few minutes. A rule that matches a known brute-force signature against an external address is a reasonable candidate. A rule that fires on a single failed login from an internal server, a domain controller, or a jump host is not, because a wrong block there can cut off administrators or the agent's own management path. Automated blocking should be limited to narrow, reversible actions that a human can undo quickly. Where the action could isolate a business system, the decision should stay with an analyst, and the playbook should say so in writing.
Before enabling any Windows script, confirm with your own environment which hosts, subnets and service accounts must never be blocked, and confirm how your agent versions handle the default scripts. Ask your Wazuh administrator to list every rule ID that will trigger an action, the owner who approved each one, and the rollback step. These answers decide whether the rollout is a short configuration change or a change-controlled program with testing and review.
Which default Windows script fits which response
The netsh script blocks an IP address by adding a rule through the Windows firewall command-line tool. It changes the host's firewall configuration, so its effect depends on the firewall profile and rule set already in place on that machine. Because it targets an address rather than a user or a process, it can stop traffic from a source you intended to block, and also from a shared address such as a NAT gateway or a proxy that serves legitimate users.
- What it changes: a firewall rule on the endpoint that drops traffic from the supplied address.
- How it is reversed: the active response timeout removes the rule when it expires, and you can also delete the rule manually or with a script.
- Main risk: shared or internal addresses, such as a gateway, a jump host or a monitoring server, can be cut off.
- Best fit: a clear external source hitting a single host, such as repeated failed logins from one address.
- Watch for: rule names and firewall profiles that differ between Windows editions and management tools.
Before you rely on this script, confirm on each Windows version in your fleet that the rule is created, applied and removed as the documentation describes, and check it against your existing firewall policy.
The route-null script adds a null route for the supplied IP address, so the host sends traffic for that address into nothing. It works at the routing layer rather than the firewall layer, which means its behavior can differ from the netsh script even though both aim to stop traffic from one address. Its effect on established connections, and on traffic that a firewall or VPN client handles differently, should be tested rather than assumed.
- What it changes: a route entry on the endpoint that directs traffic for the address to a null destination.
- How it is reversed: the timeout removes the route, or an administrator deletes it with the route command.
- Main risk: the same shared-address problem as netsh, plus possible interaction with VPN and multi-homed network configurations.
- Best fit: situations where you want to cut routing to an address even when a firewall rule is not the right control, such as some lab or segmented network designs.
- Watch for: unexpected effects on hosts with several network interfaces or split-tunnel VPN routing.
Confirm the route is created and removed correctly on your Windows versions and VPN clients, and confirm that the operating system does not replace it with a more specific route during normal use.
The restart script restarts the Wazuh agent service on the endpoint. It does not block network traffic or change firewall or routing state, so its effect on legitimate users is small compared with the other two scripts. Its purpose is to recover the agent or to reset its state after a suspected fault or tampering, rather than to contain an attacker directly.
- What it changes: the running state of the Wazuh agent service, with no change to network rules.
- How it is reversed: no reversal is needed, because the agent starts again after the restart.
- Main risk: a short gap in event collection while the agent restarts, and repeated restarts if a trigger fires often.
- Best fit: agent health problems, or cases where a restart is a sensible first step while an analyst investigates.
- Watch for: restarts that mask a deeper issue, such as a tampered configuration or a repeatedly crashing agent.
Confirm on your Windows versions that the agent restarts cleanly and that the script's logs show what happened, and make sure the trigger rules that call it cannot fire in a loop.
How to configure active response on Windows step by step
This sequence takes a Windows endpoint from a confirmed agent and script setup to a tested active response rule that blocks or reverses an action on a chosen set of agents. Each step closes with a check so the automation is proven before it touches real users.
Confirm agent version and script availability
The Wazuh administrator checks that the Windows agents are enrolled, report to the manager, and run a version that ships the default Windows scripts: netsh.exe for blocking an IP address with netsh, route-null.exe for adding an IP to a null route, and restart-wazuh.exe for restarting the agent. Confirm the exact script names against the default active response scripts documentation for your release line, since script behavior can differ between versions. The step is done when each target agent lists the expected executables in its active response directory and the manager shows the agents as active.
Define the active-response block in the manager
The administrator adds an active-response block to the manager configuration, normally the ossec.conf file on the Wazuh server, naming the command (such as netsh for blocking), the location (local or server side), and the action to run. Keep the block in version-controlled configuration so changes are reviewed. The step is done when the manager configuration validates and the manager restarts cleanly, with no configuration errors in its logs.
Link the response to specific rule IDs or levels
The administrator ties the response to rule IDs or a minimum rule level so that only well-understood detections trigger an action. Start with a narrow set of rules whose false positive rate is known from past alerts, and avoid broad level thresholds for blocking. Record the rule IDs and the reason each one was chosen. The step is done when a review of recent alerts shows that the selected rules would have fired on the intended activity and not on routine administrative traffic.
Set the timeout that reverses the action
The administrator sets a timeout on the active response so the block is undone automatically after a defined period, and confirms that the reversal command runs on the agent. Decide the timeout with the owners of the affected services, because a timeout that is too short re-exposes an attacker and one that is too long can lock out a legitimate user. The step is done when a test run on one agent shows the block applied at the start and removed when the timeout expires, with both events visible in the alerts.
Scope the response to agent groups
The administrator sets the agent scope through agent groups or the rule's agent selection, so the response runs only on the Windows endpoints where it is intended. Exclude domain controllers, management hosts, jump servers and any system whose availability is critical, and document the exclusions. The step is done when a list of the agents in scope matches the approved inventory and a query confirms that no excluded host is a target.
Verify with a controlled test alert
The administrator generates a controlled test event that matches the chosen rule, using a test source address or a test account that the owners have approved, and observes the full cycle: detection, active response execution, the block on the agent, and the automatic reversal. Confirm the result with the agent's active response log and the manager's alerts. The step is done when the test produces the expected sequence on the intended agent only, and no legitimate address or user was affected during the test.
Document the rollback and approval path
The administrator writes down how to disable the response quickly, who can approve changes to the rule set, and how to clear a block manually on an agent before the timeout ends. Assign owners for each rule and review the list after each Wazuh patch release. The step is done when the runbook has been reviewed by the security and operations owners and a second administrator has successfully disabled and re-enabled the response in a test environment.
Which alerts should trigger blocking and which should only notify
Decide which rules may trigger blocking by asking three questions about each candidate: how confident the rule is that the activity is malicious, how critical the asset is, and how easily the action can be reversed. A rule that fires on a single failed login or a broad pattern in a noisy log source is an alert, not a trigger. Blocking an IP address with netsh.exe or adding a null route with route-null.exe cuts off whatever sits behind that address, including a shared NAT gateway, a patch server or a monitoring probe. Start with rules that have a narrow match, a low false-positive rate in your environment and a clear, fast undo path. Confirm the false-positive rate from your own alert history, because vendor rule descriptions do not reflect how your users and services behave.
Before any rule is linked to an active response, tune it at the rule level. Use the alert history to find which rules fire on legitimate administration, backup jobs, vulnerability scanners and software deployment tools, then suppress, narrow or re-level them. High-volume and ambiguous rules should stay as notifications routed to an analyst queue, where a person can decide. Exclude domain controllers, Wazuh management servers, indexer nodes, jump hosts and the monitoring sources that probe your endpoints from any blocking logic, because a false block on those systems can stop authentication, log collection or your own visibility. Record each exclusion with an owner and a review date, and confirm with your identity and infrastructure teams which addresses those hosts use before you go live.
How timeouts undo blocking actions and where they fail
A Wazuh active response block is only half of the automation. The timeout that reverses it runs on the agent, so its reliability depends on the agent staying online, the reversing action matching the original, and the host state surviving until the timer fires. The cards below cover the places where a timed block can quietly fail and what to check before trusting it on production hosts.
The timeout parameter and reversal
In an active response definition, the timeout value tells the agent how long to wait before running the reversing command for the same script. For the netsh and route-null scripts, the reversal removes the block that the original run added. Confirm in your own test lab that the reversal runs with the same arguments and that a block added at time zero is removed at the expected time. Check how the timeout interacts with repeated_offenders so that repeated triggers do not stack unexpected durations.
Agent offline at expiry
The reversal is executed by the agent, not by the Wazuh server at the moment it is due. If the endpoint is disconnected from the manager when the timeout expires, the unblock may not happen on time. Ask how the agent queues or retries a pending reversal after reconnecting, and test a disconnected endpoint during a lab run. Until you have seen that behavior, treat the block as lasting at least as long as the agent is unreachable.
Agent restart and lost timers
A block created before an agent restart may not have its reversal scheduled when the agent starts again. This is the failure most likely to leave an endpoint blocked for an unplanned period, for example after a patch cycle or a service crash. Restart a test agent between the block and the timeout, then confirm whether the reversal still runs. Record the result in your change runbook so operators know which restarts require a manual check.
Orphaned netsh firewall rules
The netsh script adds a Windows Firewall rule for the offending address. If the reversal never runs, the rule stays in place after the incident and may block a legitimate service or user for good. Periodically list firewall rules created by the active response, for example with a documented naming convention, and compare them with the active alert history. Also confirm the script's rule name is unique so one reversal does not remove another block.
Orphaned null-route entries
The route-null script adds a route that sends traffic for an IP address to a null destination. Routes persist in the routing table, so a missed reversal leaves traffic silently dropped on that host, which can be harder to diagnose than a firewall rule. Inspect the routing table on test endpoints after a timed run and confirm the reversal removes only the intended entry. Document how an operator lists and removes these routes manually.
Blocks that outlive the incident
A timeout is a fixed clock, not a judgment about the threat. A shared address, such as a NAT gateway, a proxy or a load balancer used by many staff, can be blocked for everyone for the full duration. Before enabling timed blocking, identify which internal and partner addresses must never be blocked and exclude them. Ask your security team to define who can extend, shorten or cancel a block before the timer expires.
Testing active response so automation does not cut off legitimate users
Test every active response in a lab before it touches a production endpoint. Start with a single lab Windows endpoint enrolled to a non-production Wazuh server, then fire synthetic alerts that match the exact rule ID and level you plan to use as the trigger. Confirm that the alert reaches the active response, that the script runs on the agent, and that the expected action appears in the agent's active response log. Run the same trigger several times, because a block that works once can still fail when the same alert repeats within the timeout window. Confirm the default scripts' behavior in your own environment, including which address the script acts on, whether netsh.exe or route-null.exe is the one that takes effect on your Windows build, and what the agent logs when the action fails. DeployOpen scopes these tests in writing, so the test cases, lab systems and pass criteria are agreed before anyone runs them.
Next, confirm reversal. Let the timeout expire, or trigger the undo path where your configuration supports it, and verify that the blocked address is restored, the null route is removed or the agent restart completes as documented. Then test the paths that automation is most likely to break: business applications that use the test endpoint's network, VPN sessions, and authentication traffic to domain controllers or identity providers. Open a session from the lab endpoint to each service, trigger the block against an address the endpoint legitimately uses, and check whether that session stops, whether reconnection succeeds and whether the lockout affects other users sharing the same address. A block on a shared gateway or NAT address can cut off many people at once, so this check matters more than the script itself.
Finish by documenting rollback before go-live. Write down who can disable the active response, the exact steps to remove a block manually on each affected Windows endpoint, and the evidence each test produced, including the alert, the script output and the reversal result. Record the rule IDs and the restart or timeout settings you tested, so a later change to any of them triggers a retest. Ask your team to define the criteria for a failed test, such as any block against an internal service address or any reversal that does not complete, and treat those results as a stop condition. Repeat the test sequence after each Wazuh upgrade and after any change to rules or agent groups, because a new rule that matches a legitimate process can start blocking users without any change to the script.
Security and operational risks of automated response on Windows
Active response lets Wazuh change firewall rules and network routes on endpoints without a person in the loop. The same mechanism that stops an attacker can also cut off a legitimate host, so the controls around who can change configuration, which scripts run and how actions are recorded matter as much as the rules themselves.
Who can change active response
Active response is defined in the manager configuration, so anyone who can edit that configuration or the Wazuh API can decide which rule IDs trigger a block and on which agents. List every account and service that holds those rights, remove standing access where possible, and confirm that changes to the active response block go through the same review as other production changes. Check that dashboard and API roles do not grant configuration rights by accident.
Default active response scriptsScript integrity on agents
The netsh.exe, route-null.exe and restart-wazuh.exe programs run with high privileges on each Windows agent. If a script is replaced on one endpoint, the manager may still send commands that the agent executes under the altered file. Verify the hash of each script on a sample of endpoints after every agent upgrade or deployment, and restrict write access to the Wazuh active-response directory so only administrators can modify it. Treat any unexpected change as an incident.
Audit logging of automated actions
Every block, route change and restart triggered by active response should leave a record that someone can review later. Confirm that the alerts generated by active response are stored in the indexer with the agent name, source IP, triggering rule and timestamp, and that the Windows event log on the endpoint retains the firewall and route changes. Decide who reviews these records and how often, so a bad block is noticed before users report it.
Attacker-triggered denial of service
A block rule that fires on a single failed login or a noisy scanner can be used by an attacker to lock out a legitimate administrator, a monitoring server or a partner network. Spoofed or forwarded events can make a trusted address look hostile. Keep an allowlist of management, domain controller and monitoring addresses that active response must never block, and test that the allowlist is applied before enabling blocking on production hosts.
Change control and approval for automation
Automation that acts on production hosts needs the same change process as a manual firewall rule: a named owner, a written justification for each triggering rule, a test plan and a rollback step. Ask whether the organization requires an approval before a new trigger goes live, who can approve it, and how emergency changes are recorded afterward. Review the active response configuration on a fixed schedule, not only when something breaks.
How an alert becomes a timed Windows response
The flow starts on the Windows agent, which forwards event data to the Wazuh server. The server decodes the event and matches a rule. If the rule ID is in the active response triggering list, the server sends a command to the agent, which runs the script. A timeout then reverses the action. Check each hand-off, and record every trigger and reversal in the audit log.
Path from a Windows event to a timed, reversed response, with the audit record.
Questions teams ask before automating Windows responses
How much effort does it take to configure and test Wazuh active response on Windows?
Most of the effort is in testing, not in switching the feature on. Enabling the default scripts is a configuration change in the Wazuh server and agent settings, but each response needs a defined trigger rule, a tested action and a confirmed way to undo it. Teams should expect the bulk of the work to go into lab testing against real Windows builds, checking that the netsh.exe, route-null.exe and restart-wazuh.exe scripts behave as intended on each endpoint type. Ask any partner to show how many test cases the scope includes and how each one is recorded.
What drives the cost of a Windows active response project up?
The main drivers are the number of rules that trigger a response, the variety of Windows endpoints, the change control the organization requires and the depth of testing. Each triggering rule needs its own decision about the action, timeout and exclusions, so a short list of high-confidence alerts costs far less than a broad set. Endpoint variety matters because servers, domain controllers, kiosks and laptops respond differently to a blocked address. Quotes should list each of these as a line item so the buyer can see what changes the price.
Is the cost one-time, or does it recur after go-live?
Most of the cost is one-time: designing triggers, building the test plan, validating scripts and writing the approval process. Recurring work comes from keeping rules current as the Wazuh 4.14 line receives patch releases, reviewing exclusions when business applications change and retesting after agent or server upgrades. Ask the quote to separate build work from any ongoing review or retainer, and to say who owns each recurring task after handover.
What does our SOC and Windows admin team need to provide?
The SOC needs to confirm which alerts are trusted enough to act on and who can approve a response when it fires. Windows administrators need to supply the list of business-critical hosts, service accounts, VPN and proxy addresses, and any software that makes outbound connections that look suspicious. Both teams should agree on how an automated block is reviewed, reversed and recorded. Without these inputs, the test plan will rely on assumptions that production traffic may not match.
Can our own team implement this without outside help?
Yes, if your team already runs Wazuh agents and has Windows and SOC staff who can test changes safely. The default scripts are documented, and the work is mostly careful scoping, lab testing and change control. Outside help is most useful when the team lacks lab capacity, needs an independent review of blocking logic or wants the process documented for an audit. Decide that before work starts, because the answer changes the scope and the handover package.
How long does a tested rollout take for a small or large Windows estate?
Duration depends on scope: how many triggering rules are in play, how many endpoint groups need different behavior and how many test cycles change control requires. A rollout limited to one endpoint group and a handful of rules takes far less time than one covering servers, workstations and exceptions across several business units. No fixed duration applies to every estate, so ask for a timeline built from the written scope, with testing and approval steps listed separately.
What is the biggest risk of automated blocking on Windows?
The biggest risk is an automated response cutting off a legitimate user, server or service. A rule that fires on a shared address, a scanner or a patch server can block business traffic before anyone reviews the alert. Timeouts reduce the impact by undoing the action automatically, but they only work if the restore step is tested. Plan exclusions for management and backup networks, test the timeout path, and confirm how an administrator can clear a block quickly.
Which Wazuh active response scripts should we check before rollout?
Check the three default Windows scripts: netsh.exe, which blocks an IP address with netsh, route-null.exe, which adds an address to a null route, and restart-wazuh.exe, which restarts the agent. Each one changes host networking or service state differently, so test them separately on each Windows version you run. The official default active response scripts page is the reference to confirm current behavior before writing your test plan.
How DeployOpen scopes and delivers Wazuh active response on Windows
DeployOpen scopes Windows active response as a fixed-scope engagement with the scope agreed in writing before any work starts. The written scope names the rules that may trigger a response, the endpoint groups in and out of automation, the scripts involved (netsh.exe, route-null.exe and restart-wazuh.exe, or any custom script you approve), the timeout behavior for each action, and who approves changes to any of them. A quote follows from that document, so the first useful step for your team is to gather the inputs it will need: the rule IDs you are considering, a list of Windows server roles and their owners, and the change process your security and operations teams already use.
Delivery follows the same sequence the configuration requires. DeployOpen builds the test plan first, running each trigger in a lab or a non-production group and confirming that the block, the null route or the agent restart reverses when the timeout expires. Rollout then moves through a limited endpoint group before wider enablement, and each step is documented with the configuration as it was tested. DeployOpen implements, tests and documents open-source platforms such as Wazuh inside your own infrastructure, and it does not issue audit reports or attestations. If your assessors need independent evidence, confirm early which artifacts they will accept from the engagement.
Handover covers the active response configuration, the test results, a runbook for unblocking an address or reverting a route, and a list of owners for each trigger. Ongoing support, script updates and periodic retesting after Wazuh upgrades can be contracted as an optional retainer. Ask any provider to state in the written scope who maintains the scripts after handover and how they will be tested when the Wazuh release line changes.

