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

References

Related rules

to-top