Splunk Search

Detecting network and port scanning using SPL?

balu1211
Path Finder

Hi, 

Could anyone help me with this use case as I'm trying to figure out my alert logic scanner use case scanning many ips on many ports

Labels (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @balu1211 ,

the easiest solution is to use the search that you can find in this app at [Content > Security Content] opening the Use Case "Basic Scanning", in this way you can find this search (and others):

index=* ( (tag=network tag=communicate) OR sourcetype=zscalernss-fw OR sourcetype=pan*traffic OR sourcetype=opsec OR sourcetype=cisco:asa) earliest=-1h 
| stats dc(dest_port) as num_dest_port dc(dest_ip) as num_dest_ip by src_ip 
| where num_dest_port > 1000 OR num_dest_ip > 1000

but it depends on the data you have and how they are parsed and normalized.

So to a void to make this analysis by chat (that's very difficoult), using this app, you can also check if you have all the data you need for this Use Case and if they are correctly parsed and normalized.

Anyway, you can adapt the above search to your data: e.g. I don't know if you tagged your data, if not, you have to modify the main search for your data.

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @balu1211,

you can find the search and all the information on the requested data sources about this Use Case in the Splunk Security Essentials App (https://splunkbase.splunk.com/app/3435).

Ciao.

Giuseppe

balu1211
Path Finder

Hi @gcusello 

Can you make a search out of it, scanning many scr_ip and many dest_ports 

Thanks

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @balu1211 ,

the easiest solution is to use the search that you can find in this app at [Content > Security Content] opening the Use Case "Basic Scanning", in this way you can find this search (and others):

index=* ( (tag=network tag=communicate) OR sourcetype=zscalernss-fw OR sourcetype=pan*traffic OR sourcetype=opsec OR sourcetype=cisco:asa) earliest=-1h 
| stats dc(dest_port) as num_dest_port dc(dest_ip) as num_dest_ip by src_ip 
| where num_dest_port > 1000 OR num_dest_ip > 1000

but it depends on the data you have and how they are parsed and normalized.

So to a void to make this analysis by chat (that's very difficoult), using this app, you can also check if you have all the data you need for this Use Case and if they are correctly parsed and normalized.

Anyway, you can adapt the above search to your data: e.g. I don't know if you tagged your data, if not, you have to modify the main search for your data.

Ciao.

Giuseppe

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...

Index This | How many sevens are there between 1 and 100?

August 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...