> 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/business-logic/excessive-trust-in-client-side-controls.md).

# クライアントサイド制御への過度な信頼

クライアントサイド制御への過度な信頼の PortSwigger Web Security Academy ラボ向けノート。攻撃フロー、ペイロードテスト、Burp Suite による検証、および是正策の文脈を含みます。

### クライアント側の制御への過度な信頼

**ラボの説明**

このアプリケーションは、クライアントから送信されたデータを適切に検証していません。 / 購入処理の論理的欠陥を悪用して、商品の価格を変更することが可能です。 / 目的は \*\* を購入することです

提供された識別子:

* **ユーザー**: wiener
* **パスワード**: peter

**行動分析**

ウェブサイトにはショッピングカートがあります

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

商品をカートに追加すると、 **POST** price を含むいくつかのパラメータを含むクエリが送信されます。

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

通常のカート追加時に確認されたクエリの例:

```bash
productId=1&redir=PRODUCT&quantity=1&price=133700
```

その **price** パラメータはクライアントによって完全に制御されており、サーバー側で適切に検証されていません。

**悪用**

の値を手動で変更することで **price** クエリ内のパラメータ、たとえば次のように:

```bash
productId=1&redir=PRODUCT&quantity=1&price=0
```

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

サーバーは厳密な検証を行わずにリクエストを受け入れます。

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

**結果**

商品はカートに追加され、クライアント側で価格が操作されているにもかかわらず、購入を確定できます。 / これはブラウザー側の制御への過度な依存を示しており、想定されたビジネスロジックが回避可能になっています。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-952cf8501c39e41194c8499712caa327675f17d1%2Fimage%20(215).png?alt=media" 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/web/business-logic/excessive-trust-in-client-side-controls.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.
