Potential Privilege Escalation via CVE-2023-4911edit

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.

Rule type: eql

Rule indices:

  • logs-endpoint.events.*

Severity: high

Risk score: 73

Runs every: 5m

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References:

Tags:

  • Domain: Endpoint
  • OS: Linux
  • Use Case: Threat Detection
  • Tactic: Privilege Escalation
  • Use Case: Vulnerability
  • Data Source: Elastic Defend

Version: 1

Rule authors:

  • Elastic

Rule license: Elastic License v2

Investigation guideedit

## Setup
Elastic Defend integration does not collect environment variable logging by default.
In order to capture this behavior, this rule requires a specific configuration option set within the advanced settings
of the Elastic Defend integration.
To set up environment variable capture for an Elastic Agent policy:
- Go to Security → Manage → Policies.
- Select an Elastic Agent policy.
- Click Show advanced settings.
- Scroll down or search for linux.advanced.capture_env_vars.
- Enter the names of env vars you want to capture, separated by commas.
- For this rule the linux.advanced.capture_env_vars variable should be set to "GLIBC_TUNABLES".
- Click Save.
After saving the integration change, the Elastic Agents running this policy will be updated and
the rule will function properly.
For more information on capturing environment variables refer - https://www.elastic.co/guide/en/security/current/environment-variable-capture.html

Rule queryedit

sequence by host.id, process.parent.entity_id, process.executable with maxspan=5s
 [process where host.os.type == "linux" and event.action == "exec" and event.type == "start" and
  process.env_vars : "*GLIBC_TUNABLES=glibc.*=glibc.*=*"] with runs=5

Framework: MITRE ATT&CKTM