> 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/ru/web/business-logic/insufficient-workflow-validation.md).

# Недостаточная проверка рабочего процесса

Заметки по лабораторным работам PortSwigger Web Security Academy о недостаточной проверке рабочего процесса, включая рабочий процесс эксплуатации, тестирование полезной нагрузки, проверку в Burp Suite и контекст устранения уязвимости.

### Недостаточная проверка рабочего процесса

**Описание лабораторной работы**

Этот лабораторный стенд основан на неверных предположениях о логической последовательности этапов процесса покупки. Приложение не проверяет должным образом, что все необходимые условия (включая фактическую оплату) были выполнены, прежде чем подтверждать заказ.

\*\* Цель:\*\*/ Используйте эту уязвимость, чтобы купить товар \*\*

**Предоставленные учетные данные:**

* Пользователь: `wiener`
* Пароль: `peter`

**Анализ поведения приложения**

* Когда пользователь пытается оплатить товар при недостаточном балансе, приложение возвращает следующую ошибку:

  ```bash
  ?err=INSUFFICIENT_FUNDS
  Недостаточно средств на балансе магазина для этой покупки
  ```

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-9e9474a6b67483afd6d6c38a44e836ede1fc550f%2F%7BEDD9DFB2-C9C5-4749-BA7A-450153B99568%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Однако подтверждение заказа основано только на обращении к следующему URL:

```bash
/cart/order-confirmation?order-confirmed=true
```

* Эта страница не проверяет, была ли фактически произведена оплата и было ли достаточно средств на балансе.

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-732f6362e094d67d2b951b28f2e79070dd0f2135%2F%7B79F90F1B-431F-46CF-9A26-1353CD8B498D%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**Эксплуатация уязвимости**

1. Добавьте в корзину товар стоимостью **1337 €** (например, целевая куртка).

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-067f9767ba2e5e6efc753829aa05ff6a4e76bb6b%2F%7BAF4B9004-5F2B-4C13-BBC9-86CC57C00665%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Не завершайте оплату обычным способом (она не удастся из-за недостатка средств).

Получите доступ напрямую через **GET** запрос к следующему URL:

`/cart/order-confirmation?order-confirmed=true`

* Затем приложение подтверждает команду без выполнения дополнительной проверки.

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f580a59b3c648d30d9b90c31810a5fa8011e9e5e%2F%7BE599D805-FED4-425A-8145-90899B7F8C79%7D.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/ru/web/business-logic/insufficient-workflow-validation.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.
