x/sys/windows/registry: error reading/writing Windows Defender Registry #35730
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Windows
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The issue was raised on Go-Nuts: https://groups.google.com/forum/#!topic/golang-nuts/V-0GT02SMIs
I have been working with the Golang registry and noticed an issue when attempting to access / read from SOFTWARE\Microsoft\Windows Defender. The following code calls SOFTWARE\Microsoft\Windows NT\CurrentVersion and it outputs the correct information.
However, when attempting to access the Windows Defender registry key using the following code, it doesn't return any information.
I thought this may be an issue with permissions, so I checked the ACLs for the registry keys and all Authenticated Users do have read access to the object, and Adminstrators have Special permissions to the object. In order to confirm this, I used REG QUERY as shown below from a low privileged user account:
After this I thought it may require signed Microsoft binaries in order to access the registry location, I then installed Registry Editor, a 3rd party viewer which was able to access the information. Finally, I thought it could be an issue with programming languages being unable to access the registry, so I tried it using the following Python code:
The code above did return the correct information, which leads me to believe that there is an issue with the Golang registry implementation. Either that, or I am not using the registry correctly with Golang.
Any help would be greatly appreciated.
What did you expect to see?
I expected to see a value returned from the Windows Defender registry: HKLM\SOFTWARE\Microsoft\Windows Defender.
What did you see instead?
The following error was returned instead: The system cannot find the file specified
The text was updated successfully, but these errors were encountered: