Root Certificate Installation
This rule detects the installation of root certificates on a Linux system. Adversaries may install a root certificate on a compromised system to avoid warnings when connecting to their command and control servers. Root certificates are used in public key cryptography to identify a root certificate authority (CA). When a root certificate is installed, the system or application will trust certificates in the root's chain of trust that have been signed by the root certificate.
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 installation of root certificates on a Linux system. Adversaries may install a root certificate on
11a compromised system to avoid warnings when connecting to their command and control servers. Root certificates are used
12in public key cryptography to identify a root certificate authority (CA). When a root certificate is installed, the
13system or application will trust certificates in the root's chain of trust that have been signed by the root certificate.
14"""
15from = "now-9m"
16index = ["logs-endpoint.events.process*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Root Certificate Installation"
20references = ["https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1553.004/T1553.004.md"]
21risk_score = 47
22rule_id = "6ded0996-7d4b-40f2-bf4a-6913e7591795"
23setup = """## Setup
24
25This rule requires data coming in from Elastic Defend.
26
27### Elastic Defend Integration Setup
28Elastic 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.
29
30#### Prerequisite Requirements:
31- Fleet is required for Elastic Defend.
32- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
33
34#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
35- Go to the Kibana home page and click "Add integrations".
36- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
37- Click "Add Elastic Defend".
38- Configure the integration name and optionally add a description.
39- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
40- 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).
41- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
42- 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.
43For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
44- Click "Save and Continue".
45- 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.
46For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
47"""
48severity = "medium"
49tags = [
50 "Domain: Endpoint",
51 "OS: Linux",
52 "Use Case: Threat Detection",
53 "Tactic: Defense Evasion",
54 "Data Source: Elastic Defend",
55]
56timestamp_override = "event.ingested"
57type = "eql"
58query = '''
59process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
60process.name in ("update-ca-trust", "update-ca-certificates") and not (
61 process.parent.name : (
62 "ca-certificates.postinst", "ca-certificates-*.trigger", "pacman", "pamac-daemon", "autofirma.postinst"
63 ) or
64 process.parent.args : "/var/tmp/rpm*" or
65 (process.parent.name in ("sh", "bash", "zsh") and process.args == "-e")
66)
67'''
68
69[[rule.threat]]
70framework = "MITRE ATT&CK"
71
72[[rule.threat.technique]]
73id = "T1553"
74name = "Subvert Trust Controls"
75reference = "https://attack.mitre.org/techniques/T1553/"
76
77[[rule.threat.technique.subtechnique]]
78id = "T1553.004"
79name = "Install Root Certificate"
80reference = "https://attack.mitre.org/techniques/T1553/004/"
81
82[rule.threat.tactic]
83id = "TA0005"
84name = "Defense Evasion"
85reference = "https://attack.mitre.org/tactics/TA0005/"
References
Related rules
- SELinux Configuration Creation or Renaming
- Attempt to Disable Auditd Service
- Potential Defense Evasion via Doas
- SSL Certificate Deletion
- Dynamic Linker Creation or Modification