We have a use case query : Detect when auditing service on any critical system was disabled, stopped or restarted more than once in the past 7 days.
search query: earliest=-7d@d index=X OR index=Y sourcetype=abc EventCode=1100 | stats count min(_time) as firstTime max(_time) as lastTime by ComputerName EventCode | ctime(firstTime)
| ctime(lastTime)
| where count > 1
I am not able to get the user field because in windows event viewer there is no user info logged with 1100 event code(PFB link for more information)
https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-1100.[link text]1
I had thought of using ComputerName as common field in the search query to fetch user details since multiple users will be logged in to the same host this approach is not feasible. So could anyone shed some light on how to get user field for this use case?
You are assuming that a user initiated the shutdown which is as unlikely as so. This is really more of a Windows problem than a Splunk one. I would hit the Windows forums.
As you have noticed, the event 1100 will not have user name as this gets logged when someone/process stops the eventlogging service. What you could do to track back the user, is to look for log-off events (4634) around the time of 1100 and get the 'Logon ID' and correlate that with the respective Login event - 4624 to know the the user/process.