Fix reading of Windows platform in 64 bits systems #832
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR solves the issue #825.
The Windows agent reads the OS information from the registry when it starts, sending the data to the manager and Kibana later.
By default, it was being read the 32 bits registry, even if the Windows is a 64 bits system.
The root cause of that issue is that in 64 bits Windows 10 Pro, there exists an inconsistency in both registry views. In the 32 bits registry, the
ProductName
key read fromHKLM\Software\ Wow6432Node\Microsoft\WindowsNT\CurrentVersion
contains the value Windows 10 Enterprise, while the equivalent value for the 64 bits view is Windows 10 Pro.It has been added a flag when opening the registry to read the 64 bits registry on 64 bits Operating Systems. This is the new information retrieved by the Wazuh agent:
Regards.