Splunk Search

Limiting Software Enumeration

mccobalt96
New Member

I would like to modify an existing dashboard to limit the Linux package that is being reported.  Specifically, I want to see any packages that start with kernel.  The plugin that is in use is Software Enumeration (SSH).  The existing query returns too many records and is truncated.  If I could limit it to see kernel packages only I think it would allow the query to complete.  Does anybody have any suggestions how to pass this kernel*?  

Labels (3)
0 Karma

mccobalt96
New Member

I believe I figured it out:

index=server_logs sourcetype="tenable:sc:vuln" pluginName="Software Enumeration (SSH)" dnsName = "$server$"
| rex field=pluginText "Linux system\s\:\s+(?<RPM>[^<]+)"
| rex field=RPM mode=sed "s/\s+/;/g"
| makemv RPM delim=";"
| mvexpand RPM | search RPM="kernel*"
| table dnsName RPM
| dedup dnsName RPM

Unfortunately it includes any kernel-* items not just what I am looking for (i.e. kernel-3.10.*).  If I could limit it to kernel-3* and kernel-2* I think it would get what I need... Any way to do that?  Thanks!

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Nice to hear that you figure it out. Probably this helps you to solve the rest?
https://community.splunk.com/t5/Splunk-Search/How-can-I-use-regex-with-wildcard-patterns-in-a-search...
Another option is | where match or like
r. Ismo
0 Karma

mccobalt96
New Member

I'm hoping this is what you are looking for:  (I'm a newbie).

index=server_logs sourcetype="tenable:sc:vuln" pluginName="Software Enumeration (SSH)" dnsName = "$server$"
| rex field=pluginText "Linux system\s\:\s+(?<RPM>[^<]+)"
| rex field=RPM mode=sed "s/\s+/;/g"
| makemv RPM delim=";"
| mvexpand RPM
| table dnsName RPM
| dedup dnsName RPM

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Can you post your query / dashboard code, so community could help you?
0 Karma
Get Updates on the Splunk Community!

Faster Insights with AI, Streamlined Cloud-Native Operations, and More New Lantern ...

Splunk Lantern is a Splunk customer success center that provides practical guidance from Splunk experts on key ...

Splunk Enterprise Security: Your Command Center for PCI DSS Compliance

Every security professional knows the drill. The PCI DSS audit is approaching, and suddenly everyone's asking ...

Developer Spotlight with Guilhem Marchand

From Splunk Engineer to Founder: The Journey Behind TrackMe    After spending over 12 years working full time ...