Closed Rebits closed 8 months ago
To perform this vulnerability analysis and research we have used the following environment:
We have tested with the installation of different packages with vulnerabilities to check that they are detected. The version of the installed packages is the default version.
Regarding the issue https://github.com/wazuh/wazuh-qa/issues/4898, we've discovered that the node package is well-suited for conducting E2E tests on Windows 11 endpoints. Our next step is to ensure that this compatibility extends across all proposed test cases, akin to the evaluation conducted in https://github.com/wazuh/wazuh-qa/issues/4529. @santipadilla will oversee this verification process.
Additionally, we've assessed the compatibility of the MySQL package on CentOS.
It's imperative that we conduct thorough research to determine if the proposed packages are suitable for End-to-End vulnerability assessment tests.
The different versions of node have been installed from its official repository https://nodejs.org/dist/.
Case | Packages | Download links | CVE info | CVE detected |
---|---|---|---|---|
E2E-VD-3: Installation of a vulnerable package | Nodejs 17.0.1 | node-v17.0.1-x64.msi | Node.js-17.0.1 | CVE-2021-4044 |
E2E-VD-4: Updating a vulnerable package that remains vulnerable to the same CVE | Nodejs 17.0.1 -> 17.1.0 | node-v17.1.0-x64.msi | Node.js-17.1.0 | CVE-2021-4044 |
E2E-VD-5: Updating a vulnerable package that becomes vulnerable to another CVE | Nodejs 17.1.0 -> 18.0.0 | node-v18.0.0-x64.msi | Node.js-18.0.0 | CVE-2023-38552 CVE-2023-32006 CVE-2023-30590 CVE-2023-30589 CVE-2023-30585 CVE-2022-3602 CVE-2023-32002 CVE-2022-32222 CVE-2022-43548 CVE-2023-23920 CVE-2022-32212 CVE-2023-23919 CVE-2022-32214 CVE-2023-32559 CVE-2023-30588 CVE-2022-3786 CVE-2023-23918 CVE-2022-32215 |
E2E-VD-6: Updating a vulnerable package that becomes vulnerable to another CVE and retains the previous one | Nodejs 18.0.0 -> 18.1.0 | node-v18.1.0-x64.msi | Node.js-18.1.0 | CVE-2023-38552 CVE-2023-30590 CVE-2023-30589 CVE-2023-30585 CVE-2023-32002 CVE-2022-32222 CVE-2022-43548 CVE-2023-23920 CVE-2022-32212 CVE-2023-23919 CVE-2022-32214 CVE-2023-32559 CVE-2023-30588 CVE-2022-3786 CVE-2023-23918 CVE-2022-32215 CVE-2023-30581 CVE-2023-32006 CVE-2022-3602 |
E2E-VD-7: Updating a vulnerable package that ceases to be vulnerable | Nodejs 18.1.0 -> 19.5.0 | node-v19.5.0-x64.msi | Node.js-19.5.0 | - |
E2E-VD-8: Deleting a vulnerable package | Any of the previous ones | - | - | - |
E2E-VD-9: Installation of a non-vulnerable package | Nodejs 19.5.0 | node-v19.5.0-x64.msi | Node.js-19.5.0 | - |
E2E-VD-10: Updating a non-vulnerable package that remains non-vulnerable | Nodejs 19.5.0 -> 19.6.0 | node-v19.6.0-x64.msi | Node.js-19.6.0 | - |
E2E-VD-11: Updating a non-vulnerable package that becomes vulnerable | Nodejs 19.6.0 -> 20.5.1 | node-v20.5.1-x64.msi | Node.js-20.5.1 | CVE-2023-44487 |
Further research is imperative regarding the following agents:
It is necessary to identify vulnerable packages for the vulnerability detection module. Similar analysis conducted for the Windows 11 endpoint is essential for the remaining agents.
For centOS, @santipadilla encountered issues installing potentially vulnerable packages, I conduct an analysis of this situation within the E2E test environment.
Regarding macOS, our examination of the syscollector module revealed issues with the detection capabilities of pkg packages. Thus, it's crucial to verify if the Vulnerability Detection module can identify vulnerabilities in macport packages, as these are detected by syscollector.
MySQL packages are available here: https://downloads.mysql.com/archives/community/
Case | Packages | Download links | CVE info | CVE detected |
---|---|---|---|---|
E2E-VD-3: Installation of a vulnerable package | MySQL 5.5.20 | mysql-5.5.20 | mysql-5.5.20 | CVE-2018-2665 CVE-2018-2647 CVE-2018-2640 CVE-2015-2617 CVE-2018-2622 CVE-2018-2583 CVE-2018-0735 CVE-2017-3652 CVE-2017-10165 CVE-2017-3648 CVE-2012-0494 CVE-2017-3646 CVE-2017-3645 CVE-2017-3644 CVE-2017-3637 CVE-2017-3642 CVE-2017-3529 CVE-2012-1735 CVE-2017-3468 CVE-2014-2434 CVE-2014-6500 CVE-2017-3467 CVE-2017-3465 CVE-2017-3458 CVE-2017-3457 CVE-2016-3471 CVE-2012-0487 CVE-2013-3839 CVE-2017-3456 CVE-2017-3455 CVE-2017-3320 CVE-2020-14852 CVE-2017-3459 CVE-2016-2047 CVE-2012-0113 CVE-2017-3638 CVE-2016-0607 CVE-2017-3319 CVE-2018-2562 CVE-2017-3312 CVE-2017-3318 CVE-2017-3309 CVE-2016-0546 CVE-2012-3166 CVE-2017-3291 CVE-2017-3265 CVE-2015-2568 CVE-2013-1512 CVE-2017-3258 CVE-2016-0653 CVE-2016-0644 CVE-2017-3256 CVE-2017-3238 CVE-2017-10384 CVE-2017-10379 CVE-2015-4870 CVE-2012-3144 CVE-2017-10378 CVE-2017-10313 CVE-2017-10311 CVE-2017-10296 CVE-2017-3651 CVE-2017-10284 CVE-2017-10167 CVE-2016-8290 CVE-2016-9843 CVE-2016-8289 CVE-2018-2668 CVE-2017-3643 CVE-2014-4214 CVE-2016-8287 CVE-2017-3453 CVE-2016-7440 CVE-2014-2442 CVE-2016-5635 CVE-2016-0504 CVE-2015-2567 CVE-2014-0386 CVE-2016-5634 CVE-2016-0650 CVE-2017-3251 CVE-2016-5632 CVE-2017-3452 CVE-2015-2661 CVE-2016-5631 CVE-2012-1689 CVE-2016-5629 CVE-2016-5628 CVE-2017-3462 CVE-2015-4791 CVE-2016-5626 CVE-2017-3600 CVE-2013-0384 CVE-2016-5442 CVE-2016-5440 CVE-2016-3492 CVE-2017-3308 CVE-2016-3440 CVE-2012-0491 CVE-2016-5633 CVE-2016-0663 CVE-2016-0648 CVE-2016-6662 CVE-2016-0666 CVE-2016-0659 CVE-2016-0658 CVE-2016-0657 CVE-2016-0651 CVE-2016-0647 CVE-2016-5612 CVE-2016-0641 CVE-2016-0640 CVE-2013-5881 CVE-2016-0610 CVE-2017-3243 CVE-2016-3452 CVE-2016-0606 CVE-2017-3463 CVE-2014-0412 CVE-2016-0600 CVE-2016-0597 CVE-2013-2375 CVE-2017-3641 CVE-2016-0594 CVE-2016-0503 CVE-2016-0502 CVE-2019-2757 CVE-2015-4910 CVE-2014-0402 CVE-2015-4904 CVE-2014-0430 CVE-2015-4879 CVE-2015-4864 CVE-2015-4858 CVE-2014-2436 CVE-2015-4833 CVE-2016-8286 CVE-2015-4816 CVE-2015-4802 CVE-2015-4737 CVE-2013-5908 CVE-2016-0609 |
E2E-VD-4: Updating a vulnerable package that remains vulnerable to the same CVE | MySQL 5.5.20 -> 5.5.21 | mysql-5.5.21 | mysql-5.5.21 | Same as previous CVEs |
E2E-VD-5: Updating a vulnerable package that becomes vulnerable to another CVE | MySQL 5.5.18 -> 5.5.19 | mysql-5.5.18 | mysql-5.5.18 | In addition to all of the above, these new ones: CVE-2023-22007 CVE-2023-22028 CVE-2021-2356 CVE-2022-21417 CVE-2022-21444 CVE-2023-21980 CVE-2023-21977 |
E2E-VD-6: Updating a vulnerable package that becomes vulnerable to another CVE and retains the previous one | MySQL 5.5.18 -> 5.5.19 | mysql-5.5.19 | mysql-5.5.19 | Same as previous CVEs and retains the CVEs from 5.5.18 |
E2E-VD-7: Updating a vulnerable package that ceases to be vulnerable | MySQL has vulnerabilities in all its packages | - | - | - |
E2E-VD-8: Deleting a vulnerable package | Any of the previous ones | - | - | - |
E2E-VD-9: Installation of a non-vulnerable package | MySQL has vulnerabilities in all its packages | - | - | - |
E2E-VD-10: Updating a non-vulnerable package that remains non-vulnerable | MySQL has vulnerabilities in all its packages | - | - | - |
E2E-VD-11: Updating a non-vulnerable package that becomes vulnerable | MySQL has vulnerabilities in all its packages | - | - | - |
With Ubuntu 22.04 vulnerabilities are detected with the default "apt install" installation such as "sudo apt install openssl" or "sudo apt install samba". But when downloading and installing a package from an official repository it does not detect any vulnerability with any of the tested packages except mysql.
As we did not detect vulnerabilities in the versions of the installed packages, it was not possible to cover all cases since we cannot test with different versions, only with the version that ubuntu installs by default. With mysql it has not been possible to cover all the cases since it does not have any version without vulnerabilities.
By default, vulnerabilities appear as is the case with Vim but when downloading and installing those packages individually from its official repository, no vulnerability appears. Ubuntu does detect the installation and configuration of the packages but not the vulnerabilities.
It has been tested with versions that have vulnerabilities. The download and installation has been from the official repositories of each package:
openssl https://www.openssl.org/source/old/index.html libreoffice https://www.libreoffice.org/download/download-libreoffice/ postgresql https://www.postgresql.org/download/ nodejs https://nodejs.org/dist/ vim https://www.vim.org/download.php#unix
The packages are available in the CentOS 7 repository
Case | Packages | Download Links | CVE Info | Reference CVE | |
---|---|---|---|---|---|
E2E-VD-3: Installation of a vulnerable package | OpenJDK 1.6.0 | yum install java-1.7.0-openjdk.x86_64 |
OpenJDK1.6.0 | - | |
E2E-VD-4: Updating a vulnerable package that remains vulnerable to the same CVE | OpenJDK 1.7.0 | yum install java-1.7.0-openjdk.x86_64 |
OpenJDK1.7.0 | CVE-2014-4264 | |
E2E-VD-5: Updating a vulnerable package that becomes vulnerable to another CVE | OpenJDK 1.7.0 | yum install java-1.7.0-openjdk.x86_64 |
OpenJDK1.7.0 | CVE-2013-1777 | |
E2E-VD-6: Updating a vulnerable package that becomes vulnerable to another CVE and retains the previous one | OpenJDK 1.8.0 | yum install java-1.8.0-openjdk.x86_64 |
OpenJDK1.8.0 | CVE-2015-0477, CVE-2014-6549 | |
E2E-VD-7: Updating a vulnerable package that ceases to be vulnerable | There are no non-vulnerable packages | - | - | - | |
E2E-VD-8: Deleting a vulnerable package | Any of the previous ones | OpenJDK 1.6.0 | yum remove java-1.6.0-openjdk.x86_64 |
- | - |
E2E-VD-9: Installation of a non-vulnerable package | There are no non-vulnerable packages | - | - | - | |
E2E-VD-10: Updating a non-vulnerable package that remains non-vulnerable | There are no non-vulnerable packages | - | - | - | |
E2E-VD-11: Updating a non-vulnerable package that becomes vulnerable | - | - | - | - |
Packages Wrongly Marked as Solved: When installing a package with vulnerabilities and updating it to another version with vulnerabilities, they appear marked as solved
. Reported in https://github.com/wazuh/wazuh/issues/21984
Package is installed but does not detect vulnerabilities (NodeJS): When installing a package, the package is detected but the vulnerabilities are not detected. Tested with versions 16.20.1 of NodeJS. Reported in https://github.com/wazuh/intelligence-data/issues/63
It does not detect vulnerabilities with pkg, brew or macports. Open issue and left a comment about it.
Missing Issues reporting unexpected results in the following OS using alternative packages:
Ubuntu: https://github.com/wazuh/wazuh-qa/issues/4943#issuecomment-1946044466 CentOS: https://github.com/wazuh/wazuh-qa/issues/4943#issuecomment-1946476887
These results make it difficult to continue with https://github.com/wazuh/wazuh-qa/issues/4991. Feedback from developer team in regard to missing vulnerabilities is required.
Unexpected results in the following OS:
LGTM
Description
During Vulnerability Detection configuration change not updated in E2E tests, it was discovered that used vulnerable packages does not trigger expected vulnerabilities in the environment.
More information in https://github.com/wazuh/wazuh/issues/21789#issuecomment-1932540280
Further research is required.