Linux Compiled C Source To Tmp
The following analytic detects a C/C++ compiler compiling a C source file with the output binary written to /tmp, executed as a non-root user. This is a compile-after-delivery privilege escalation pattern. Kernel…
Description
The following analytic detects a C/C++ compiler compiling a C source file with the output binary written to /tmp, executed as a non-root user. This is a compile-after-delivery privilege escalation pattern. Kernel exploit PoCs and local privilege escalation tools commonly drop a C source file use compilers at runtime to produce a platform-specific binary in /tmp. This avoids architecture mismatches and allows the exploit to adapt to the running kernel's symbol offsets.
Detection logic
Detection requirements
- Platform
- ContainersLinuxmacOSWindows
The rule states no platform. This is derived from the 2 ATT&CK techniques it maps to.
- Log source category
- sysmon_for_linux_eventid_1
Known benign triggers
- Developers compiling C code that outputs to /tmp. Filter by user to exclude known developer accounts.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| attack.mitre.org/techniques/T1027/004/ | Only this detection cites it |
| attack.mitre.org/techniques/T1068/ | 8from 2 sources |
| www.cve.org/CVERecord?id=CVE-2026-74580 | 2 |
From the source
- At source
- Open at source
- Upstream identifier
- e873b93d-7f7e-4376-99f0-edb7856ce199
- Tagged by the source as
- Compromised Linux HostLinux Living Off The LandLinux Privilege EscalationEndpointendpointSplunk CloudSplunk EnterpriseSplunk Enterprise Securityendpoint
Licence
- Published under
- Apache License 2.0Read the licence
- Attribution
- Required
- Obtained under
- Apache-2.0Read the origin licence
Authorship
- Written by
- Published
- Nov 4, 2026
- Version
- 1