Hi All,
I've been evaluatng Wazuh 3.13 as part of the Security Onion 2.3 distribution. I've been working on setting up the vulnerability detector. The test setup is comprised of a Windows machine running the Wazuh agent, and the SO machine which has the manager. I've been installing a few known vulnerable software packages to see if they alert as expected. So far so good with the Wazuh agent itself (CVE-2021-41821), and Mozilla Firefox 3.6.8 -- which is reporting alot.
I've found one piece of software that I can't get to alert however, and that is PuTTY. I’ve installed version 0.74 on the test machine, hoping to trigger alerts for CVE-2021-36367, and CVE-2021-33500, however neither of these are alerted.
I assume it has nothing to do with syscollector and the basic setup, because I’m getting alerts for other packages, and I’ve also looked at the agent database in the ‘sys_programs’ table and I see PuTTY in there, so the manager should at least be aware of it.The NVD database is being updated offline, and the Wazuh vulnerability reported is of the 2021 vintage, so I have reason to believe that is all being handled correctly.
For reference, the ‘sys_programs’ entry has the following (product|version|vendor) information:
PuTTY release 0.74 (64-bit)|0.74.0.0|Simon Tatham
My latest avenue of investigation was CPE mapping with ‘cpe_helper.json’. On the SO VM, I’ve found this in the location ‘/nsm/wazuh/queue/vulnerabilities/dictionaries/cpe_helper.json’, but have also validated that this configuration also finds itself onto the so-wazuh container. The name, version, vendor information for the ‘sys_programs’ entry shown above doesn’t map very well to the CPEs referenced by the CVEs I want to alert. For reference, the CPE for putty 0.74 is ‘cpe:2.3:a:putty:putty:0.74:*:*:*:*:*:*:*’. So as I understand it I need to use ‘cpe_helper.json’ to specify some patterns / replacements:
• If I match ‘PuTTY’ in the product name, it should replace the product name with ‘putty’.
• If I match ‘Simon Tatham’ in the vendor name, it should repace the vendor name with ‘putty’’.
• Match and extract (with a group) the first two version fields (delimited by a ‘.’), and replace the version with the extracted version if a match occurred.
Below is the object I’ve tried to use to achieve the above.
{
"target": "windows",
"source": {
"vendor": [
"^Simon Tatham"
],
"product": [
"^PuTTY"
],
"version": [
"^([0-9]+\\.*[0-9]+)"
]
},
"translation": {
"vendor": [
"putty"
],
"product": [
"putty"
]
},
"action": [
"replace_vendor",
"replace_product",
"set_version_if_matches"
]
}
I've tried various iterations of the version regex, but no luck. Each time I change cpe_helper.json, I give the so-wazuh container a restart. Making sure that all the required files are still there afterwards (NVD feeds etc..)
I’m wondering if anyone here can spot anything wrong with what I’m doing, or tell me If I’m barking up the wrong tree and should be looking elsewhere. Any help appreciated.