Getting Data In

Filtering Windows 4662 logs in Windows - Not working?

kknair007
Observer

Hello all,

I am trying to filter out those noisy 4662 logs eating our license like anything as recommended in Splunk blogs and forums.

Tried the below stanza for 4662 to blacklist everything except GPO related events, but not working as expected. Any help to fix the regex part.

blacklist1 = EventCode="4662" Message="Object Type:(?!\s*groupPolicyContainer)"

Raw Message is below : 

Message=An operation was performed on an object. Subject : Security ID: $ Account Name: $ Account Domain:  Logon ID: 0x7F897031 Object: Object Server: DS Object Type: groupPolicyContainer Object Name: CN={123456-D64E-4013-ACC5-F78A}CN=Policies,CN=System,DC=xyz,DC=xyyz,DC=com Handle ID: 0x0 Operation: Operation Type: Object Access Accesses: Read Property Access Mask: 0x10 Properties: --- Public Information distinguishedName groupPolicyContainer Additional Information: Parameter 1: - Parameter 2:

Can we filter directly based on Object_Type instead of Message field like : 

blacklist1 = EventCode="4662" Object_Type="(x|y)". 

Any help would be great! Thanks.

 

Labels (2)
0 Karma

mweb
New Member

I know this is an old thread, but we have this in our Windows_TA local.conf

 

blacklist1 = EventCode="4662|566" Message="Object Type:(?!\s*groupPolicyContainer)"
0 Karma

richgalloway
SplunkTrust
SplunkTrust

There is only whitespace between "Object Type:" and the value so "\s*" is correct.  The characters before "Object Type" are skipped automatically.

If the goal is to index only events of a certain Object Type then you probably want a whitelist rather than blacklist.

---
If this reply helps you, Karma would be appreciated.
0 Karma

kknair007
Observer

@richgalloway I tried the below as you suggested, not working. 

blacklist = EventCode="4662" Message="Object Type:\s*(dnsNode|dnsZone|container|computer|SecretObject)"

\s* caters to all whitespaces. What about other characters and numbers in Message field which has to be matched since Object Type is coming somewhere in the middle as per the raw event. 

Can you pls shed some light on this regex, Rich?

 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Object_Type is not one of the supported fields for blacklist.  IME, Splunk does not handle lookahead/lookbehind well, so try to avoid them.  Have you tried this?

blacklist1 = EventCode="4662" Message="Object Type:\s*(x|y)"
---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...