Sudo Heap-Based Buffer Overflow Attempt

Last updated 6 months ago on 2025-01-15
Created 4 years ago on 2021-02-03

About

Identifies the attempted use of a heap-based buffer overflow vulnerability for the Sudo binary in Unix-like systems (CVE-2021-3156). Successful exploitation allows an unprivileged user to escalate to the root user.
Tags
Domain: EndpointOS: LinuxOS: macOSUse Case: Threat DetectionTactic: Privilege EscalationUse Case: VulnerabilityData Source: Elastic DefendLanguage: kuery
Severity
high
Risk Score
73
MITRE ATT&CK™

Privilege Escalation (TA0004)(opens in a new tab or window)

False Positive Examples
This rule could generate false positives if the process arguments leveraged by the exploit are shared by custom scripts using the Sudo or Sudoedit binaries. Only Sudo versions 1.8.2 through 1.8.31p2 and 1.9.0 through 1.9.5p1 are affected; if those versions are not present on the endpoint, this could be a false positive.
License
Elastic License v2(opens in a new tab or window)

Definition

Rule Type
Threshold Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
auditbeat-*logs-endpoint.events.*
Related Integrations

endpoint(opens in a new tab or window)

Query
event.category:process and event.type:start and
  process.name:(sudo or sudoedit) and
  process.args:(*\\ and ("-i" or "-s"))

Install detection rules in Elastic Security

Detect Sudo Heap-Based Buffer Overflow Attempt in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).