Splunk Enterprise

How to adjust the parser in Splunk to look for things without space or to cleanse the datastream before parsed?

rh71rdu
Explorer

Hi!

I have a stream of (Syslog) data coming from my Router via UDP into my workstation that is received and parsed by Splunk into fields, to identify (mostly) attempts to breach my router’s firewall by outside servers.

Unfortunately the syslog stream consistently omits a space or Tab between the MAC address ‘item‘ and the source ip ‘item‘ like this:

…OUT= MAC=00:00:00:00:00:00:8484:26:2b:9b:ea:bd:src=31.220.1.83…

which causes all SRC IP address field to remain unparsed.

If I could instruct Splunk to look instead for “:src=xx.xxx.xxx.xxx” or cleanse the data stream by converting all “:src=“ into “: src=“ (note the space) I think my Splunk Search will begin interpreting these ‘rogue’ Source IP fields and reveal some interesting attempts to access my network.

Does anyone know how to adjust the parser in Splunk to look for things without a space or to cleanse the datastream before it is parsed?

Thanks,

Rob

0 Karma

matt8679
Path Finder

Hi,

So you can easily change this at search time with a regex.

Try something like this:

Your main search |rex field=_raw "src\=(?<src>\d+\.\d+\.\d+\.\d+)"

 

 

0 Karma
Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...