Splunk Enterprise Security

Splunk Enterprise Security: How to filter geographically improbable logins over small distances?

vanderhoff
Explorer

In Splunk Enterprise Security, the geographically improbable login correlation fires when users on our network transition between ipv4 and ipv6 due to the different latitude fields in the geoip database. Is there a way to filter out results by distance value?

0 Karma
1 Solution

jstoner_splunk
Splunk Employee
Splunk Employee

The rule by default looks for speed of more than 500. However, there is an evaluation of distance as well that is used to calculate speed. You could add a condition for distance being greater than x miles and/or swapping out the speed threshold.

View solution in original post

renjujacob88
Path Finder

| tstats summariesonly values(Authentication.app) as app, latest(Authentication.user_bunit) as user_bunit from datamodel=Authentication.Authentication by Authentication.user,Authentication.src _time span=1s | drop_dm_object_name("Authentication") | eventstats dc(src) as src_count by user | search src_count>1 | sort 0 + _time| get_asset(src) | iplocation src | eval session_lat=if(isnull(src_lat), lat, src_lat) | eval session_lon=if(isnull(src_long), lon, src_long) | eval session_city=if(isnull(src_city), City, src_city) | where isnotnull(session_lat) and isnotnull(session_lon) | sort 0 + _time | streamstats current=t window=2 earliest(session_lat) as prev_lat, earliest(session_lon) as prev_lon, earliest(session_city) as prev_city, earliest(_time) as prev_time, earliest(src) as prev_src, latest(user_bunit) as user_bunit by user | where (src!=prev_src) | globedistance(session_lat,session_lon,prev_lat,prev_lon,"m") | eval time_diff=if((_time-prev_time)==0, 1, _time - prev_time) | eval speed = round(distance*3600/time_diff,2)| where speed>1

0 Karma

jstoner_splunk
Splunk Employee
Splunk Employee

The rule by default looks for speed of more than 500. However, there is an evaluation of distance as well that is used to calculate speed. You could add a condition for distance being greater than x miles and/or swapping out the speed threshold.

vanderhoff
Explorer

Thanks I didn't realize I could edit the correlation searches, adding a "where distance > 1" did the trick.

0 Karma
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 ...