> 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/zh/privesc/kernel-exploitation.md).

# 内核利用

Linux 内核漏洞利用笔记，适用于本地权限提升、Linux Exploit Suggester、Dirty COW、OverlayFS 以及 Ubuntu 内核 CVE。

内核权限提升针对 Linux 内核中的本地漏洞或发行版特定补丁。这些利用可能不稳定，因此在执行前进行版本验证和实验室测试很重要。

## 方法

* 识别确切的内核、发行版、架构和补丁级别。
* 将利用建议器作为起点，然后手动验证 CVE 的适用性。
* 仅在确认目标存在漏洞后再编译并运行概念验证代码。

## 快速检查

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

{% hint style="info" %}
Linux 内核利用通过滥用内核中的漏洞来以提升的权限执行代码。在运行概念验证之前，请确认内核和发行版版本。
{% endhint %}

## 漏洞利用研究

将自动化建议作为起点，然后手动确认确切的内核、发行版补丁级别、架构和利用要求。

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

需要仔细验证的常见本地内核提权家族：

| 利用家族            | 示例 CVE                           | 说明                                     |
| --------------- | -------------------------------- | -------------------------------------- |
| 脏牛（Dirty COW）   | `CVE-2016-5195`                  | 较旧的内核写时复制漏洞；通常不稳定且依赖版本。                |
| OverlayFS       | `CVE-2021-3493`, `CVE-2023-0386` | Ubuntu/内核特定的 OverlayFS 提权路径。           |
| PTRACE\_TRACEME | `CVE-2019-13272`                 | 影响某些 Ubuntu apport/pkexec 流程的本地权限提升漏洞。 |
| Dirty Pipe      | `CVE-2022-0847`                  | 内核管道处理缺陷，可在运行时修改受保护文件。                 |

### 脏牛检查

```bash
grep -q "Ubuntu 16.04" /etc/issue && echo "系统可能易受脏牛漏洞影响"
```

仅在实验室或授权目标上确认适用性后再编译并运行：

```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>工具（Linux Exploit Suggester）- Linux 权限提升说明，包含枚举步骤、漏洞利用示例，以及面向报告的验证。</td><td><a href="/zh/privesc/kernel-exploitation/linux-exploit-suggester-linux-privilege-escalation.md">Linux Exploit Suggester - 权限提升</a></td></tr><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>脏牛内核利用</h4></td><td>内核利用（脏牛）说明，适用于 Linux 权限提升，包含枚举步骤、漏洞利用示例，以及面向报告的验证。</td><td><a href="/zh/privesc/kernel-exploitation/dirty-cow-kernel-exploit-linux-privilege-escalation.md">内核利用（Dirty COW）- Linux 权限提升</a></td></tr><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>Ubuntu 23.04 内核利用</h4></td><td>内核利用（Ubuntu 23.04）说明，适用于 Linux 权限提升，包含枚举步骤、漏洞利用示例，以及面向报告的验证。</td><td><a href="/zh/privesc/kernel-exploitation/ubuntu-23.04-kernel-exploit-linux-privilege-escalation.md">内核利用（Ubuntu 23.04）- Linux 权限提升</a></td></tr><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>OverlayFS 内核利用</h4></td><td>内核利用（OverlayFS）说明，适用于 Linux 权限提升，包含枚举步骤、漏洞利用示例，以及面向报告的验证。</td><td><a href="/zh/privesc/kernel-exploitation/overlayfs-kernel-exploit-linux-privilege-escalation.md">内核利用（OverlayFS）- Linux 权限提升</a></td></tr><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>复制失败（CVE-2026-31431）</h4></td><td>验证 Copy Fail 内核权限提升暴露面，并确认目标系统是否存在漏洞。</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 内核 4.4.0-116</h4></td><td>Linux 内核本地权限提升利用说明、版本验证以及安全的概念验证测试。</td><td><a href="/zh/privesc/kernel-exploitation/ubuntu-16.04-kernel-4.4.0-116.md">Ubuntu 16.04 内核 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/zh/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.
