Attempt to Deactivate an Okta Policy Rule

Detects attempts to deactivate a rule within an Okta policy. An adversary may attempt to deactivate a rule within an Okta policy in order to remove or weaken an organization's security controls.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/05/21"
 3integration = ["okta"]
 4maturity = "production"
 5min_stack_comments = "Breaking change in Okta integration bumping version to ^2.0.0"
 6min_stack_version = "8.10.0"
 7updated_date = "2023/10/24"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Detects attempts to deactivate a rule within an Okta policy. An adversary may attempt to deactivate a rule within an
13Okta policy in order to remove or weaken an organization's security controls.
14"""
15false_positives = [
16    """
17    Consider adding exceptions to this rule to filter false positives if Okta MFA rules are regularly deactivated in
18    your organization.
19    """,
20]
21index = ["filebeat-*", "logs-okta*"]
22language = "kuery"
23license = "Elastic License v2"
24name = "Attempt to Deactivate an Okta Policy Rule"
25note = """## Triage and analysis
26
27### Investigating Attempt to Deactivate an Okta Policy Rule
28
29Identity and Access Management (IAM) systems like Okta serve as the first line of defense for an organization's network, and are often targeted by adversaries. By disabling security rules, adversaries can circumvent multi-factor authentication, access controls, or other protective measures enforced by these policies, enabling unauthorized access, privilege escalation, or other malicious activities.
30
31This rule detects attempts to deactivate a rule within an Okta policy, which could be indicative of an adversary's attempt to weaken an organization's security controls. A threat actor may do this to remove barriers to their activities or enable future attacks.
32
33#### Possible investigation steps:
34
35- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.
36- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.
37- Examine the `okta.outcome.reason` field for additional context around the deactivation attempt.
38- Check the `okta.outcome.result` field to confirm the policy rule deactivation attempt.
39- Check if there are multiple policy rule deactivation attempts from the same actor or IP address (`okta.client.ip`).
40- Check for successful logins immediately following the policy rule deactivation attempt.
41- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the deactivation attempt.
42
43### False positive analysis:
44
45- Check if there were issues with the Okta system at the time of the deactivation attempt. This could indicate a system error rather than a genuine threat activity.
46- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the deactivation attempt. If these match the actor's normal behavior, it might be a false positive.
47- Verify the actor's administrative rights to ensure they are correctly configured.
48
49### Response and remediation:
50
51- If unauthorized policy rule deactivation is confirmed, initiate the incident response process.
52- Immediately lock the affected actor account and require a password change.
53- Consider resetting MFA tokens for the actor and require re-enrollment.
54- Check if the compromised account was used to access or alter any sensitive data or systems.
55- If a specific deactivation technique was used, ensure your systems are patched or configured to prevent such techniques.
56- Assess the criticality of affected services and servers.
57- Work with your IT team to minimize the impact on users and maintain business continuity.
58- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.
59- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.
60- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
61
62## Setup
63
64The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
65references = [
66    "https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm",
67    "https://developer.okta.com/docs/reference/api/system-log/",
68    "https://developer.okta.com/docs/reference/api/event-types/",
69    "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy",
70]
71risk_score = 47
72rule_id = "cc92c835-da92-45c9-9f29-b4992ad621a0"
73severity = "medium"
74tags = ["Use Case: Identity and Access Audit", "Tactic: Defense Evasion", "Data Source: Okta"]
75timestamp_override = "event.ingested"
76type = "query"
77
78query = '''
79event.dataset:okta.system and event.action:policy.rule.deactivate
80'''
81
82
83[[rule.threat]]
84framework = "MITRE ATT&CK"
85[[rule.threat.technique]]
86id = "T1562"
87name = "Impair Defenses"
88reference = "https://attack.mitre.org/techniques/T1562/"
89[[rule.threat.technique.subtechnique]]
90id = "T1562.007"
91name = "Disable or Modify Cloud Firewall"
92reference = "https://attack.mitre.org/techniques/T1562/007/"
93
94
95
96[rule.threat.tactic]
97id = "TA0005"
98name = "Defense Evasion"
99reference = "https://attack.mitre.org/tactics/TA0005/"

Triage and analysis

Investigating Attempt to Deactivate an Okta Policy Rule

Identity and Access Management (IAM) systems like Okta serve as the first line of defense for an organization's network, and are often targeted by adversaries. By disabling security rules, adversaries can circumvent multi-factor authentication, access controls, or other protective measures enforced by these policies, enabling unauthorized access, privilege escalation, or other malicious activities.

This rule detects attempts to deactivate a rule within an Okta policy, which could be indicative of an adversary's attempt to weaken an organization's security controls. A threat actor may do this to remove barriers to their activities or enable future attacks.

Possible investigation steps:

  • Identify the actor related to the alert by reviewing okta.actor.id, okta.actor.type, okta.actor.alternate_id, or okta.actor.display_name fields in the alert.
  • Review the okta.client.user_agent.raw_user_agent field to understand the device and software used by the actor.
  • Examine the okta.outcome.reason field for additional context around the deactivation attempt.
  • Check the okta.outcome.result field to confirm the policy rule deactivation attempt.
  • Check if there are multiple policy rule deactivation attempts from the same actor or IP address (okta.client.ip).
  • Check for successful logins immediately following the policy rule deactivation attempt.
  • Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the deactivation attempt.

False positive analysis:

  • Check if there were issues with the Okta system at the time of the deactivation attempt. This could indicate a system error rather than a genuine threat activity.
  • Check the geographical location (okta.request.ip_chain.geographical_context) and time of the deactivation attempt. If these match the actor's normal behavior, it might be a false positive.
  • Verify the actor's administrative rights to ensure they are correctly configured.

Response and remediation:

  • If unauthorized policy rule deactivation is confirmed, initiate the incident response process.
  • Immediately lock the affected actor account and require a password change.
  • Consider resetting MFA tokens for the actor and require re-enrollment.
  • Check if the compromised account was used to access or alter any sensitive data or systems.
  • If a specific deactivation technique was used, ensure your systems are patched or configured to prevent such techniques.
  • Assess the criticality of affected services and servers.
  • Work with your IT team to minimize the impact on users and maintain business continuity.
  • If multiple accounts are affected, consider a broader reset or audit of MFA tokens.
  • Implement security best practices outlined by Okta.
  • Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

Setup

The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.

References

Related rules

to-top