Splunk Search

How do I create a new summarized field based on other field values?

memorecks
New Member

Hi guys

First of all, please excuse, I'm an absolute newbie in regards to Splunk. I'm trying to do the following. From a search, I received a list of users that tried to execute tools categorized as hacking tools by our endpoint protection. Basically, searching for certain signatures.

I'm already using the "bucket" function to span/aggregate events together within 24 hours. The goal is to receive one alert per user and day. Also, I'm using the dedup function, where the fields "user", "threatname", and "hostname" must be the same to sort out duplicate events. Now, I'm facing the case where one user has more than one computer. Because of that, I'm receiving two or more alerts if a user has more than one computer per day.

Would it be possible to create a new field called "hosts" as an example, where all the hostnames are summarized related to a specific user if the "dedup" parameters match? So that i only receive one alert per user/day and all the hosts are summarized in one field.

Here is the query:

 index=* DomainName=* signature="*HackTool*" OR signature=*Tool-NetCat* OR signature="*HTool*" OR signature="*Tool-PassView*" OR signature="*MeteTool*" OR signature="*Metasploit*" OR signature="*Tool-Nmap*" OR signature="*PowerSSH*" OR signature="*PWCrack*" OR signature="*Backdoor*" OR signature="*Webshell*" OR signature="*Mimikatz*" OR signature="*RemAdm" OR signature="*Exploit*" OR signature="*Generic PWCrack*" OR signature="*WebShell*"

| eval user=lower(user)
| dedup ThreatName user AnalyzerHostName
| bucket _time span=24h
| table  _time ThreatName ThreatType action ThreatActionTaken event_description detection_method user AnalyzerHostName 
  os_type IPAddress DomainName file_name file_hash

Thanks in advance for your consideration and assistance.

Tags (2)
0 Karma
1 Solution

bcyates
Communicator

Did you try via stats values? Assuming AnalyzerHostName is the field you want to aggregate, replace your table with this..

| stats values(AnalyzerHostName) by userThreatName ThreatType action ThreatActionTaken event_description detection_method _time 

View solution in original post

0 Karma

bcyates
Communicator

Did you try via stats values? Assuming AnalyzerHostName is the field you want to aggregate, replace your table with this..

| stats values(AnalyzerHostName) by userThreatName ThreatType action ThreatActionTaken event_description detection_method _time 
0 Karma
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...