Okta User Session Impersonation
A user has initiated a session impersonation granting them access to the environment with the permissions of the user they are impersonating. This would likely indicate Okta administrative access and should only ever occur if requested and expected.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2022/03/22"
3integration = ["okta"]
4maturity = "production"
5updated_date = "2024/12/09"
6min_stack_version = "8.15.0"
7min_stack_comments = "Breaking change at 8.15.0 for the Okta Integration."
8
9[rule]
10author = ["Elastic"]
11description = """
12A user has initiated a session impersonation granting them access to the environment with the permissions of the user
13they are impersonating. This would likely indicate Okta administrative access and should only ever occur if requested
14and expected.
15"""
16from = "now-30m"
17index = ["filebeat-*", "logs-okta*"]
18interval = "15m"
19language = "kuery"
20license = "Elastic License v2"
21name = "Okta User Session Impersonation"
22note = """## Triage and analysis
23
24### Investigating Okta User Session Impersonation
25
26The detection of an Okta User Session Impersonation indicates that a user has initiated a session impersonation which grants them access with the permissions of the user they are impersonating. This type of activity typically indicates Okta administrative access and should only ever occur if requested and expected.
27
28#### Possible investigation steps
29
30- Identify the actor associated with the impersonation event by checking the `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields.
31- Review the `event.action` field to confirm the initiation of the impersonation event.
32- Check the `event.time` field to understand the timing of the event.
33- Check the `okta.target.id`, `okta.target.type`, `okta.target.alternate_id`, or `okta.target.display_name` to identify the user who was impersonated.
34- Review any activities that occurred during the impersonation session. Look for any activities related to the impersonated user's account during and after the impersonation event.
35
36### False positive analysis
37
38- Verify if the session impersonation was part of an approved activity. Check if it was associated with any documented administrative tasks or troubleshooting efforts.
39- Ensure that the impersonation session was initiated by an authorized individual. You can check this by verifying the `okta.actor.id` or `okta.actor.display_name` against the list of approved administrators.
40
41### Response and remediation
42
43- If the impersonation was not authorized, consider it as a breach. Suspend the user account of the impersonator immediately.
44- Reset the user session and invalidate any active sessions related to the impersonated user.
45- If a specific impersonation technique was used, ensure that systems are patched or configured to prevent such techniques.
46- Conduct a thorough investigation to understand the extent of the breach and the potential impact on the systems and data.
47- Review and update your security policies to prevent such incidents in the future.
48- Implement additional monitoring and logging of Okta events to improve visibility of user actions.
49
50## Setup
51
52The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
53references = [
54 "https://blog.cloudflare.com/cloudflare-investigation-of-the-january-2022-okta-compromise/",
55 "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy",
56 "https://www.elastic.co/security-labs/monitoring-okta-threats-with-elastic-security",
57 "https://www.elastic.co/security-labs/starter-guide-to-understanding-okta",
58 "https://www.elastic.co/security-labs/okta-and-lapsus-what-you-need-to-know",
59]
60risk_score = 73
61rule_id = "cdbebdc1-dc97-43c6-a538-f26a20c0a911"
62severity = "high"
63tags = ["Use Case: Identity and Access Audit", "Tactic: Credential Access", "Data Source: Okta"]
64timestamp_override = "event.ingested"
65type = "query"
66
67query = '''
68event.dataset:okta.system and event.action:user.session.impersonation.initiate
69'''
70
71
72[[rule.threat]]
73framework = "MITRE ATT&CK"
74
75[rule.threat.tactic]
76id = "TA0006"
77name = "Credential Access"
78reference = "https://attack.mitre.org/tactics/TA0006/"
Triage and analysis
Investigating Okta User Session Impersonation
The detection of an Okta User Session Impersonation indicates that a user has initiated a session impersonation which grants them access with the permissions of the user they are impersonating. This type of activity typically indicates Okta administrative access and should only ever occur if requested and expected.
Possible investigation steps
- Identify the actor associated with the impersonation event by checking the
okta.actor.id
,okta.actor.type
,okta.actor.alternate_id
, orokta.actor.display_name
fields. - Review the
event.action
field to confirm the initiation of the impersonation event. - Check the
event.time
field to understand the timing of the event. - Check the
okta.target.id
,okta.target.type
,okta.target.alternate_id
, orokta.target.display_name
to identify the user who was impersonated. - Review any activities that occurred during the impersonation session. Look for any activities related to the impersonated user's account during and after the impersonation event.
False positive analysis
- Verify if the session impersonation was part of an approved activity. Check if it was associated with any documented administrative tasks or troubleshooting efforts.
- Ensure that the impersonation session was initiated by an authorized individual. You can check this by verifying the
okta.actor.id
orokta.actor.display_name
against the list of approved administrators.
Response and remediation
- If the impersonation was not authorized, consider it as a breach. Suspend the user account of the impersonator immediately.
- Reset the user session and invalidate any active sessions related to the impersonated user.
- If a specific impersonation technique was used, ensure that systems are patched or configured to prevent such techniques.
- Conduct a thorough investigation to understand the extent of the breach and the potential impact on the systems and data.
- Review and update your security policies to prevent such incidents in the future.
- Implement additional monitoring and logging of Okta events to improve visibility of user actions.
Setup
The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
References
Related rules
- Attempted Bypass of Okta MFA
- Attempts to Brute Force an Okta User Account
- High Number of Okta Device Token Cookies Generated for Authentication
- Multiple Device Token Hashes for Single Okta Session
- Multiple Okta User Auth Events with Same Device Token Hash Behind a Proxy