Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port commit from wazuh/wazuh - WMI, WMA APIs Integration for Retrieving Installed Windows Updates #372

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lchico
Copy link
Member

@lchico lchico commented Nov 29, 2024

Related issue
wazuh/wazuh#25766

Description

This PR introduces the integration of the Wazuh agent with both the WMI and WMA APIs to retrieve a comprehensive list of installed Windows updates. The retrieved update data will seamlessly merge into the existing Syscollector inventory to provide a more complete view of system updates.

I am using the wuapi.h file from Wine 9.20 to retrieve installed or updated hotfixes.

The following libraries were added as they are required for the WMI and WMA APIs:

  • wbemuuid.lib
  • lib/wuguid.lib

Note: These libraries were extracted from the Windows SDK - 10.0.22621.0 :

  • C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\wbemuuid.lib - 132 KB
  • C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\wuguid.lib - 88 KB

Tests

Validated the integration by cross-referencing retrieved data with Syscollector’s current update inventory.
I tested error handling under various scenarios to confirm robustness.

Compilation of the testing done

… Windows Updates

Merge pull request #26706 from wazuh/enhancement/25766-develop-integration-with-wmi-api-to-retrieve-installed-windows-updates

Develop Integration with WMI and WUA APIs to Retrieve Installed Windows Updates
@lchico lchico linked an issue Nov 29, 2024 that may be closed by this pull request
3 tasks
@lchico lchico changed the title Port WMI, WMA APIs Integration for Retrieving Installed Windows Updates Port commit from wazuh/wazuh - WMI, WMA APIs Integration for Retrieving Installed Windows Updates Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Develop Integration with WMI API to Retrieve Installed Windows Updates
2 participants