Potential Privilege Escalation via CVE-2023-4911

This rule detects potential privilege escalation attempts through Looney Tunables (CVE-2023-4911). Looney Tunables is a buffer overflow vulnerability in GNU C Library's dynamic loader's processing of the GLIBC_TUNABLES environment variable.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/10/05"
 3integration = ["endpoint"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10This rule detects potential privilege escalation attempts through Looney Tunables (CVE-2023-4911). Looney Tunables is a
11buffer overflow vulnerability in GNU C Library's dynamic loader's processing of the GLIBC_TUNABLES environment variable.
12"""
13from = "now-9m"
14index = ["logs-endpoint.events.*"]
15language = "eql"
16license = "Elastic License v2"
17name = "Potential Privilege Escalation via CVE-2023-4911"
18references = [
19    "https://blog.qualys.com/vulnerabilities-threat-research/2023/10/03/cve-2023-4911-looney-tunables-local-privilege-escalation-in-the-glibcs-ld-so",
20]
21risk_score = 73
22rule_id = "6d8685a1-94fa-4ef7-83de-59302e7c4ca8"
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
48Elastic Defend integration does not collect environment variable logging by default.
49In order to capture this behavior, this rule requires a specific configuration option set within the advanced settings of the Elastic Defend integration.
50 #### To set up environment variable capture for an Elastic Agent policy:
51- Go to “Security → Manage → Policies”.
52- Select an “Elastic Agent policy”.
53- Click “Show advanced settings”.
54- Scroll down or search for “linux.advanced.capture_env_vars”.
55- Enter the names of environment variables you want to capture, separated by commas.
56- For this rule the linux.advanced.capture_env_vars variable should be set to "GLIBC_TUNABLES".
57- Click “Save”.
58After saving the integration change, the Elastic Agents running this policy will be updated and the rule will function properly.
59For more information on capturing environment variables refer to the [helper guide](https://www.elastic.co/guide/en/security/current/environment-variable-capture.html).
60"""
61severity = "high"
62tags = [
63    "Domain: Endpoint",
64    "OS: Linux",
65    "Use Case: Threat Detection",
66    "Tactic: Privilege Escalation",
67    "Use Case: Vulnerability",
68    "Data Source: Elastic Defend",
69]
70type = "eql"
71
72query = '''
73sequence by host.id, process.parent.entity_id, process.executable with maxspan=5s
74 [process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and 
75  process.env_vars : "*GLIBC_TUNABLES=glibc.*=glibc.*=*"] with runs=5
76'''
77
78
79[[rule.threat]]
80framework = "MITRE ATT&CK"
81[[rule.threat.technique]]
82id = "T1068"
83name = "Exploitation for Privilege Escalation"
84reference = "https://attack.mitre.org/techniques/T1068/"
85
86
87[rule.threat.tactic]
88id = "TA0004"
89name = "Privilege Escalation"
90reference = "https://attack.mitre.org/tactics/TA0004/"

References

Related rules

to-top