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/10/09"
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- Review the client user-agent to determine if it's a known custom application that can be whitelisted.
56"""
57references = [
58 "https://developer.okta.com/docs/reference/api/system-log/",
59 "https://developer.okta.com/docs/reference/api/event-types/",
60 "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy",
61 "https://www.elastic.co/security-labs/monitoring-okta-threats-with-elastic-security",
62 "https://www.elastic.co/security-labs/starter-guide-to-understanding-okta",
63]
64risk_score = 21
65rule_id = "cd89602e-9db0-48e3-9391-ae3bf241acd8"
66setup = "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n"
67severity = "low"
68tags = ["Tactic: Persistence", "Use Case: Identity and Access Audit", "Data Source: Okta", "Domain: Cloud"]
69type = "eql"
70
71query = '''
72sequence by okta.actor.id with maxspan=12h
73 [any where event.dataset == "okta.system" and okta.event_type in ("user.mfa.factor.deactivate", "user.mfa.factor.reset_all")
74 and okta.outcome.reason != "User reset SECURITY_QUESTION factor" and okta.outcome.result == "SUCCESS"]
75 ![any where event.dataset == "okta.system" and okta.event_type == "user.mfa.factor.activate"]
76'''
77
78
79[[rule.threat]]
80framework = "MITRE ATT&CK"
81[[rule.threat.technique]]
82id = "T1556"
83name = "Modify Authentication Process"
84reference = "https://attack.mitre.org/techniques/T1556/"
85[[rule.threat.technique.subtechnique]]
86id = "T1556.006"
87name = "Multi-Factor Authentication"
88reference = "https://attack.mitre.org/techniques/T1556/006/"
89
90
91
92[rule.threat.tactic]
93id = "TA0003"
94name = "Persistence"
95reference = "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
oruser.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 whereokta.event_type
isuser.mfa.factor.activate
. - Review events where
okta.event_type
isuser.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.
- Geolocation details found in
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
- Stolen Credentials Used to Login to Okta Account After MFA Reset
- AWS IAM AdministratorAccess Policy Attached to Group
- AWS IAM AdministratorAccess Policy Attached to Role
- Administrator Privileges Assigned to an Okta Group
- Administrator Role Assigned to an Okta User