> 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/de/web/business-logic/flawed-business-rules.md).

# Schlecht angewandte Geschäftsregeln

Notizen zu schlecht angewandten Geschäftsregeln für die Labs der PortSwigger Web Security Academy, einschließlich Ausnutzungsablauf, Payload-Tests, Burp-Suite-Validierung und Behebungskontext.

### Fehlerhafte Durchsetzung von Geschäftsregeln

Dieses Labor enthält einen logischen Fehler im Kaufprozess. / Das Ziel ist es, diese Schwachstelle auszunutzen, um ein \*\*

Bereitgestellte Kennung:

* **Benutzer**: `wiener`
* **Passwort**: `peters`

**Analyse des Gutscheinsystems**

Nach dem Login stellt die Website automatisch einen Willkommensgutschein bereit:

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

**NEWCUST5** → Rabatt von 5 €

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

Dann wird durch das Abonnieren des Newsletters ein zweiter Gutschein vergeben:

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

* **SIGNUP30** → Rabatt von 30 €

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

Jeder Gutschein ist einzeln gültig und funktioniert korrekt, wenn er allein verwendet wird.

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

**Problem der Geschäftslogik**

Das System wendet beim Einsatz von Gutscheinen unzureichende Prüfungen an:

* Die Validierung prüft nur \*\*den zuletzt angewendeten Gutschein\*\*
* Es gibt keine Gesamtprüfung\*\*, die die erneute Verwendung oder Verkettung derselben Gutscheine verhindert

**Funktionsweise des Fehlers**

Durch das Abwechseln der beiden Gutscheine lässt sich die erwartete Logik umgehen:

```bash
NEWCUST5
SIGNUP30
NEWCUST5
SIGNUP30
NEWCUST5
SIGNUP30
```

Jeder neue Gutschein wird akzeptiert, da die Prüfung nur den vorherigen Gutschein vergleicht.

**Ergebnis**

Durch Wiederholen dieser Sequenz wird der Gesamtpreis der Jacke schrittweise auf Folgendes reduziert:

* **Gesamt: 0 €**

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-40a2f4141be00a536b2d377abade80e75a48d0e0%2Fimage%20(236).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/de/web/business-logic/flawed-business-rules.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.
