> 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/ja/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`                  | 保護されたファイルを実行時に変更できるカーネルのパイプ処理の不具合。        |

### 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="/ja/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>Dirty COWカーネルエクスプロイト</h4></td><td>Linux権限昇格向けのカーネルエクスプロイト（Dirty COW）のノート。列挙手順、エクスプロイトの例、報告を重視した検証を含みます。</td><td><a href="/ja/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>Linux権限昇格向けのカーネルエクスプロイト（Ubuntu 23.04）のノート。列挙手順、エクスプロイトの例、報告を重視した検証を含みます。</td><td><a href="/ja/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>Linux権限昇格向けのカーネルエクスプロイト（OverlayFS）のノート。列挙手順、エクスプロイトの例、報告を重視した検証を含みます。</td><td><a href="/ja/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>Copy Fail（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="/ja/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/ja/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.
