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