> 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 内核中的本地漏洞或发行版特定补丁。这些漏洞利用可能不稳定，因此在执行前进行版本验证和实验室测试很重要。

## 方法

* 确定确切的内核、发行版、架构和补丁级别。
* 将漏洞利用建议工具作为起点，然后手动验证 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`                  | 内核管道处理漏洞，可在运行时修改受保护文件。               |

### Dirty COW 检查

```bash
grep -q "Ubuntu 16.04" /etc/issue && echo "系统可能易受 Dirty COW 影响"
```

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

```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="/pages/47a370d6bacc73a7fa3afadb9266bfccb348e7e8">/pages/47a370d6bacc73a7fa3afadb9266bfccb348e7e8</a></td></tr><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>Dirty COW 内核漏洞利用</h4></td><td>内核漏洞利用（Dirty COW）说明，包含 Linux 权限提升的枚举步骤、漏洞利用示例以及以报告为重点的验证。</td><td><a href="/pages/7211eb013261a53c34b450e3452f59fb31a28b6c">/pages/7211eb013261a53c34b450e3452f59fb31a28b6c</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="/pages/dc6bd58921a39a627c3a4bde664d654c3c1e53ac">/pages/dc6bd58921a39a627c3a4bde664d654c3c1e53ac</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="/pages/f85f526bf975e720ef0ee2c0157a7fdd4a928ea5">/pages/f85f526bf975e720ef0ee2c0157a7fdd4a928ea5</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></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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
