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)

 2creation_date = "2023/10/05"
 3integration = ["endpoint"]
 4maturity = "production"
 5min_stack_comments = "Linux environment variable capture feature via the Elastic Defend Integration was added in 8.6."
 6min_stack_version = "8.6.0"
 7updated_date = "2024/03/08"
10author = ["Elastic"]
11description = """
12This rule detects potential privilege escalation attempts through Looney Tunables (CVE-2023-4911). Looney Tunables is a
13buffer overflow vulnerability in GNU C Library's dynamic loader's processing of the GLIBC_TUNABLES environment variable.
15from = "now-9m"
16index = ["logs-endpoint.events.*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Potential Privilege Escalation via CVE-2023-4911"
20references = ["https://blog.qualys.com/vulnerabilities-threat-research/2023/10/03/cve-2023-4911-looney-tunables-local-privilege-escalation-in-the-glibcs-ld-so"]
21risk_score = 73
22rule_id = "6d8685a1-94fa-4ef7-83de-59302e7c4ca8"
23setup = """## Setup
25This rule requires data coming in from Elastic Defend.
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.
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).
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).
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).
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"
71query = '''
72sequence by host.id, process.parent.entity_id, process.executable with maxspan=5s
73 [process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and 
74  process.env_vars : "*GLIBC_TUNABLES=glibc.*=glibc.*=*"] with runs=5
78framework = "MITRE ATT&CK"
81id = "T1068"
82name = "Exploitation for Privilege Escalation"
83reference = "https://attack.mitre.org/techniques/T1068/"
86id = "TA0004"
87name = "Privilege Escalation"
88reference = "https://attack.mitre.org/tactics/TA0004/"


Related rules