nf_tables UAF → kernel R/W → root
CVE-2024-1086-class nf_tables UAF reachable from a user namespace. Win the race with userfaultfd to land an attacker object in the freed slot, build a kernel R/W primitive, overwrite the current task's cred struct.
§ Context
Assumed environment: foothold as a regular user on Linux. Kernel < patch level for the nf_tables UAF. User namespaces enabled (default on most distros).
§ Steps
- 01Spawn root shellInitial AccessT1078— Valid Accounts
- 02Low-priv user shellInitial AccessT1078— Valid Accounts
- 03Overwrite current cred structExecutionT1059— Command and Scripting Interpreter
- 04Create user + net namespacePrivilege EscalationL-CAP-ABUSE— Linux Capability Abuse
- 05Trigger nf_tables UAFPrivilege EscalationLK-NETFILTER-UAF— netfilter / nf_tables UAF
- 06Build kernel R/W primitivePrivilege EscalationLK-DIRTY-PAGETABLE— Dirty Pagetable
- 07Win race via userfaultfd suspendPrivilege EscalationLK-USERFAULTFD— userfaultfd Race
§ References
§ Frequently asked
- What is the "nf_tables UAF → kernel R/W → root" attack path?
- CVE-2024-1086-class nf_tables UAF reachable from a user namespace. Win the race with userfaultfd to land an attacker object in the freed slot, build a kernel R/W primitive, overwrite the current task's cred struct. It chains 7 steps drawn from real-world offensive-security techniques.
- What starting position does this attack require?
- The first step is Spawn root shell (T1078) — a initial access primitive. Assumed environment: foothold as a regular user on Linux.
- What is the final impact of this kill-chain?
- The final step lands on Win race via userfaultfd suspend (LK-USERFAULTFD), which falls under Privilege Escalation. From here, an operator typically pivots into post-exploitation or maintains persistence.
- How can defenders detect or prevent this attack?
- Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.
§ Related dossiers
- Shared techniques3
io_uring UAF → modprobe_path overwrite → root
Use an io_uring UAF to land arbitrary kernel write, repoint /proc/sys/kernel/modprobe to an attacker binary, then trigger a kernel auto-modprobe — runs the binary as root.
- Shared techniques2
Process doppelgänging → spawn signed image with attacker bytes
Use NTFS transactional file APIs to overlay an attacker image during process creation. The final mapped process differs from the on-disk file — AV sees only the legit signed image at scan time.
- Shared techniques2
BYOVD → kernel-level disable of EDR callbacks
From local admin, load a signed-but-vulnerable driver. Use its kernel primitive to walk the EDR's PsSetCreateProcessNotifyRoutine entries and unlink them — EDR stops receiving events while still 'running'.
- Shared techniques2
certutil + bitsadmin → AV-friendly stager chain
Initial access dropped a tiny .bat. It uses certutil to decode a base64 blob and bitsadmin to fetch the real beacon, then schtasks for persistence. Every binary is signed Microsoft.
- Shared techniques2
F5 BIG-IP iControl auth bypass (CVE-2022-1388) → root on LB
Connection-header smuggle bypasses iControl REST auth, command-injection RCE as root. Load balancers see all traffic — recover TLS keys, session cookies, internal SSO config.
- Shared techniques2
Exposed UART → root shell → firmware extraction
Open the IoT device, locate TX/RX/GND pads, attach a USB-UART, get an unauthenticated root prompt, dump firmware for offline analysis + 0-day hunting.