Potential Privilege Escalation via a Parent Process Sequence

Last updated 2 days ago on 2026-07-02
Created 2 days ago on 2026-07-02

About

Detects a potential privilege escalation sequence via a parent process relationship. This rule checks for non-root execution of a process executable in a user or world-writable directory followed by a UID change event to 0 (root). This sequence is indicative of a potential local privilege escalation exploit.
Tags
Data Source: Elastic DefendDomain: EndpointOS: LinuxUse Case: Threat DetectionTactic: Privilege EscalationLanguage: eql
Severity
high
Risk Score
73
MITRE ATT&CK™

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

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-endpoint.events.process*
Related Integrations

endpoint(external, opens in a new tab or window)

Query
text code block:
sequence by host.id, process.parent.entity_id with maxspan=15s [process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and user.id != "0" and process.parent.user.id != "0" and process.parent.group.id != "0" and ( process.executable like (".*", "/tmp/*", "/dev/shm/*", "/var/tmp/*", "/run/user/*", "/var/run/user/*", "/home/*/*") or process.parent.executable like (".*", "/tmp/*", "/dev/shm/*", "/var/tmp/*", "/home/*/*", "/run/user/*", "/var/run/user/*") )] [process where host.os.type == "linux" and event.type == "change" and event.action == "uid_change" and user.id == "0" and process.parent.user.id != "0" and process.parent.group.id != "0" and not process.executable in ("/usr/bin/sudo", "/bin/sudo")]

Install detection rules in Elastic Security

Detect Potential Privilege Escalation via a Parent Process Sequence 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(external, opens in a new tab or window).