Splunk Search

How to add more fields to my table result in my search?

nazanin2016
Path Finder

Hi I am trying to find Malware activity detected on vulnerable systems so I did the subsearch as follow:

source="antivirus log" [search source="Vulnerability scanner.csv" |dedup IP,Vulnerability|rename IP as dest |table dest]|table dest Result_Status Attack_Name

It works correctly, but I was wondering how can I add more fields (not only the dest field that is common in both logs) from vulnerability scanner log to the final table, here as you see I can just table the fields that are in my Anti virus logs (dest Result_Status Attack_Name).

Thanks,

Tags (2)
0 Karma
1 Solution

somesoni2
Revered Legend

Give this a try

(source="antivirus log" [search source="Vulnerability scanner.csv" |stats count by IP|rename IP as dest |table dest] ) OR source="Vulnerability scanner.csv" | eval dest=coalesce(dest,IP) | stats dc(source) as sources values(Result_Status) as Result_Status values(Attack_Name) as Attack_Name values(Field1FromScannerlog) as Field1FromScannerlog values(Field1FromScannerlog) as Field1FromScannerlog... by dest | where sources=2 | fields - sources

View solution in original post

somesoni2
Revered Legend

Give this a try

(source="antivirus log" [search source="Vulnerability scanner.csv" |stats count by IP|rename IP as dest |table dest] ) OR source="Vulnerability scanner.csv" | eval dest=coalesce(dest,IP) | stats dc(source) as sources values(Result_Status) as Result_Status values(Attack_Name) as Attack_Name values(Field1FromScannerlog) as Field1FromScannerlog values(Field1FromScannerlog) as Field1FromScannerlog... by dest | where sources=2 | fields - sources
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...