Getting Data In

What is the workaround for the missing Subject_Account_Name field in WMI Windows security events?

tonopahtaos
Path Finder

Windows security event 4724 and 4738 set Subject_Account_Name if you get these events through Windows universal forwarder locally. But if you do it through WMI, the Subject_Account_Name is set to NULL. Instead, you can see the user name in Account_Name field for both Subject and Target as multiple values. In that case, you do not know which user name is for Subject and which user name is for Target user.

Is there any workaround on this?

Thanks in advance.

0 Karma

ziegfried
Influencer

You can either use inline-extraction of that field using the rex command:

... | rex "(?ims)^subject:.+?account name:\s+(?<Subject_Account_Name>[^\v]+)"

Or you can add this regex to the sourcetype [WMI:WinEventLog:Security] in props.conf:

[WMI:WinEventLog:Security]
EXTRACT-subjectaccountname = (?ims)^subject:.+?account name:\s+(?<Subject_Account_Name>[^\v]+)

tonopahtaos
Path Finder

The second solution works perfectly for me. Thanks a lot.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...