Splunk Search

How do I extract certain fields into a KV Store and then perform checks against that KV Store

jhilton90
Path Finder

So I'm ingesting advanced hunting logs into Splunk and one of the interesting fields is properties.InitiatingProcessSHA1, which is a hash of whatever file (properties.InitiatingProcessVersionInfoOriginalFileName) is being run on the end user's machine. 

I want to be able to extract the SHA1 value and FileName value into a KV Store and then be able to make queries against that KV store.

For example, say there is a SHA1 hash for a file called text_program.exe, which has appeared in the logs:

SHA1: 111111111111

FileName: test_program.exe

I'd like to be able to extract the hash value as well as the file name into a KV Store, and make queries against the KV store. Because in the event that someone clicks on a phishing email and accidently downloads a program called text_program.exe and it has a hash value of 22222222222, I can investigate this.

I'm just wondering what the best way to tackle this would be

Labels (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

After you've created the KV Store collection, it can be used like any other lookup.  Use the outputlookup command to write to it and the lookup or inputlookup command to fetch from it.

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

jhilton90
Path Finder

Ideally I don't want to manually add field values to the kv store, I'd like the field values to be automatically added if they are not already in the KV Store.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

In that case, you may have to use a normal lookup table rather than a KVStore collection.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...