> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/privesc/kernel-exploitation.md).

# Kernel Exploitation

Linux kernel exploit notes for local privilege escalation, Linux Exploit Suggester, Dirty COW, OverlayFS, and Ubuntu kernel CVEs.

Kernel privilege escalation targets local vulnerabilities in the Linux kernel or distribution-specific patches. These exploits can be unstable, so version validation and lab testing matter before execution.

## Methodology

* Identify the exact kernel, distribution, architecture, and patch level.
* Use exploit suggesters as a starting point, then verify CVE applicability manually.
* Compile and run proof of concept code only after confirming the target is vulnerable.

## Quick Checks

```bash
uname -a
cat /proc/version
cat /etc/os-release
lsb_release -a 2>/dev/null
```

{% hint style="info" %}
Linux kernel exploitation abuses vulnerabilities in the kernel to execute code with elevated privileges. Confirm the kernel and distribution version before running a proof of concept.
{% endhint %}

## Exploit Research

Use automated suggestions as a starting point, then confirm the exact kernel, distribution patch level, architecture, and exploit requirements manually.

```bash
searchsploit linux kernel <version>
searchsploit linux kernel ubuntu
searchsploit linux kernel overlayfs
```

Common local kernel escalation families to validate carefully:

| Exploit Family  | Example CVE                      | Notes                                                                 |
| --------------- | -------------------------------- | --------------------------------------------------------------------- |
| Dirty COW       | `CVE-2016-5195`                  | Older kernel copy-on-write bug; often unstable and version dependent. |
| OverlayFS       | `CVE-2021-3493`, `CVE-2023-0386` | Ubuntu/kernel-specific OverlayFS privilege escalation paths.          |
| PTRACE\_TRACEME | `CVE-2019-13272`                 | Local privilege escalation affecting some Ubuntu apport/pkexec flows. |
| Dirty Pipe      | `CVE-2022-0847`                  | Kernel pipe handling bug that can modify protected files at runtime.  |

### Dirty COW Check

```bash
grep -q "Ubuntu 16.04" /etc/issue && echo "System might be vulnerable to Dirty COW"
```

Compile and run only after confirming applicability in a lab or authorized target:

```bash
gcc -pthread dirty.c -o dirty -lcrypt
./dirty password123
```

<table data-view="cards" data-full-width="false" data-search="false"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>Linux Exploit Suggester</h4></td><td>Tool (Linux Exploit Suggester) - Privilege Escalation notes for Linux privilege escalation, with enumeration steps, exploitation examples, and reporting-focused validation.</td><td><a href="/privesc/kernel-exploitation/linux-exploit-suggester-linux-privilege-escalation.md">Linux Exploit Suggester - Privilege Escalation</a></td></tr><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>Dirty COW Kernel Exploit</h4></td><td>Kernel Exploitation (Dirty COW) notes for Linux privilege escalation, with enumeration steps, exploitation examples, and reporting-focused validation.</td><td><a href="/privesc/kernel-exploitation/dirty-cow-kernel-exploit-linux-privilege-escalation.md">Kernel Exploitation (Dirty COW) - Linux Privilege Escalation</a></td></tr><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>Ubuntu 23.04 Kernel Exploit</h4></td><td>Kernel Exploitation (Ubuntu 23.04) notes for Linux privilege escalation, with enumeration steps, exploitation examples, and reporting-focused validation.</td><td><a href="/privesc/kernel-exploitation/ubuntu-23.04-kernel-exploit-linux-privilege-escalation.md">Kernel Exploitation (Ubuntu 23.04) - Linux Privilege Escalation</a></td></tr><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>OverlayFS Kernel Exploit</h4></td><td>Kernel Exploitation (OverlayFS) notes for Linux privilege escalation, with enumeration steps, exploitation examples, and reporting-focused validation.</td><td><a href="/privesc/kernel-exploitation/overlayfs-kernel-exploit-linux-privilege-escalation.md">Kernel Exploitation (OverlayFS) - Linux Privilege Escalation</a></td></tr><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>Copy Fail (CVE-2026-31431)</h4></td><td>Validate Copy Fail kernel privilege escalation exposure and confirm whether the target system is vulnerable.</td><td><a href="https://github.com/theori-io/copy-fail-CVE-2026-31431">https://github.com/theori-io/copy-fail-CVE-2026-31431</a></td></tr><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>Ubuntu 16.04 Kernel 4.4.0-116</h4></td><td>Linux kernel exploit notes for local privilege escalation, version validation, and safe proof-of-concept testing.</td><td><a href="/privesc/kernel-exploitation/ubuntu-16.04-kernel-4.4.0-116.md">Ubuntu 16.04 Kernel 4.4.0-116</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/privesc/kernel-exploitation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
