Detection rules › Splunk

Okta Suspicious Use of a Session Cookie

Status
production
Severity
low
Group by
"debugContext.debugData.dtHash", user
Author
Scott Dermott, Felicity Robson, Okta, Michael Haag, Bhavin Patel, Splunk
Source
github.com/splunk/security_content

The following analytic identifies suspicious use of a session cookie by detecting multiple client values (IP, User Agent, etc.) changing for the same Device Token associated with a specific user. It leverages policy evaluation events from successful authentication logs in Okta. This activity is significant as it may indicate an adversary attempting to reuse a stolen web session cookie, potentially bypassing authentication mechanisms. If confirmed malicious, this could allow unauthorized access to user accounts, leading to data breaches or further exploitation within the environment.

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1539 Steal Web Session Cookie

Rules detecting the same action

Other rules on this platform that filter on the same API call or operation.

Rule body splunk

name: Okta Suspicious Use of a Session Cookie
id: 71ad47d1-d6bd-4e0a-b35c-020ad9a6959e
version: 12
creation_date: '2024-04-17'
modification_date: '2026-05-13'
author: Scott Dermott, Felicity Robson, Okta, Michael Haag, Bhavin Patel, Splunk
status: production
type: Anomaly
description: The following analytic identifies suspicious use of a session cookie by detecting multiple client values (IP, User Agent, etc.) changing for the same Device Token associated with a specific user. It leverages policy evaluation events from successful authentication logs in Okta. This activity is significant as it may indicate an adversary attempting to reuse a stolen web session cookie, potentially bypassing authentication mechanisms. If confirmed malicious, this could allow unauthorized access to user accounts, leading to data breaches or further exploitation within the environment.
data_source:
    - Okta
search: |-
    `okta` eventType IN (policy.evaluate_sign_on) outcome.result IN (ALLOW, SUCCESS)
      | stats earliest(_time) as _time, values(client.ipAddress) as src_ip, values(client.userAgent.rawUserAgent) as user_agent, values(client.userAgent.os) as userAgentOS_list, values(client.geographicalContext.city) as city, values(client.userAgent.browser) as userAgentBrowser_list, values(device.os_platform) as okta_device_os, dc(client.userAgent.browser) as dc_userAgentBrowser, dc(client.userAgent.os) as dc_userAgentOS, dc(client.ipAddress) as dc_src_ip, values(outcome.reason) as reason values(dest) as dest
        BY debugContext.debugData.dtHash, user
      | where dc_src_ip>1 AND (dc_userAgentOS>1 OR dc_userAgentBrowser>1)
      | `okta_suspicious_use_of_a_session_cookie_filter`
how_to_implement: This detection utilizes logs from Okta Identity Management (IM) environments. It requires the ingestion of OktaIm2 logs through the Splunk Add-on for Okta Identity Cloud (https://splunkbase.splunk.com/app/6553).
known_false_positives: False positives may occur, depending on the organization's size and the configuration of Okta.
references:
    - https://attack.mitre.org/techniques/T1539/
drilldown_searches:
    - name: View the detection results for - "$user$"
      search: '%original_detection_search% | search  user = "$user$"'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
    - name: View risk events for the last 7 days for - "$user$"
      search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
      earliest_offset: 7d
      latest_offset: "0"
intermediate_findings:
    entities:
        - field: user
          type: user
          score: 20
          message: A user [$user$] is attempting to use a session cookie from multiple IP addresses or devices. Investigate further to determine if this was authorized.
analytic_story:
    - Suspicious Okta Activity
    - Okta Account Takeover
    - Scattered Lapsus$ Hunters
asset_type: Okta Tenant
mitre_attack_id:
    - T1539
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: application
security_domain: identity
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1539/okta_web_session_multiple_ip/okta_web_session_multiple_ip.log
          source: Okta
          sourcetype: OktaIM2:log
      test_type: unit

Stages and Predicates

Stage 1: search

`okta` eventType IN (policy.evaluate_sign_on) outcome.result IN (ALLOW, SUCCESS)

Stage 2: stats

| stats earliest(_time) as _time, values(client.ipAddress) as src_ip, values(client.userAgent.rawUserAgent) as user_agent, values(client.userAgent.os) as userAgentOS_list, values(client.geographicalContext.city) as city, values(client.userAgent.browser) as userAgentBrowser_list, values(device.os_platform) as okta_device_os, dc(client.userAgent.browser) as dc_userAgentBrowser, dc(client.userAgent.os) as dc_userAgentOS, dc(client.ipAddress) as dc_src_ip, values(outcome.reason) as reason values(dest) as dest
    BY debugContext.debugData.dtHash, user

Stage 3: where

| where dc_src_ip>1 AND (dc_userAgentOS>1 OR dc_userAgentBrowser>1)

Stage 4: search

| `okta_suspicious_use_of_a_session_cookie_filter`

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
dc_src_ipgt
  • 1
dc_userAgentBrowsergt
  • 1
dc_userAgentOSgt
  • 1
eventTypein
  • "policy.evaluate_sign_on"
outcome.resultin
  • "ALLOW"
  • "SUCCESS"
sourcetypeeq
  • OktaIM2:log