How Wazuh malware detection works and when teams need it
If you already run Wazuh for monitoring, the first question is what it can and cannot tell you about malware. Wazuh is not a full antivirus engine. It does not replace an endpoint protection product that quarantines files as they land. Instead, it combines several signals on top of the telemetry its agents already send: rootcheck, which looks for signs of rootkits and suspicious system state on Linux and Windows hosts; YARA scans triggered by file integrity monitoring events, so that a new or modified file can be checked against pattern rules; file hash lists that flag known-bad or known-good files; VirusTotal lookups for hashes and file reputation; and ingestion of ClamAV or Windows Defender logs when those scanners already run on your hosts.
The model rests on the four Wazuh components. The Wazuh agents installed on endpoints collect file, log and system data and send it to the Wazuh server, which applies decoders and rules to find malware-related events. The Wazuh indexer stores the resulting alerts, and the Wazuh dashboard shows them to analysts. Because detection depends on the agent, a host without a healthy agent is a blind spot, and an attacker who disables or tampers with the agent removes most of this coverage. Confirm agent coverage across servers and endpoints before you judge detection quality.
Teams usually need this layer when they have endpoints or servers that are not covered by a dedicated antivirus or EDR product, when they want malware-related alerts correlated with file changes and login activity in one place, or when an audit asks for evidence of malware scanning on monitored systems. Confirm with your own security team which of the five signals you will run, which scanners already exist on each host class, and who owns triage of the resulting alerts. Those answers decide the rest of the build.
How malware signals reach the Wazuh dashboard
The path starts on the endpoint, where the Wazuh agent runs rootcheck and file integrity monitoring. A file change can trigger a YARA scan and hash or VirusTotal checks, while ClamAV or Windows Defender logs are forwarded as log data. The Wazuh server applies decoders and rules, then stores alerts in the Wazuh indexer, which the Wazuh dashboard reads. Check at each hand-off that the agent is enrolled and that the expected alert appears in the dashboard.
Malware signals from endpoint checks flow through the agent and server into the indexer and dashboard.
Which detection method fits which threat
Rootcheck is the Wazuh agent module that looks for signs of rootkits and host anomalies on the endpoint. It checks known rootkit signatures, suspicious file and directory conditions, and inconsistencies in system behavior, and it reports findings as alerts. It runs locally on the agent, so it does not need outbound network access to a threat feed to work. Its coverage is limited to what its checks were written to find, so a novel rootkit or a userland implant that avoids those checks can pass without an alert.
- What it detects: known rootkit traces, hidden files and processes patterns, and unexpected system file conditions defined in its checks.
- What it misses: malware that does not match a check, payloads that run only in memory, and activity that never touches the monitored conditions.
- Data dependency: the agent and the Wazuh server only, with check content delivered through the agent configuration.
- Network dependency: none at scan time, which makes it useful on segmented or air-gapped hosts.
- Operational note: scan results can be noisy on hosts with unusual software, so baseline them before treating each finding as an incident.
Confirm the rootcheck settings and check content your Wazuh version ships in the Wazuh documentation before relying on them for a specific control.
YARA scanning in Wazuh is triggered by file integrity events, so a file is scanned when it is created or modified in a monitored path rather than on a fixed sweep. This narrows the work to files that changed, but a file that was planted before monitoring began, or placed in a path outside the monitored set, is not scanned. Detection quality depends on the YARA rules you write or import and on how often they match benign files.
- What it detects: byte patterns, strings and structures defined in your rule set, in files written to monitored directories.
- What it misses: fileless malware, encrypted or packed payloads that no rule describes, and files that existed before the rules were deployed unless you scan them separately.
- Data dependency: file integrity monitoring scope, the YARA rule set maintained on the agent or server, and enough local resources to scan the files.
- Network dependency: none for matching, but rule updates and any shared rule repositories need a controlled path.
- Operational note: scanning large binaries or directories can add load, so limit paths and file types to where attackers actually write.
Check which directories are monitored, how rules are versioned and tested, and how false positives are reviewed before you expand scope.
Hash lists compare file digests against a list of known-bad values, typically kept as CDB lists that rules can reference. They are fast and precise for files that are already known and unchanged. A single changed byte produces a different hash, so a list only catches the exact samples someone has already recorded and cannot identify a modified variant.
- What it detects: files whose digests exactly match entries you have loaded, such as previously confirmed samples from your own incidents or shared feeds you trust.
- What it misses: any recompiled, repacked or slightly altered version of a sample, and anything not yet in the list.
- Data dependency: a maintained list of hashes, the rules that reference it, and a process to add entries after investigations.
- Network dependency: none if lists are maintained locally, though many feeds are only delivered over a network path you must approve.
- Operational note: stale lists give false confidence, so assign an owner and review cadence for every list.
Ask which hash sources your team trusts, how entries are validated, and how often lists are reviewed and retired.
VirusTotal lookups send a file hash or related indicator to an external service that reports how many engines flag it and what related context exists. The result draws on a much larger corpus than any local list, which helps with known samples. It is still a signature and reputation service, so it does not recognize behavior that no engine has yet described, and it requires that the endpoint or server can reach the external service.
- What it detects: files and indicators already known to participating engines and the context those engines attach.
- What it misses: new or targeted samples with no submissions, and anything that cannot be reduced to a hash or indicator you can send.
- Data dependency: a valid API key, a decision on which hashes leave your environment, and a record of what was queried.
- Network dependency: outbound access to the external service from the Wazuh server or integration host, which many regulated networks restrict or prohibit for certain data.
- Operational note: sending file hashes can reveal internal activity, so confirm data handling rules with your legal and privacy team before enabling it.
Confirm the current integration method and key handling in the Wazuh documentation and your own data policy, and plan for the case where the lookup service is unreachable.
Some organizations already run ClamAV or Windows Defender. Wazuh can collect their logs so that detections appear alongside other security events in one place. These logs record what the antivirus product detected and acted on, but Wazuh does not replace the product's engine. Its visibility is limited to what that product scanned and reported, and it depends on the product being installed, healthy and logging.
- What it detects: whatever the antivirus engine already detects, as reported in its own logs, including quarantine and remediation events.
- What it misses: anything the antivirus engine missed, disabled or excluded, and any host where the product is absent or its logs are not forwarded.
- Data dependency: log collection from the endpoint, correct decoders for the product's log format, and retention that matches your investigation needs.
- Network dependency: the agent must reach the Wazuh server, and any signature updates depend on the antivirus vendor's own update path.
- Operational note: exclusions configured in the antivirus product are invisible to detections, so review them as part of the same process.
Confirm which log channels and files your endpoints produce, which decoders apply to them, and whether the antivirus product runs on every host in scope.
Configuration options and when each one fits
This table compares the main detection options for Wazuh malware detection, from rootcheck and YARA scanning to hash lists, VirusTotal lookups and antivirus log collection. Read each row for what it adds, how much setup it needs, and whether file hashes or content leave your network. Start with the options that keep data local, then add external lookups only where your data handling rules allow them.
| Option | Purpose and effort | Data sent outside the network | Main trade-off |
|---|---|---|---|
| Rootcheck scans | Built-in checks for known rootkit indicators and system anomalies on agents. Low effort: enabled by default in the agent configuration, with tuning of scan frequency and ignore lists. | No | Signature coverage is limited, so it complements rather than replaces file scanning. |
| YARA rule sets and scan directories | Scans files in chosen directories when FIM detects a change. Moderate effort: rule authoring, testing, and choosing directories that avoid noisy paths. | No | Broad directories raise scan load on endpoints; narrow scopes miss files written elsewhere. |
| CDB hash lists | Compares file hashes against known-bad lists maintained by your team. Low to moderate effort: building, updating and referencing lists in rules. | No | Hash matches catch only exact copies, so a repacked binary bypasses them. |
| VirusTotal integration | Looks up file hashes against VirusTotal for reputation results. Moderate effort: API key setup, rule wiring and rate-limit planning. | Yes, hashes are submitted to the VirusTotal service | Needs a documented decision on whether your data policy allows hash lookups. |
| VirusTotal API key handling | Stores the API key in the server configuration with restricted file permissions and access. Low effort, but it must be rotated and kept out of shared configuration. | Not applicable, but a leaked key lets others consume your quota | Simple to set up, while key exposure affects every rule that depends on it. |
| ClamAV log collection | Forwards ClamAV scan results from Linux endpoints into Wazuh alerts. Low effort: confirm log location and add a localfile entry. | No | Detects only what ClamAV signatures cover, and log format changes need decoder updates. |
| Windows Defender log collection | Collects Defender event channel entries for detections and remediation actions on Windows. Low effort: confirm the event channel is collected and decoded. | No | Alerts reflect Defender's own verdicts, so they add visibility rather than independent analysis. |
Setting up malware detection step by step
This sequence takes a Wazuh deployment from agent inventory to a tested malware detection pipeline, where each layer (rootcheck, YARA, hash lists, external lookups and antivirus logs) is confirmed to raise alerts that reach the dashboard.
Confirm agent coverage and operating system support
The Wazuh administrator lists every endpoint that should be monitored and checks that each one has an active agent in the expected agent group. Compare the agent list in the dashboard against your asset inventory, and confirm that each operating system family in scope is supported by the agent version you run. Record any gaps, such as hosts that never enrolled or agents that report as disconnected. The step is complete when every in-scope host appears as active, and the exceptions are documented with an owner.
Enable and tune rootcheck
Enable the rootcheck module in the agent configuration for each group, starting with a pilot group of representative servers and workstations. Review the first rootcheck results for false positives, such as known legitimate binaries or expected hidden files, and add documented exclusions rather than disabling the module. Confirm that rootcheck alerts appear in the dashboard for a known test condition on a pilot host. The step is complete when the pilot group produces a baseline with understood, documented exceptions.
Deploy YARA rules and link scans to FIM events
Install the YARA binary on the agents that will scan, then place your approved rule set in a managed location and reference it in the active response or integration configuration. Wire the scan trigger to file integrity monitoring events so that new or modified files in watched directories are scanned. Confirm the rule set compiles on the agent and that the scan runs when a file changes. The step is complete when a test file written to a watched directory produces a YARA match alert on the server.
Load malware hash lists
Build a CDB list of file hashes from your approved threat intelligence sources, load it into the Wazuh server, and reference it in the rules that check file hashes from FIM and command output. Confirm the list format and the rule IDs that consume it with the Wazuh documentation for your version. Test with a hash you control that is present in the list. The step is complete when that hash triggers the expected rule and the alert shows the matched list entry.
Configure external lookups with approved credentials
If your policy allows external reputation lookups, such as VirusTotal, create the API key under an approved service account, store it in the location your secrets process defines, and restrict who can read it on the server. Confirm the lookup terms, data sharing rules and rate limits with the service and your legal or privacy team before enabling it, since file hashes or names may leave your environment. Test with a benign hash. The step is complete when a lookup returns a result, the key is not visible in plain text in shared configuration, and the owner has signed off on what data is sent.
Forward antivirus logs from ClamAV and Windows Defender
Configure the agents on hosts running ClamAV or Windows Defender to collect their logs, using the log collection settings for each log source, and add decoders only where the default ones do not parse the events. Confirm the event channel or log file path on a sample host before rolling out the configuration. Check that scan results and detections are indexed with the correct agent name and timestamp. The step is complete when a test detection or scan event appears in the dashboard with parsed fields.
Test with benign samples and verify dashboard alerts
Using the test plan agreed with the security team, place harmless samples that match each detection layer on pilot hosts: a rootcheck condition, a YARA-matching test file, a listed hash and an antivirus test signature where supported. Record the time each sample is created, the rule that fires and the alert that appears in the dashboard, then confirm that the alerts reach the expected analyst queue or integration. Remove the samples and document the results. The step is complete when every layer produces an alert that a reviewer can trace from the endpoint to the dashboard.
Tuning noise and avoiding false positives
Malware detection in Wazuh is noisy by default on busy hosts, so the first job is to decide what the alerts are for before tuning them. Rootcheck compares system files and process and port state against its own signature and anomaly checks, and a YARA scan of a directory tree can match legitimate software that happens to share patterns with malware families, such as packers, installers, developer tools and security agents. File-change triggers add volume on hosts where package managers, log rotation, container layers or build jobs write constantly. Each of these sources produces alerts that look like detections but are often expected behavior, which is why a host that has not been baselined will generate a flood of findings in its first days.
Volume is controlled by four levers: the scan scope, the excluded paths, the quality of the YARA rules and the alert level thresholds that decide what reaches the dashboard. Narrow the scan to directories where untrusted content lands, such as temporary, upload and user download paths, rather than entire filesystems. Exclude paths that change by design, and document each exclusion with an owner and a reason so auditors can see it was a decision. Retire or fix rules that match common system binaries, and confirm the exact configuration keys, scan frequency options and rule set source for your Wazuh release in the Wazuh documentation and the vendor's malware detection pages, since this section does not restate those settings.
Before trusting alerts, baseline each host class for a defined observation period in report-only mode. Record which findings recur, match them against known software, and tune only after the team agrees each suppression is justified. Then test the tuned setup with a harmless, labeled test file that matches a rule, so you know detections still fire after exclusions are added. Ask your team to confirm how baselines are repeated after major changes such as operating system upgrades, new build pipelines or new security tooling, because a baseline taken before a change can hide a real finding after it.
Security and operational considerations for malware alerts
Malware detection in Wazuh touches secrets, endpoint performance, incident handling and stored evidence, so each of these needs an owner before scanning goes live. The cards below cover the decisions that most often get skipped when a YARA and rootcheck rollout moves from a test group to production.
Protect VirusTotal API keys
A VirusTotal lookup sends a file hash, and sometimes file metadata, from your server to an external service, and the API key authorizes that traffic. Store the key in a restricted configuration file on the Wazuh server, limit read access to the Wazuh service account and administrators, and confirm with your data governance team which hashes or file paths are acceptable to share before enabling lookups.
Wazuh docsLimit who can change scan configuration
Changes to YARA rules, FIM directories and scan schedules decide what the agents look at, so an edit can quietly remove detection coverage. Keep the centralized agent configuration under version control, require review for changes to ossec.conf and rule files, and restrict dashboard and API roles that can push configuration to agent groups.
Treat malware alerts as possible incidents
A YARA match or a rootcheck finding can be a false positive from a packaged tool, or it can be the first sign of an active compromise. Write a triage runbook that states who receives malware-level alerts, how quickly they are reviewed, when the host is isolated, and when the active response is paused. Test the runbook with a harmless test file before relying on it.
Measure scan impact on endpoints
Scheduled scans of large directories consume CPU, disk I/O and time on the endpoint, and file-change triggered YARA scans can multiply that load on busy build or database hosts. Start with a narrow directory list on a pilot group, measure resource use during scan windows, and exclude paths that generate constant churn. Confirm the agent resource limits your endpoint team accepts before widening the scope.
Assign rule update ownership
YARA signatures and rootcheck signatures age, and detection value drops when nobody owns the update process. Name one team responsible for sourcing rule sets, reviewing their licenses, testing them on a non-production group and rolling them out, and record the date and source of each change so an auditor can trace which content was active at a given time.
Retain alert evidence deliberately
Malware alerts become evidence only if the raw events, the matched file metadata and the triage decisions are kept long enough for investigation and review. Set index retention for alert data according to your incident response and audit requirements, and decide whether files quarantined or hashed during triage must be preserved. Confirm the retention period with legal and compliance before you rely on the default settings.
Questions buyers ask before adding malware detection
Does Wazuh replace antivirus software on endpoints?
No. Wazuh is not a replacement for an endpoint protection product that blocks malware in real time. It detects suspicious conditions with rootcheck, file integrity monitoring, YARA scans triggered by file changes, hash list checks and log review, then alerts your team so they can investigate. Many organizations run Wazuh alongside their existing antivirus or EDR tool and use Wazuh for visibility, correlation and evidence. Confirm with your security team which controls must block threats and which may only detect them, because that answer decides whether Wazuh alone can meet your requirement.
What does the setup effort depend on?
The effort depends mostly on the operating systems in scope, how many endpoints you run, which detections you enable and how much tuning your environment needs. Windows hosts that forward Microsoft Defender logs, Linux servers with YARA rules and macOS or other platforms each add their own collection and testing work. Rootcheck and hash lists are simpler to start with, while file-change-triggered YARA scanning needs rule sets, exclusions for large or noisy directories and performance checks on real hosts. Ask any partner to break the work down by platform and by detection type in the written scope.
What does the work need from our own team?
Expect to supply access and decisions, not just time. Your team should provide a list of endpoints and their roles, approval for agent changes, access to a test host, the malware and hash intelligence sources you already trust, and an owner who decides what an alert triggers. Security analysts must review false positives and agree on severity levels. Change management for agent configuration and for any scanning that touches production data should also be planned up front, since these steps usually take longer than the technical build.
Can our in-house team build malware detection with Wazuh?
Yes, if your team has Linux and Windows administration skills, comfort with Wazuh rules and decoders, and time to test. The Wazuh documentation covers rootcheck, file integrity monitoring, the VirusTotal integration and the collection of ClamAV and Windows Defender logs, so the steps are documented. The harder parts are writing and testing YARA rules, tuning noise and proving that alerts fire as expected. A useful test is whether your team can trigger each detection on a controlled host and show the alert in the dashboard. If that is not yet possible, an outside partner can plan the scope and share the work.
How long does validation usually take?
Validation takes longer than the initial configuration because each detection must be proven, tuned and reviewed. In general terms, the stages are: a lab test with known-safe samples, a pilot on a small group of endpoints, review of false positives and a rollout with monitoring. The duration grows with the number of operating systems, the number of rules and how quickly your analysts can review results. Ask any provider for a written timeline tied to the scope, and confirm how long your change approval process takes, since that often sets the pace.
What costs recur after the setup is done?
The self-hosted Wazuh software has no license fee, so recurring costs come from infrastructure and people. Infrastructure includes the servers or cloud instances for the Wazuh indexer, server and dashboard, storage for alerts and archived events, and backups. People costs include analyst time to review alerts, rule and YARA maintenance, agent upgrades and periodic tuning. If you consider Wazuh Cloud, the vendor's managed service is priced separately, so confirm its plan terms directly with Wazuh. Ask any provider to separate one-time build costs from ongoing run costs in the quote.
How does malware detection fit with vulnerability detection?
They answer different questions. Malware detection looks for signs that something malicious is present or has changed on a host, using rootcheck, file integrity monitoring, YARA and hash checks. Vulnerability detection asks whether installed software has known weaknesses, by correlating the software inventory agents collect with vulnerability data from the Wazuh Cyber Threat Intelligence platform or an offline repository. A compromised host can have no known vulnerable package, and a vulnerable host can be clean, so you need both. Plan them together so that alerts from each feed the same triage process.
How DeployOpen scopes and delivers malware detection for Wazuh
DeployOpen plans, implements, tests, documents and supports self-hosted open-source platforms inside your own infrastructure, so Wazuh malware detection runs in your environment under your control. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
How we scope
- Inventory the endpoints, operating systems and file paths that rootcheck and YARA scanning must cover in your environment.
- Agree which file change events trigger YARA scans, which hash lists and VirusTotal lookups are in use, and where alerts go.
- Confirm which ClamAV and Windows Defender logs must reach the Wazuh server, and how each log source is collected.
How we build
- Deploy and configure rootcheck, FIM-triggered YARA scans, and CDB hash lists on agent groups under version control.
- Wire the VirusTotal integration and the ClamAV and Windows Defender log collection, with the decoders and rules these sources need.
- Test each detection path with controlled, benign test files and record the alerts produced, including false positives and tuning changes.
How we hand over
- Deliver a written design covering scope, detection content, agent group mapping, data flows and known limitations of each detection path.
- Document the configuration, rule and list ownership, and the steps to add YARA rules, update hash lists and review alert volume.
- Walk your security operations and platform teams through the alerts, the runbook and the retest results before handover.
How we support
- Offer ongoing support, Wazuh upgrade work and continuous testing of the malware detection setup as a retainer.
- Retest detection paths after Wazuh upgrades, rule changes or agent software updates, and report any gaps found.
- Confirm with your team which parts of the work are covered by the retainer and which require a new written scope.

