SSL Certificate Deletion
This rule detects the deletion of SSL certificates on a Linux system. Adversaries may delete SSL certificates to subvert trust controls and negatively impact the system.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2024/08/28"
3integration = ["endpoint"]
4maturity = "production"
5updated_date = "2024/08/28"
6
7[rule]
8author = ["Elastic"]
9description = """
10This rule detects the deletion of SSL certificates on a Linux system. Adversaries may delete SSL certificates to subvert
11trust controls and negatively impact the system.
12"""
13from = "now-9m"
14index = ["logs-endpoint.events.file*"]
15language = "eql"
16license = "Elastic License v2"
17name = "SSL Certificate Deletion"
18risk_score = 21
19rule_id = "7957f3b9-f590-4062-b9f9-003c32bfc7d6"
20setup = """## Setup
21
22This rule requires data coming in from Elastic Defend.
23
24### Elastic Defend Integration Setup
25Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
26
27#### Prerequisite Requirements:
28- Fleet is required for Elastic Defend.
29- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
30
31#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
32- Go to the Kibana home page and click "Add integrations".
33- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
34- Click "Add Elastic Defend".
35- Configure the integration name and optionally add a description.
36- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
37- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
38- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
39- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
40For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
41- Click "Save and Continue".
42- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
43For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
44"""
45severity = "low"
46tags = [
47 "Domain: Endpoint",
48 "OS: Linux",
49 "Use Case: Threat Detection",
50 "Tactic: Defense Evasion",
51 "Tactic: Impact",
52 "Data Source: Elastic Defend",
53]
54timestamp_override = "event.ingested"
55type = "eql"
56query = '''
57file where host.os.type == "linux" and event.type == "deletion" and file.path : "/etc/ssl/certs/*" and
58file.extension in ("pem", "crt") and not process.name in ("dockerd", "pacman")
59'''
60
61[[rule.threat]]
62framework = "MITRE ATT&CK"
63
64[[rule.threat.technique]]
65id = "T1070"
66name = "Indicator Removal"
67reference = "https://attack.mitre.org/techniques/T1070/"
68
69[[rule.threat.technique.subtechnique]]
70id = "T1070.004"
71name = "File Deletion"
72reference = "https://attack.mitre.org/techniques/T1070/004/"
73
74[[rule.threat.technique]]
75id = "T1553"
76name = "Subvert Trust Controls"
77reference = "https://attack.mitre.org/techniques/T1553/"
78
79[rule.threat.tactic]
80id = "TA0005"
81name = "Defense Evasion"
82reference = "https://attack.mitre.org/tactics/TA0005/"
83
84[[rule.threat]]
85framework = "MITRE ATT&CK"
86
87[[rule.threat.technique]]
88id = "T1485"
89name = "Data Destruction"
90reference = "https://attack.mitre.org/techniques/T1485/"
91
92[rule.threat.tactic]
93id = "TA0040"
94name = "Impact"
95reference = "https://attack.mitre.org/tactics/TA0040/"
Related rules
- Potential Disabling of AppArmor
- Suspicious File Changes Activity Detected
- Suspicious File Creation via Kworker
- Attempt to Clear Kernel Ring Buffer
- Base16 or Base32 Encoding/Decoding Activity