Layered Linux Detection Framework Targets Privilege Escalation Across Exploit Families

Summary
Elastic outlines layered Linux privilege-escalation detection using root-transition correlations and technique-specific rules. Tests cover 11 public exploit PoCs and two SUID misconfigurations, with coverage limitations acknowledged.
Key points
- The framework combines broad privilege-transition detections with targeted coverage for SUID/SGID abuse, namespaces, Python exploits, and kernel page-cache corruption.
- Elastic Defend supplies endpoint telemetry, while Auditd adds syscall visibility for primitives involving socket creation, splice, bind, and execution.
- Example correlations connect execution from user-writable paths to subsequent root transitions, including deeper descendant processes and optional privilege-confirmation commands.
- SUID detections combine effective-versus-real identity differences with argument counts, suspicious parent processes, and helper paths passed through proxy execution.
- Testing covered 11 public exploit PoCs and two SUID misconfigurations; DirtyClone produced a Python privilege-escalation alert without a distinct kernel-primitive precursor alert.
- CVE-2026-46333 illustrates why monitoring must also cover privileged file-descriptor theft and sensitive group context: exploitation can expose protected files without producing a root shell.
- The authors acknowledge incomplete coverage and potential evasion; broader rules require environment-specific tuning, while endpoint rules favor fewer false positives.
Article Details
- Defense Focus
- Detect Linux local privilege escalation through layered correlation of suspicious unprivileged execution, root transitions, privileged helper abuse, and exploit-specific precursors, including cases that expose privileged files without creating a root shell.
- Detection Methods
- Identify SUID/SGID execution where effective user or group ID is 0 but the corresponding real ID is nonzero; combine this with minimal arguments and an interpreter, shell one-liner, or writable-path parent.
- Detect uncommon privileged helpers using self-referential command lines rather than a fixed binary-name list, and inspect process arguments for helper paths used in proxy execution.
- Correlate non-root execution from writable paths with a UID change to 0 under the same parent within 15 seconds.
- Use descendant relationships to find interactive root processes several generations below non-root executables launched from writable locations, including service-account execution chains.
- Correlate writable-path execution, a UID change to 0, and a root execution of id, whoami, or logname within 10 seconds.
- Detect Python processes changing UID to 0 from writable working directories with non-root parents; use a new-terms condition for command lines not seen on the host during the preceding five days.
- Correlate non-root user-namespace creation with a subsequent root transition. The endpoint example uses a 60-second window; the syscall-oriented example uses 30 seconds and examines namespace flags.
- Hunt for anomalous unshare execution without requiring a root transition, while excluding parents that legitimately create namespaces.
- Detect bursts of non-root AF_ALG socket calls interleaved with splice calls as a Copy Fail precursor, then correlate with suspicious privileged execution.
- Combine recently compiled executable, writable-directory file creation, local networking, namespace, and SUID/SGID signals to investigate page-cache corruption exploits whose kernel primitives lack distinct alerts.
- Monitor unusual busctl --system call invocations that request actions from privileged system services.
- Detect repeated privileged-helper launches from user-controlled executables and non-root processes entering sensitive group contexts, including shadow access associated with descriptor theft.
- Detect known interactive-capable binaries executing with elevated effective identities, copied system shells, and privileged-mode shell execution from nonstandard paths.
- Data Sources
- Endpoint process start, execution, and UID-change events.
- Effective and real user/group IDs, parent identities, process entity IDs, host IDs, and process ancestry.
- Process executable paths, command lines, argument counts, working directories, and interactive-session attributes.
- Syscall audit records for socket, splice, bind, execve, and unshare, including namespace-flag arguments.
- File creation, system-binary copying or movement, executable compilation, mount activity, and local network connection telemetry.
- Rule Types
- Event Query Language (EQL) process filters and temporal sequence queries.
- Descendant-of process relationship queries.
- New-terms rules using a five-day host and command-line history.
- Endpoint behavioral rules.
- Syscall-audit correlation rules.
- Defensive Actions
- Install prebuilt detection rules and enable Linux privilege escalation coverage using the OS: Linux and Tactic: Privilege Escalation tags.
- Deploy endpoint behavioral coverage and enable syscall auditing, including socket, splice, bind, and execve visibility for page-cache exploit detection.
- Validate coverage with public PoCs only in disposable, authorized lab virtual machines.
- Tune legitimate-helper exclusions and writable-path elevation correlations to the environment; benign binaries in temporary or home directories can trigger alerts.
- Maintain complementary outcome-based and exploit-primitive rules rather than relying on CVE-specific artifacts or fixed helper names.
- Investigate descriptor-theft scenarios even without an obvious root shell, especially repeated privileged-helper execution and unexpected sensitive-group context.
- Treat standalone namespace alerts as hunting signals requiring triage because legitimate sandboxing and container workflows also use unshare.
- Account for differing rule scopes: the article describes endpoint rules as more restrictive for false-positive reduction and detection rules as having fewer exclusions.
MITRE ATT&CK
T1003.008 · /etc/passwd and /etc/shadowThe chage_pwn PoC races pidfd_getfd() against chage, identifies a duplicated descriptor for /etc/shadow, and reads from it.T1033 · System Owner/User DiscoveryPublic PoCs confirm successful escalation by executing whoami, id, or logname as root; the framework correlates these commands with preceding execution and elevation.T1059.004 · Unix ShellExploit finishes include a setuid(0) plus /bin/sh payload, shell execution through find -exec, and bash -p retaining a privileged effective identity.T1059.006 · PythonThe article describes Python-driven public PoCs, including DirtyClone and OVSwrap, and detects Python interpreters changing UID to 0 from user-writable working directories.T1068 · Exploitation for Privilege EscalationThe tested kernel exploits corrupt page-cache data, abuse namespace-reachable kernel interfaces, or race privileged descriptor checks to cross local privilege boundaries.T1548.001 · Setuid and SetgidThe examples execute SUID/SGID helpers with elevated effective identities while real identities remain unprivileged; misconfigured SUID find and copied privileged shells also provide root execution.T1548.003 · Sudo and Sudo CachingThe OVSwrap PoC writes a passwordless sudo rule after corrupting host-side credentials and finishes by executing sudo -n bash.T1552.004 · Private KeysThe ssh-keysign-pwn PoC repeatedly launches ssh-keysign and races descriptor duplication to obtain SSH host private-key files opened by the privileged helper.
CVE
CVE-2026-31431Copy Fail (CVE-2026-31431)CVE-2026-31635DirtyDecrypt / DirtyCBC (CVE-2026-31635)CVE-2026-43284DirtyFrag (CVE-2026-43284)CVE-2026-43500Public research describes DirtyFrag as chaining the xfrm-ESP Page-Cache Write issue (CVE-2026-43284), with the RxRPC Page-Cache Write issue (CVE-2026-43500).CVE-2026-43503DirtyClone (CVE-2026-43503)CVE-2026-46243CIFSwitch (CVE-2026-46243)CVE-2026-46300Fragnesia (CVE-2026-46300)CVE-2026-46331pedit COW (CVE-2026-46331)CVE-2026-46333It also reviews 2026 Linux LPE cases such as Copy Fail, DirtyFrag, Fragnesia, DirtyDecrypt, pedit COW, DirtyClone, CIFSwitch, OVSwrap, and CVE-2026-46333, showing how Elastic Defend and Auditd can catch them in practice.CVE-2026-64531OVSwrap (CVE-2026-64531)
Vendors
Products
AuditdIt also reviews 2026 Linux LPE cases such as Copy Fail, DirtyFrag, Fragnesia, DirtyDecrypt, pedit COW, DirtyClone, CIFSwitch, OVSwrap, and CVE-2026-46333, showing how Elastic Defend and Auditd can catch them in practice.Auditd ManagerFor syscall-level visibility, enable the Auditd Manager integration.Elastic DefendIt also reviews 2026 Linux LPE cases such as Copy Fail, DirtyFrag, Fragnesia, DirtyDecrypt, pedit COW, DirtyClone, CIFSwitch, OVSwrap, and CVE-2026-46333, showing how Elastic Defend and Auditd can catch them in practice.KibanaIn Kibana, navigate to Security -> Rules -> Detection rules (SIEM), and install the Elastic prebuilt rules.LinuxThe article describes a layered Linux privilege escalation detection framework that combines general root-transition logic with technique-specific rules for SUID abuse, unshare, Python-driven exploits, and kernelOpen vSwitchAn ordinary user can run unshare -Urn, gain CAP_NET_ADMIN over the newly created network namespace, and create a private Open vSwitch (OVS) datapath without needing host-level CAP_NET_ADMIN.OpenSSH[File names ] Privileged helpers and PoC binaries used as execution or finish points – /usr/bin/su, /usr/lib/openssh/ssh-keysign, ./dirtydecryptpkexecIt also covers privileged helper and service abuse involving sudo, pkexec, busctl, ssh-keysign, and chage_pwn behavior tied to CVE-2026-46333.polkitarrived steadily but from all over the map, including from trusted helpers like sudo, pkexec, and polkit; kernel bugs scattered across Executable and Linkable Format (ELF) loading, ptrace, eBPF, and packetsudoIt also covers privileged helper and service abuse involving sudo, pkexec, busctl, ssh-keysign, and chage_pwn behavior tied to CVE-2026-46333.
Tools
chage_pwnIt also covers privileged helper and service abuse involving sudo, pkexec, busctl, ssh-keysign, and chage_pwn behavior tied to CVE-2026-46333.dirtydecryptIt also reviews 2026 Linux LPE cases such as Copy Fail, DirtyFrag, Fragnesia, DirtyDecrypt, pedit COW, DirtyClone, CIFSwitch, OVSwrap, and CVE-2026-46333, showing how Elastic Defend and Auditd can catch them in practice.ptrace_may_dreamptrace_may_dream (busctl abuse)skb_segment_exploit[Binary names ] User-controlled PoC executables and helper launchers referenced in the article – ./skb_segment_exploit, ./sshkeysign_pwn, ./chage_pwnssh-keysign-pwnssh-keysign-pwn targets OpenSSH’s ssh-keysign helper.
