Splunk Search

How do I extract these 3 separate fields from Retina syslog output?

adamschmitz
Path Finder

I'm trying to extract the below syslog messages from Retina network scanner into 3 separate fields. Each time I start the extraction, I get the below message.

The extraction failed. If you are extracting multiple fields, try removing one or more fields. Start with extractions that are embedded within longer text strings

Here are a few samples.

Feb  1 13:33:23 10.5.3.62 2016- 2- 1 19:33:24 Retina: Retina has found Medium Severity audit SSL/TLS RC4 Cipher Suites Supported on ip 10.5.1.47.
Feb  1 13:31:49 10.5.3.62 2016- 2- 1 19:31:50 Retina: Retina has found Low Severity audit TFTP Server Detected on ip 10.5.3.2.
Feb  1 13:33:21 10.5.3.62 2016- 2- 1 19:33:22 Retina: Retina has found Medium Severity audit SSL Weak Cipher Suite Encryption Algorithm Key Length Supported on ip 10.5.1.47.
 Feb  1 13:33:20 10.5.3.62 2016- 2- 1 19:33:21 Retina: Retina has found Medium Severity audit SSL Weak Cipher Suite Supported on ip 10.5.1.47.
 Jan 20 04:34:30 10.5.3.62 2016- 1-20 10:34:32 Retina: Retina has found High Severity audit Microsoft Office Remote Code Execution - 3114553 Office 2010 on ip 10.5.3.67.

The 3 fields I want to extract are severity (High, Medium, Low), the vulnerability which is all text between the work 'audit' and the word 'on', the last field is the ip address.

I can get it to extract the severity, but it fails doing the other 2 fields.

Any help would be appreciated.

Thanks.

0 Karma
1 Solution

lguinn2
Legend

In props.conf

[yoursourcetypehere]
EXTRACT-ef1=has found (?<severity>\w+) Severity audit
EXTRACT-ef2=audit (?<vulnerability>.*)\son\s
EXTRACT-ef3= on ip (?<ip>\S+).$

If you don't have access to props.conf,you can use the regular expressions that follow the =. Using the field extractor, just choose to edit the regular expression - then replace the regular expression with what is given here. You will need to run the field extractor 3 times - once for each field: severity, vulnerability, ip.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

This regex string works with your sample data.

"(?<severity>\w+?) Severity audit (?<vuln>.*?) on ip (?<ip>\d+\.\d+\.\d+\.\d+)"
---
If this reply helps you, Karma would be appreciated.
0 Karma

lguinn2
Legend

In props.conf

[yoursourcetypehere]
EXTRACT-ef1=has found (?<severity>\w+) Severity audit
EXTRACT-ef2=audit (?<vulnerability>.*)\son\s
EXTRACT-ef3= on ip (?<ip>\S+).$

If you don't have access to props.conf,you can use the regular expressions that follow the =. Using the field extractor, just choose to edit the regular expression - then replace the regular expression with what is given here. You will need to run the field extractor 3 times - once for each field: severity, vulnerability, ip.

adamschmitz
Path Finder

Both ways worked but I like the props.conf method.

Thanks to both of you! Time for me to learn how to do extractions.

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, ...