Configuration
Vulnerability detection is enabled by default on the Wazuh manager. The Vulnerability Scanner module uses endpoint inventory from the Syscollector module and vulnerability intelligence synchronized through the Wazuh indexer to detect vulnerabilities on monitored endpoints.
You can configure vulnerability detection in the Wazuh manager configuration file at /etc/wazuh-manager/wazuh-manager.conf, inside the <wazuh_config> element. Restart the Wazuh manager with systemctl restart wazuh-manager after you change it. The following block shows the default vulnerability detection configuration:
<vulnerability-detection>
<enabled>yes</enabled>
<feed-update-interval>60m</feed-update-interval>
</vulnerability-detection>
Where:
<enabled>specifies whether vulnerability detection is enabled. The default value isyes. The allowed values areyesandno.<feed-update-interval>specifies how often the Vulnerability Scanner module checks for vulnerability intelligence updates from the Wazuh indexer. The default value is60m(one hour). The allowed value is a positive number that contains a suffix character indicating a time unit, such ass(seconds),m(minutes),h(hours), ord(days).
Note
Setting feed-update-interval below 60m is not supported and will be ignored. Increasing the interval increases the time between vulnerability intelligence updates available to the Vulnerability Scanner module.
Requirements
Vulnerability detection depends on the endpoint inventory collected by the Wazuh Syscollector module. The Syscollector module is enabled by default on the monitored endpoint and must collect operating system and package inventory data.
The Syscollector configuration is found in the Wazuh agent configuration file. The file is located at:
/var/ossec/etc/ossec.conffor Linux endpoints.C:\Program Files (x86)\ossec-agent\ossec.conffor Windows endpoints./Library/Ossec/etc/ossec.conffor macOS endpoints.
The following block shows the default Syscollector configuration on a monitored endpoint. The <disabled>, <os>, and <packages> options are required for vulnerability detection. Detection timing depends on the configured Syscollector module scan interval. The default interval is 1h. To change the interval on several endpoints at once, set it in the agent.conf file of an agent group, as Centralized configuration describes.
<wodle name="syscollector">
<disabled>no</disabled>
<interval>1h</interval>
<scan_on_start>yes</scan_on_start>
<hardware>yes</hardware>
<os>yes</os>
<network>yes</network>
<packages>yes</packages>
<ports all="yes">yes</ports>
<processes>yes</processes>
<users>yes</users>
<groups>yes</groups>
<services>yes</services>
<browser_extensions>yes</browser_extensions>
<!-- Database synchronization settings -->
<synchronization>
<enabled>yes</enabled>
<interval>5m</interval>
<integrity_interval>24h</integrity_interval>
</synchronization>
</wodle>
For Windows endpoints, the Syscollector module also collects installed Microsoft updates. The Vulnerability Scanner module uses them to evaluate resolved vulnerabilities. The <hotfixes> option controls this collection, and its default value is yes:
<wodle name="syscollector">
<hotfixes>yes</hotfixes>
</wodle>
Wazuh indexer dependency
The Vulnerability Scanner module depends on the Wazuh indexer to obtain synchronized vulnerability intelligence.
If the Wazuh manager cannot connect to the Wazuh indexer, the Vulnerability Scanner module cannot retrieve vulnerability intelligence or index vulnerability data. As a result, vulnerability information might not be updated or available in the Wazuh dashboard.
You can validate the Wazuh indexer configuration in the <indexer> section of the Wazuh manager configuration file at /etc/wazuh-manager/wazuh-manager.conf. The default <indexer> configuration is:
<indexer>
<hosts>
<host>https://127.0.0.1:9200</host>
</hosts>
<ssl>
<certificate_authorities>
<ca>/etc/wazuh-manager/certs/indexer-ca.pem</ca>
</certificate_authorities>
<certificate>/etc/wazuh-manager/certs/indexer-connector.pem</certificate>
<key>/etc/wazuh-manager/certs/indexer-connector-key.pem</key>
</ssl>
</indexer>
Ensure that:
The
<hosts>section contains the full URL of a Wazuh indexer node, including the scheme and port.The Wazuh indexer CA and the Wazuh manager client certificate and key exist in
/etc/wazuh-manager/certs/asindexer-ca.pem,indexer-connector.pem, andindexer-connector-key.pem. If the Wazuh indexer runs on the same host, the Wazuh manager imports these files from/etc/wazuh-indexer/export/when it is installed and before every start.The Wazuh manager has valid Wazuh indexer credentials. The Wazuh manager stores this password in its keystore. Without these credentials, the Wazuh manager does not start.
You can check the certificates and the configuration files of the Wazuh manager with the following command. It prints check: no problem found on success, and exits 1 on any problem:
# /var/wazuh-manager/bin/wazuh-manager-resolve-credentials --check
Note
This check does not read the keystore, so it does not confirm that the Wazuh indexer password is present or correct. Every time the Wazuh manager starts, it reports the password state in the service journal:
# journalctl -u wazuh-manager | grep resolve-credentials | tail
the indexer password is in the keystore means a password is stored. MISSING WAZUH_INDEXER_MANAGER_PASSWORD means it is not, and the manager does not start.
The Wazuh manager never replaces an indexer password that is already in its keystore. After you change the wazuh-manager user password on the Wazuh indexer, update the keystore and restart the Wazuh manager:
# printf '%s' '<NEW_INDEXER_PASSWORD>' | /var/wazuh-manager/bin/wazuh-manager-keystore -f indexer -k password
# systemctl restart wazuh-manager
On the Wazuh manager, verify that the Wazuh indexer is reachable and operational by querying the cluster health API using a Wazuh indexer user. Enter the Wazuh indexer password when prompted:
# curl --cacert /etc/wazuh-manager/certs/indexer-ca.pem -u <WAZUH_INDEXER_USERNAME> -XGET https://<INDEXER_IP_ADDRESS>:9200/_cluster/health?pretty
Replace <INDEXER_IP_ADDRESS> with the address in the <host> entry of the <indexer> section. The address must match a name or IP address in the Wazuh indexer certificate, or curl rejects the connection.
A successful connection returns a result similar to the following:
{
"cluster_name" : "wazuh-cluster",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"discovered_master" : true,
"discovered_cluster_manager" : true,
"active_primary_shards" : 99,
"active_shards" : 99,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
Proxy environments
The Wazuh indexer downloads the vulnerability feed from Wazuh CTI over HTTPS. It connects to Wazuh CTI directly: it doesn't support an HTTP proxy, and it ignores JVM proxy properties such as https.proxyHost. Allow your Wazuh indexer nodes to reach Wazuh CTI on port 443, or use the offline vulnerability feed.
If your network inspects outbound HTTPS traffic with a TLS-intercepting proxy, the Wazuh indexer rejects the certificate of the proxy, and /var/log/wazuh-indexer/wazuh-cluster.log shows PKIX path building failed errors. To fix this, add the CA certificate of the proxy to a truststore for the Wazuh indexer. Perform the following steps as root on each Wazuh indexer node:
Copy the default truststore of the Wazuh indexer and import the CA certificate of the proxy. Replace
<PROXY_CA_CERT>with the path to the CA certificate in PEM format:# cp /usr/share/wazuh-indexer/jdk/lib/security/cacerts /etc/wazuh-indexer/proxy-truststore.p12 # /usr/share/wazuh-indexer/jdk/bin/keytool -importcert -noprompt -alias proxy-ca -file <PROXY_CA_CERT> -keystore /etc/wazuh-indexer/proxy-truststore.p12 -storepass changeit # chown root:wazuh-indexer /etc/wazuh-indexer/proxy-truststore.p12 # chmod 640 /etc/wazuh-indexer/proxy-truststore.p12
Create the
/etc/wazuh-indexer/jvm.options.d/proxy-truststore.optionsfile with the following content.changeitis the default password of the copied truststore:-Djavax.net.ssl.trustStore=/etc/wazuh-indexer/proxy-truststore.p12 -Djavax.net.ssl.trustStorePassword=changeit
Restart the Wazuh indexer:
# systemctl restart wazuh-indexer
Request a content update to check the connection. Replace
<WAZUH_INDEXER_USERNAME>and<INDEXER_IP_ADDRESS>with your values, and enter the password when prompted:# curl --cacert /etc/wazuh-indexer/certs/root-ca.pem -u <WAZUH_INDEXER_USERNAME> -X POST https://<INDEXER_IP_ADDRESS>:9200/_plugins/_content_manager/update
The request returns status
202. Wait about a minute, then check that/var/log/wazuh-indexer/wazuh-cluster.logshows no newPKIX path building failederrors.
Note
The copied truststore doesn't receive the CA updates of later Wazuh indexer packages. After you upgrade the Wazuh indexer, repeat step 1.
Offline vulnerability feed
Wazuh 5.0 uses the Wazuh indexer as the source of vulnerability feed data for the Vulnerability Scanner module. To update the vulnerability content without Internet access, load a newer snapshot into the Wazuh indexer, as Updating the content offline describes.