CVE-2026-31431: Hunting the Invisible - Detection, Telemetry, and Threat Hunting Strategies
Copy Fail leaves no file on disk, writes no kernel module, and triggers no inode change event. Every traditional detection primitive built around file-system state is blind to it. This part of the series is entirely dedicated to detection: why standard tools fail, what signal does exist, how to build layered detection from auditd through eBPF through SIEM correlation, what to look for in memory forensics, the complete IOC taxonomy, and the full MITRE ATT&CK technique mapping for a Copy Fail campaign from initial foothold to post-escalation persistence.
Why Standard Detection Fails - The Detection Gap in Detail
Before building detection, it is necessary to understand exactly why conventional host security controls produce no signal for Copy Fail. Each gap has a specific technical reason, and understanding those reasons guides the selection of controls that do work.
| Detection Control | Typical Use | Why It Fails for Copy Fail | Signal Available |
|---|---|---|---|
| File Integrity Monitoring (AIDE, Tripwire) | Hash on-disk files and alert on change | Page cache is in-memory. The on-disk inode, data blocks, and extended attributes of /usr/bin/su are never touched. The hash matches pre-exploitation values throughout and after the attack. |
None |
| inotify / fanotify | Kernel filesystem event notifications | splice() into an AF_ALG op file descriptor does not go through the normal VFS write path. No IN_MODIFY or IN_CLOSE_WRITE event is raised on the target binary. |
None |
| Standard EDR file monitoring | Watch for writes to sensitive binaries in /usr/bin/ |
Same root cause as inotify. File write events are not raised. EDRs relying on kernel callbacks for write operations on protected paths see nothing. | None |
| AppArmor / SELinux (default profiles) | Enforce mandatory access control on file and network operations | Default profiles do not deny AF_ALG socket creation. They are designed to allow it, because AF_ALG is a legitimate userspace crypto interface. Unless a custom policy explicitly denies socket(AF_ALG, ...), these controls produce no block and no log entry. |
None (default) / Block (custom policy) |
| Network monitoring / IDS | Detect malicious network traffic | Copy Fail is a purely local attack. No network connection is made during exploitation. The AF_ALG interface operates entirely within the kernel. | None during exploit |
| auditd (default configuration) | Kernel audit subsystem for syscall and file event logging | Default auditd configurations do not enable syscall-level monitoring for socket() calls. Without explicit rules targeting AF_ALG socket creation, auditd is silent during exploitation. |
None (default) |
| auditd (with specific rules) | Targeted syscall monitoring | With rules filtering for socket() with a0=38 (AF_ALG family), auditd fires immediately when the exploit opens its socket. This is the primary host-level detection primitive that actually works. |
High confidence |
| eBPF / bpftrace runtime monitoring | Real-time syscall and kernel function tracing | eBPF tracepoints on sys_enter_socket with family=38 and uid!=0 produce an immediate alert with full process context. No configuration gap, fires in real time. |
High confidence |
| EDR behavioral analysis (UID transition) | Detect privilege escalation via anomalous credential changes | An unprivileged process acquiring UID 0 without going through sudo, su, or a known setuid binary call chain is a strong anomaly signal. Most EDRs with behavioral analysis can detect this. |
High confidence |
| Page cache integrity tooling | Compare in-memory page cache hashes against on-disk file hashes | Directly detects the corruption by reading in-memory pages mapped for the target binary and comparing against the on-disk hash. A mismatch indicates active page cache modification. | Definitive forensic indicator |
auditd Detection Rules
The Linux Audit framework operates at the syscall level, making it the most reliable host-based detection layer for Copy Fail. These rules should be deployed immediately on any Linux host running an unpatched kernel and retained permanently as defense-in-depth even after patching, since the underlying AF_ALG interface remains available.
Rule Set 1 - Primary Exploitation Signal
Rule Set 2 - Post-Escalation Signals
Applying and Reloading the Rules
eBPF and bpftrace Real-Time Detection
eBPF-based monitoring provides real-time detection at the kernel level. Unlike auditd, which buffers events and writes to a log file, eBPF programs fire alerts synchronously at the exact moment a tracepoint is hit. For Copy Fail, an alert can fire before the second syscall of the exploit completes - before any page cache corruption occurs.
bpftrace One-Liners for Immediate Deployment
eBPF Kernel Function Probe - Direct Subsystem Instrumentation
CAP_BPF or CAP_SYS_ADMIN to load. In environments where loading eBPF programs is restricted or unavailable, auditd rules are the fallback. In modern environments, both should be deployed together: auditd for persistent SIEM logging, eBPF for real-time alerting with richer kernel context.
SIEM Correlation Rules - Wazuh and Generic Logic
Individual auditd events are low-latency but require correlation to reach high confidence at scale. A single socket(AF_ALG, ...) event from an unknown process should immediately trigger a medium-severity alert and begin a 10-second correlation window to confirm the exploit pattern.
Wazuh Rules
Splunk SPL - AF_ALG + splice Correlation
KQL - Microsoft Sentinel Variant
Indicator of Compromise Taxonomy
Copy Fail is an in-memory exploit with no traditional file-based IOCs. The taxonomy splits into behavioral IOCs (process and syscall level), memory forensic IOCs (in-memory strings and patterns), and post-exploitation IOCs (artifacts created after root is achieved). Behavioral IOCs are the only reliable detection layer during active exploitation.
Behavioral IOCs - During Active Exploitation
| Indicator | Type | Confidence | Notes |
|---|---|---|---|
socket(38, 5, 0) from non-root process |
Syscall pattern | Critical | AF_ALG SOCK_SEQPACKET - production false positive rate is near zero |
setsockopt(fd, 279, ...) from non-root |
Syscall pattern | High | SOL_ALG option level 279 - configures the AEAD key and authsize |
splice() within 10 seconds of socket(38,...) in same PID |
Correlated syscall pair | Critical | Combination is the exploit core - extremely rare outside exploit context |
~40 sendmsg() calls from the same non-root PID within 5 seconds |
Syscall frequency pattern | High | Each iteration fires one sendmsg - burst pattern is distinctive |
Non-root process opening /usr/bin/su read-only then calling splice() |
File-open + syscall correlation | High | Requires EDR with file-open tracking correlated with syscall telemetry |
| Process transitioning to UID 0 without passing through sudo or PAM authentication | Credential transition anomaly | Critical | The root shell is spawned without any PAM log entry in auth.log |
Burst of lseek() calls on a setuid binary fd interleaved with splice() and sendmsg() |
Syscall sequence | Critical | Distinctive loop: lseek, splice, sendmsg, recvmsg repeated ~40 times |
YARA Rule - Process Memory Scan
Post-Exploitation IOCs - After Root Is Achieved
| Artifact | Location | Confidence | Description |
|---|---|---|---|
| Unexpected SSH authorized key | /root/.ssh/authorized_keys |
Critical | Attacker-injected public key for persistent root SSH access |
| New cron entry in root crontab | /var/spool/cron/root or /etc/cron.d/ |
Critical | Persistence mechanism - typically a reverse shell or beacon callback |
| New privileged system service | /etc/systemd/system/ or /etc/init.d/ |
Critical | Backdoor service installed to survive reboots |
| Shadow file read without sudo context | /etc/shadow accessed by a process with no PAM session |
High | Credential harvesting: attacker dumping local password hashes |
| Outbound connection from process previously running as non-root | Network telemetry | High | C2 beacon established after escalation; process lineage shows non-root ancestry |
Modified /usr/bin/su in-memory page cache |
Page cache integrity check tool output | Critical | In-memory hash of /usr/bin/su pages differs from on-disk hash - definitive forensic indicator |
| Process with UID 0 and AUID belonging to a service account | auditd logs - auid field |
Critical | The audit UID persists from login time and reveals the original identity behind the escalated process |
Page Cache Integrity Verification
echo 3 > /proc/sys/vm/drop_caches before taking a memory snapshot. Dropping the cache destroys the primary forensic evidence. Take a full memory dump using LiME or a hypervisor snapshot first, then analyze offline.
Post-Exploitation Behavior and Forensic Artifacts
After a root shell is obtained, Copy Fail itself leaves the stage. What happens next depends entirely on the attacker's objectives. Understanding common post-exploitation patterns helps defenders prioritize what to look for in incident response.
Log Sources to Preserve in Incident Response
/var/log/audit/audit.log and all rotated audit logs. Full memory dump via LiME or hypervisor snapshot - page cache forensic evidence lives only in RAM and disappears on reboot or cache eviction.
/var/log/auth.log or /var/log/secure. Look for su/sudo entries that are ABSENT when root shells appear. /var/log/syslog and kern.log for kernel-level messages from the crypto subsystem.
/root/.bash_history, /root/.zsh_history, /proc/[pid]/cmdline for attacker command reconstruction. /tmp/ and /dev/shm/ for dropped tools.
MITRE ATT&CK Mapping - Full Technique Coverage
The following mapping covers Copy Fail exploitation from initial local foothold through post-escalation persistence and exfiltration. The escalation technique (T1068) is the constant across all campaigns; post-exploitation techniques vary by attacker objective.
| Tactic | Technique | ID | Notes |
|---|---|---|---|
| Initial Access | Valid Accounts - Local Accounts | T1078.003 | Copy Fail requires an existing local unprivileged account. Initial access is obtained through a separate vulnerability or credential compromise before LPE is applied. |
| Execution | Command and Scripting Interpreter: Python | T1059.006 | The exploit is a Python script using only the standard library. Python 3 is present by default on virtually every modern Linux distribution. |
| Privilege Escalation | Exploitation for Privilege Escalation | T1068 | The core technique. Copy Fail exploits the authencesn AEAD scratch write bug to corrupt a setuid binary's page cache and execute code as root. |
| Defense Evasion | Rootkit (in-memory modification) | T1014 | The page cache modification is invisible to disk-based integrity checking. Modifying in-memory executable pages without touching disk is functionally equivalent to a rootkit in terms of FIM evasion. |
| Defense Evasion | Indicator Removal - File Deletion | T1070.004 | No exploit artifact is written to disk. The page cache modification auto-evicts on reboot, leaving no persistent evidence without dedicated forensic tooling. |
| Defense Evasion | Impair Defenses - Disable or Modify Tools | T1562 | Post-escalation, root access is used to disable auditd, unload eBPF programs, or modify auditd rules to prevent detection of subsequent activity. |
| Credential Access | OS Credential Dumping: /etc/shadow | T1003.008 | Root access exposes /etc/shadow, enabling offline cracking of local account password hashes. Commonly executed within the first minute of post-escalation activity. |
| Persistence | SSH Authorized Keys | T1098.004 | Attacker injects their public key into /root/.ssh/authorized_keys, establishing persistent root SSH access that survives reboots and password changes. |
| Persistence | Create or Modify System Process: Systemd Service | T1543.002 | A backdoor systemd service is installed under /etc/systemd/system/ and enabled to run at boot, providing persistence independent of the page cache modification. |
| Command and Control | Application Layer Protocol | T1071 | Post-escalation C2 beacon is established from the root shell context. Protocols observed include HTTPS beacons and DNS tunneling, varying by attacker tooling. |
| Lateral Movement | Remote Services: SSH | T1021.004 | Root SSH private keys discovered on the compromised host are used to access other servers. Shared SSH keys across a fleet enable fleet-wide lateral movement from one Copy Fail escalation. |
| Lateral Movement | Container Administration Command | T1609 | In Kubernetes environments, kubelet credentials obtained from the compromised node are used to exec into other pods on the node. |
| Exfiltration | Exfiltration Over C2 Channel | T1041 | Harvested credentials, private keys, cloud IAM tokens, and environment variable secrets are exfiltrated over the established C2 channel before any remediation action begins. |




