When I right click winlogbeat executable and select Run As Administrator, I get the following message in the log file:
WARN EventLog[Security] Open() error. No events will be read from this source. Accessis denied."
I am able to view security logs both through the Event Viewer and the command line. Any ideas? When I select non-Security logs in the config, it works fine.
The access restrictions on the Security log are different than other event logs. On a vanilla Windows install a process running as Administrator should be able to access the Security log.
The above output shows the SecurityDescriptor that controls the access to the Security log. I'm curious if your is different? If so did someone modify the registry? See CustomSD.
The domain admin is most likely different than a local admin. The domain admin probably isn't a member of the Event Log Readers group.
Winlogbeat is going to be running as the local service account if you use the provided install scripts. This account should be able to read from the Security log.
Here are the CustomSD values in HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Eventlog\\Security for three different hosts. The first host is getting the Get-WinEvent error, and the other two work.:
// Doesn't work
O:BAG:SYD:(A;;CC;;;S-1-5-80-1717699148-1527177629-2874996750-2971184233-2178472682)(A;;CC;;;NS)
// Works
O:BAG:SYD:(A;;CCLCSDRCWDWO;;;SY)(A;;CCLC;;;BA)(A;;CC;;;ER)(A;;CC;;;S-1-5-80-1717699148-1527177629-2874996750-2971184233-2178472682)(A;;CC;;;NS)
// Works
O:BAG:SYD:(A;;CCLCSDRCWDWO;;;SY)(A;;CCLC;;;BA)(A;;CC;;;ER)(A;;CC;;;NS)
We are definitely in an administrator shell, i.e., right click on the Power Shell shortcut and select "Run As Administrator" when running the Get-WinEvent command on each host. Which API does winlogbeat use to grab the Security logs? Does winlogbeat, perhaps because of some dependency, actually need access to a functioning "Event Log Readers" group?
Regarding running as the a Domain Administrator, does your GPO give the admin group the user right to "Manage auditing and security log"? I believe this is where the SE_SECURITY_NAME privilege comes from that allows a user to access the Security log (as specified here).
Earlier you said that you ran it in a different manner. Perhaps you should stop it, clear the logs, start the service, and then check the logs to see if it is giving a "Access denied".
Is this problem occurring exclusively on the machines where Get-WinEvent fails?
I haven't seen this problem before. The closest issue I have seen is when a user installed a security update and the CustomSD value became empty. They were getting access denied until they restored the CustomSD value.
I think I would probably fire up Process Explorer from Sysinternals and check to see if the winlogbeat.exe process has the SeSecurityName. And compare that to another machine where it is working.
Is this problem occurring exclusively on the machines where Get-WinEvent fails?
I haven't seen this problem before. The closest issue I have seen is when a user installed a security update and the CustomSD value became empty. They were getting access denied until they restored the CustomSD value.
We have run it on 3 machines. winlogbeat is working on 1 machine, and not on the other 2. The command only fails on the non-functioning machine. So, plausibly, there is a connection the command failing and winlogbeat failing.
@andrewkroh I was able to get onto a test Windows system, and I tried the registry values out. It does look like the customSD of O:BAG:SYD:(A;;CC;;;S-1-5-80-1717699148-1527177629-2874996750-2971184233-2178472682)(A;;CC;;;NS) out.
It did reproduce the issue; the Administrator user cannot access the log. Deleting the registry value entirely seemed to have no impact on the system, and it restores access to the logs.
Thanks for the update. Probably this will be helpful to next person that encounters a similar issue. And the ConvertFrom-SddlString util is quite useful to know about.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.