From 4e5ad462c3eaaa93652686be77e2ab228144a6d2 Mon Sep 17 00:00:00 2001 From: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:32:09 -0500 Subject: [PATCH] [New Rule] Adding Detection Logic for Okta User Sessions Started from Different Geolocations (#3279) * new rule 'Okta User Sessions Started from Different Geolocations' * Update rules/integrations/okta/initial_access_okta_user_sessions_started_from_different_geolocations.toml (cherry picked from commit 832ee02aed432d350b7b7c54b5d6a2108e0a6a8a) --- ...s_started_from_different_geolocations.toml | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 rules/integrations/okta/initial_access_okta_user_sessions_started_from_different_geolocations.toml diff --git a/rules/integrations/okta/initial_access_okta_user_sessions_started_from_different_geolocations.toml b/rules/integrations/okta/initial_access_okta_user_sessions_started_from_different_geolocations.toml new file mode 100644 index 000000000..66d93c49b --- /dev/null +++ b/rules/integrations/okta/initial_access_okta_user_sessions_started_from_different_geolocations.toml @@ -0,0 +1,66 @@ +[metadata] +creation_date = "2023/11/18" +integration = ["okta"] +maturity = "production" +min_stack_comments = "Breaking change in Okta integration bumping version to ^2.0.0" +min_stack_version = "8.10.0" +updated_date = "2023/11/18" + + +[rule] +author = ["Elastic"] +description = """ +Detects when a specific Okta actor has multiple sessions started from different geolocations. +""" +from = "now-30m" +interval = "15m" +index = ["filebeat-*", "logs-okta*"] +language = "kuery" +license = "Elastic License v2" +name = "Okta User Sessions Started from Different Geolocations" +note = """## Setup + +The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.""" +references = [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy", + "https://sec.okta.com/articles/2023/08/cross-tenant-impersonation-prevention-and-detection", + "https://www.rezonate.io/blog/okta-logs-decoded-unveiling-identity-threats-through-threat-hunting/" +] +risk_score = 47 +rule_id = "2e56e1bc-867a-11ee-b13e-f661ea17fbcd" +severity = "medium" +tags = ["Use Case: Identity and Access Audit", "Data Source: Okta", "Tactic: Initial Access"] +timestamp_override = "event.ingested" +type = "threshold" +query = ''' +event.dataset:okta.system and okta.event_type:user.session.start and not okta.security_context.is_proxy:true + and okta.actor.id:* and client.geo.country_name:* +''' + +[[rule.threat]] +framework = "MITRE ATT&CK" + +[[rule.threat.technique]] +id = "T1078" +name = "Valid Accounts" +reference = "https://attack.mitre.org/techniques/T1078/" + +[[rule.threat.technique.subtechnique]] +id = "T1078.004" +name = "Cloud Accounts" +reference = "https://attack.mitre.org/techniques/T1078/004/" + +[rule.threat.tactic] +id = "TA0001" +name = "Initial Access" +reference = "https://attack.mitre.org/tactics/TA0001/" + +[rule.threshold] +field = ["okta.actor.id"] +value = 1 + +[[rule.threshold.cardinality]] +field = "client.geo.country_name" +value = 2