Linux kernel privilege-escalation via version-to-CVE mapping and cautious validation (Tier 2, crash-risky) — kernel/distro version enumeration, known-CVE identification (nf_tables, OverlayFS, Dirty Pipe, PwnKit, Looney Tunables), and safe confirmation over detonation. Use when a Linux host may be running a vulnerable kernel or SUID/userland component. Prefer version proof; detonate only in lab/with RoE.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Linux Kernel Exploits?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-linux-kernel-exploits)
---
name: linux-kernel-exploits
description: Linux kernel privilege-escalation via version-to-CVE mapping and cautious validation (Tier 2, crash-risky) — kernel/distro version enumeration, known-CVE identification (nf_tables, OverlayFS, Dirty Pipe, PwnKit, Looney Tunables), and safe confirmation over detonation. Use when a Linux host may be running a vulnerable kernel or SUID/userland component. Prefer version proof; detonate only in lab/with RoE.
---
# Linux Kernel / Local Privesc (version→CVE, cautious)
Kernel LPE exploits can panic a host — on production, prove the vector by kernel/component version and known-vulnerable range rather than detonating an unstable public exploit. Validate real exploitation only in a lab or with explicit RoE on a disposable host.
## Trigger phrases
`linux kernel exploit, lpe, privilege escalation linux, dirty pipe, pwnkit, nf_tables, overlayfs, looney tunables, kernel cve, uname privesc`
## Execution gate
Record in `./.zazy/scope.md`:
(a) **Lab/authorized to run the kernel/LPE exploit?** → yes = validate on a snapshot/disposable host.
(b) No → **dry scan only**: enumerate kernel + component versions and map to CVEs; confirm presence, do NOT detonate (panic/instability risk). Production detonation needs explicit written RoE.
## Method
1. **Enumerate:** `uname -a`, `cat /etc/os-release`, `/proc/version`, `dpkg -l`/`rpm -qa` for `glibc`/`polkit`/`sudo`/`util-linux`, loaded modules (`lsmod`), `sysctl` hardening (`kernel.unprivileged_userns_clone`, `kptr_restrict`, `dmesg_restrict`), SUID/SGID (`find / -perm -4000`), capabilities (`getcap -r /`).
2. **Map to CVEs:** feed kernel + distro + components to **`linux-exploit-suggester` (les.sh)**, `linux-exploit-suggester-2`, `pompem`; cross-check with `linpeas`/`linenum` findings and vendor advisories.
3. **Prioritize userland LPE first (lower crash risk):** these are far safer than kernel-memory exploits:
- **PwnKit — CVE-2021-4034** (polkit `pkexec`, nearly universal, reliable).
- **Looney Tunables — CVE-2023-4911** (glibc `GLIBC_TUNABLES`).
- **sudo Baron Samedit — CVE-2021-3156**.
- **polkit CVE-2021-3560**.
4. **Kernel LPE (higher risk, gate strictly):**
- **Dirty Pipe — CVE-2022-0847** (5.8–5.16.11; overwrite read-only files/SUID — relatively reliable).
- **nf_tables — CVE-2024-1086** (use-after-free, widely applicable; also CVE-2023-32233).
- **OverlayFS — CVE-2023-0386 / CVE-2021-3493**.
- **DirtyCred / Dirty COW (CVE-2016-5195, legacy)**.
5. **Validate safely:** confirm version-in-range AND component present; where a detection-only check exists, use it. For kernel memory exploits, prefer a lab clone — many public PoCs panic on mismatched offsets.
## Modern / rare techniques
- **[NEW] nf_tables CVE-2024-1086** — common on 2023–2024 kernels; reliable public exploits, but still crash-capable — gate it.
- **[RARE] user-namespace-gated bugs** (`unprivileged_userns_clone=0` neutralizes many) — check the sysctl before claiming exploitable.
- **[NEW] Prefer userland LPE (PwnKit/Looney Tunables)** for reliability + low crash risk over kernel detonation.
## Escalation / chaining
Root → `linux-discovery`/credential harvest → lateral movement / pivot. Container context → combine with `container-escape`. Vulnerable-version tracking → `vulnerable-components`.
## Backend & tooling
Kali/WSL-Kali/HexStrike on the foothold: `linux-exploit-suggester`, `linpeas`/`LinEnum`, `pspy`, `getcap`; compile exploits matching the target kernel/toolchain. Lab snapshot for detonation; never panic production.
## Verification (background, before reporting)
Confirm the version/component is genuinely in the vulnerable range (not just suggester output), and in lab reproduce the root shell twice from a clean state. On production, report the confirmed vulnerable version as the finding and note that detonation was gated. Report confirmed only.
## Evidence
Version enumeration, suggester output, the specific CVE + affected range, sysctl/mitigation state, and (if safely demonstrated) the privesc proof. Note crash risk and why you did/didn't detonate. Remediation: patch kernel + `glibc`/`polkit`/`sudo`, enable `unprivileged_userns_clone=0`, `kptr_restrict`/`dmesg_restrict`, minimize SUID, and the vulnerable-driver/module hygiene.