Initial Access (TA0001)(external, opens in a new tab or window)
text code block:from logs-okta* | where event.dataset == "okta.system" and (event.action like "user.authentication.*" or event.action == "user.session.start") and okta.security_context.is_proxy != true and okta.actor.id != "unknown" and event.outcome == "success" | keep event.action, okta.security_context.is_proxy, okta.actor.id, okta.actor.alternate_id, event.outcome, client.geo.country_name | stats Esql.client_geo_country_name_count_distinct = count_distinct(client.geo.country_name) by okta.actor.id, okta.actor.alternate_id | where Esql.client_geo_country_name_count_distinct >= 2 | sort Esql.client_geo_country_name_count_distinct desc
Install detection rules in Elastic Security
Detect Okta User Sessions Started from Different Geolocations in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).