Splunk Search

Mass Searching for multiple domains

alexman616
Engager

Hello!

I am trying to search for multiple malware domains in our logs. I cant figure out how to add multiple domains in my search.

Example:

"Bad Domains:"

go9ogle.com
265online.com
bofa2.com

How could I search all of the above domains at the same time?

Labels (1)
Tags (1)
0 Karma
1 Solution

cmerriman
Super Champion

My suggestion would be to create either a lookup table with the bad domains or a macro. this way you can just add [|inputlookup bad_domains.csv] to the search (for a lookup)

The lookup will work best if the field is extracted in the logs (for instance, a domain field, in which the lookup table has a domain column).

The macro would work if you're just doing keyword searches

View solution in original post

to4kawa
Ultra Champion

cmerriman
Super Champion

My suggestion would be to create either a lookup table with the bad domains or a macro. this way you can just add [|inputlookup bad_domains.csv] to the search (for a lookup)

The lookup will work best if the field is extracted in the logs (for instance, a domain field, in which the lookup table has a domain column).

The macro would work if you're just doing keyword searches

alexman616
Engager

Thank you so much, we are looking at a list of almost 100,000 bad domains that have come out of this covid situation. I plan to break them up by 1,000 or 10,000... depending what splunk can take. Do you have any recommendations?

0 Karma

to4kawa
Ultra Champion
| makeresults
| eval domain=""
| append [| makeresults count=100000
| streamstats count as A
| eval domain="domain".A
| fields domain
| format]

Isn't it okay if you don't divide it?

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...