MFA Deactivation with no Re-Activation for Okta User Account

Detects multi-factor authentication (MFA) deactivation with no subsequent re-activation for an Okta user account. An adversary may deactivate MFA for an Okta user account in order to weaken the authentication requirements for the account.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/05/20"
 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 = """
12Detects multi-factor authentication (MFA) deactivation with no subsequent re-activation for an Okta user account. An
13adversary may deactivate MFA for an Okta user account in order to weaken the authentication requirements for the
14account.
15"""
16false_positives = [
17    """
18    If the behavior of deactivating MFA for Okta user accounts is expected, consider adding exceptions to this rule to
19    filter false positives.
20    """,
21]
22from = "now-12h"
23index = ["filebeat-*", "logs-okta.system*"]
24interval = "6h"
25language = "eql"
26license = "Elastic License v2"
27name = "MFA Deactivation with no Re-Activation for Okta User Account"
28note = """## Triage and analysis
29
30### Investigating MFA Deactivation with no Re-Activation for Okta User Account
31
32MFA is used to provide an additional layer of security for user accounts. An adversary may achieve MFA deactivation for an Okta user account to achieve persistence.
33
34This rule fires when an Okta user account has MFA deactivated and no subsequent MFA reactivation is observed within 12 hours.
35
36#### Possible investigation steps:
37
38- Identify the actor related to the alert by reviewing `okta.actor.alternate_id` field in the alert. This should give the username of the account being targeted.
39- Review `okta.target` or `user.target.full_name` fields to determine if deactivation was performed by a se parate user.
40- Using the `okta.actor.alternate_id` field, search  for MFA re-activation events where `okta.event_type` is `user.mfa.factor.activate`.
41- Review events where `okta.event_type` is `user.authenticate*` to determine if the user account had suspicious login activity.
42    - Geolocation details found in `client.geo*` related fields may be useful in determining if the login activity was suspicious for this user.
43
44#### False positive steps:
45
46- Determine with the target user if MFA deactivation was expected.
47- Determine if MFA is required for the target user account.
48
49#### Response and remediation:
50
51- If the MFA deactivation was not expected, consider deactivating the user
52    - This should be followed by resetting the user's password and re-enabling MFA.
53- If the MFA deactivation was expected, consider adding an exception to this rule to filter false positives.
54- Investigate the source of the attack. If a specific machine or network is compromised, additional steps may need to be taken to address the issue.
55- Encourage users to use complex, unique passwords and consider implementing multi-factor authentication.
56- Check if the compromised account was used to access or alter any sensitive data, applications or systems.
57- Review the client user-agent to determine if it's a known custom application that can be whitelisted.
58"""
59references = [
60    "https://developer.okta.com/docs/reference/api/system-log/",
61    "https://developer.okta.com/docs/reference/api/event-types/",
62    "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy",
63    "https://www.elastic.co/security-labs/monitoring-okta-threats-with-elastic-security",
64    "https://www.elastic.co/security-labs/starter-guide-to-understanding-okta",
65]
66risk_score = 21
67rule_id = "cd89602e-9db0-48e3-9391-ae3bf241acd8"
68setup = "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n"
69severity = "low"
70tags = ["Tactic: Persistence", "Use Case: Identity and Access Audit", "Data Source: Okta", "Domain: Cloud"]
71type = "eql"
72
73query = '''
74sequence by okta.actor.id with maxspan=12h
75    [any where event.dataset == "okta.system" and okta.event_type in ("user.mfa.factor.deactivate", "user.mfa.factor.reset_all")
76        and okta.outcome.reason != "User reset SECURITY_QUESTION factor" and okta.outcome.result == "SUCCESS"]
77    ![any where event.dataset == "okta.system" and okta.event_type == "user.mfa.factor.activate"]
78'''
79
80
81[[rule.threat]]
82framework = "MITRE ATT&CK"
83[[rule.threat.technique]]
84id = "T1556"
85name = "Modify Authentication Process"
86reference = "https://attack.mitre.org/techniques/T1556/"
87[[rule.threat.technique.subtechnique]]
88id = "T1556.006"
89name = "Multi-Factor Authentication"
90reference = "https://attack.mitre.org/techniques/T1556/006/"
91
92
93
94[rule.threat.tactic]
95id = "TA0003"
96name = "Persistence"
97reference = "https://attack.mitre.org/tactics/TA0003/"

Triage and analysis

Investigating MFA Deactivation with no Re-Activation for Okta User Account

MFA is used to provide an additional layer of security for user accounts. An adversary may achieve MFA deactivation for an Okta user account to achieve persistence.

This rule fires when an Okta user account has MFA deactivated and no subsequent MFA reactivation is observed within 12 hours.

Possible investigation steps:

  • Identify the actor related to the alert by reviewing okta.actor.alternate_id field in the alert. This should give the username of the account being targeted.
  • Review okta.target or user.target.full_name fields to determine if deactivation was performed by a se parate user.
  • Using the okta.actor.alternate_id field, search for MFA re-activation events where okta.event_type is user.mfa.factor.activate.
  • Review events where okta.event_type is user.authenticate* to determine if the user account had suspicious login activity.
    • Geolocation details found in client.geo* related fields may be useful in determining if the login activity was suspicious for this user.

False positive steps:

  • Determine with the target user if MFA deactivation was expected.
  • Determine if MFA is required for the target user account.

Response and remediation:

  • If the MFA deactivation was not expected, consider deactivating the user
    • This should be followed by resetting the user's password and re-enabling MFA.
  • If the MFA deactivation was expected, consider adding an exception to this rule to filter false positives.
  • Investigate the source of the attack. If a specific machine or network is compromised, additional steps may need to be taken to address the issue.
  • Encourage users to use complex, unique passwords and consider implementing multi-factor authentication.
  • Check if the compromised account was used to access or alter any sensitive data, applications or systems.
  • Review the client user-agent to determine if it's a known custom application that can be whitelisted.

References

Related rules

to-top