Splunk Search

How to edit my props and transforms.conf to filter out Windows Security Events with Logon Type:3?

kalianov
Path Finder

Hi

I want to drop all Windows Security Events (4624, 4625, etc) with Logon Type:3
My first idea is to make filter on my Heavy Forwarder:

props.conf

[WinEventLog:Security]
TRANSFORMS-windows_events = win-event-cut-en
[host::server1]
TRANSFORMS-security  = events-null, drop_logtyp3, win

Maybe I must swap transforms (drop_logtyp3, win, events-null)?

transforms.conf

[events-null]
 REGEX = .
 DEST_KEY = queue
 FORMAT = nullQueue

[win-event-cut-en]
 DEST_KEY = _raw
 REGEX = ((.*+[\v])+)(?=This event is generated)
 FORMAT = $1

[win]
 REGEX = (?msi)^EventCode=(4624|4625|528|529|530|531|532|533|534|535|536|537|538)
 DEST_KEY = queue
 FORMAT = indexQueue

[drop_logtyp3]
 REGEX = (?msi).*Logon\sType:\s*3\D
 DEST_KEY = queue
 FORMAT = nullQueue

When I try my REGEX stanza in search, I get the correct result (no events with Logon Type:3):

 host="server1" | regex _raw != (?msi).*Logon\sType:\s*3\D

But it does not work in transforms.conf.

Second idea is to use blacklist in the inputs.conf on my Universal Forwarder (ver 6.3.3 64bit) which installed on the server1, but I can't find any examples with regex in blacklist, only a simple list of eventcodes: blacklist = 4624, 4625

e.t.c.

Tell me please, where are my mistakes?

0 Karma
1 Solution

javiergn
SplunkTrust
SplunkTrust

Hi,

I you just want to drop events with EventCode 4624, 4625, etc and Logon Type 3 from server1, why don't you simply get rid of those events with one transform and leave everything else? Your transforms look overcomplicated to me.
Try this and let me know:

[drop_logtyp3]
REGEX = (?msi)^EventCode=(4624|4625|528|529|530|531|532|533|534|535|536|537|538).*ComputerName=server1.*Logon\s+Type\s+3
DEST_KEY = queue
FORMAT = nullQueue

Unless you are trying to do something else, in which case the order is important. Read the props.conf specification in depth because it's an important and complicated topic.

If you want my advise, keep it simple initially and try to get your Logon Type 3 filtering working first, that is, only apply one transform at at time. Then apply others progressively.

Hope that helps,
J

View solution in original post

javiergn
SplunkTrust
SplunkTrust

Hi,

I you just want to drop events with EventCode 4624, 4625, etc and Logon Type 3 from server1, why don't you simply get rid of those events with one transform and leave everything else? Your transforms look overcomplicated to me.
Try this and let me know:

[drop_logtyp3]
REGEX = (?msi)^EventCode=(4624|4625|528|529|530|531|532|533|534|535|536|537|538).*ComputerName=server1.*Logon\s+Type\s+3
DEST_KEY = queue
FORMAT = nullQueue

Unless you are trying to do something else, in which case the order is important. Read the props.conf specification in depth because it's an important and complicated topic.

If you want my advise, keep it simple initially and try to get your Logon Type 3 filtering working first, that is, only apply one transform at at time. Then apply others progressively.

Hope that helps,
J

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...