> 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/cache-poisoning/cache-poisoning-via-unindexed-query-parameter.md).

# Cache-Poisoning über einen nicht indizierten Query-Parameter

Notizen zum Cache-Poisoning über einen nicht indizierten Query-Parameter für die Labs der PortSwigger Web Security Academy, einschließlich Ausnutzungsablauf, Payload-Tests, Burp-Suite-Validierung und Behebungskontext.

### Web-Cache-Poisoning über einen nicht in den Cache-Schlüssel aufgenommenen Query-Parameter

Dieses Lab ist anfällig für einen Web-Cache-Poisoning-Angriff, da ein Query-Parameter nicht im Cache-Schlüssel enthalten ist. / Ein Benutzer besucht regelmäßig die Startseite der Website mit Chrome. / Das Ziel ist es, den Cache zu vergiften, sodass die Startseite eine Antwort ausliefert, die ausgeführt wird `alert(1)` im Browser des Opfers ausführt.

**Erste Analyse**

* Beim Abfangen der Antwort der Startseite wird ein **kanonisch** Link beobachtet.
* Wenn Sie die URL mit einem beliebigen Parameter aufrufen, zum Beispiel `/?hello`, wird der Wert in der Antwort gut reflektiert

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1871d2fc701cc8b477a71d82641d280d6cb50a35%2F%7BF524D9FB-B23A-4150-81DA-8F20E7419FC7%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Beim Einfügen einer Payload wie:

```bash
/?test'/><script>alert(1)</script>
```

* HTML-Code wird in der Antwort interpretiert, aber auf der Opferseite werden keine Alarme ausgelöst.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e4f554844d5146c3422aceb69e3dcced72fcb1fe%2F%7B734F33BC-EB04-480C-A19E-D18BE89A91C9%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**Identifiziertes Problem**

Der Cache betrachtet jede Variante des `?test` Parameters als neue Eingabe. / Daher wird der Cache bei jeder Wertänderung neu generiert und die Vergiftung bleibt nicht bestehen.

Einige Parameter werden jedoch **vollständig ignoriert** vom Cache-Schlüssel:

* Ihr Name und Wert werden nicht berücksichtigt.
* Die zwischengespeicherte Antwort bleibt gleich, selbst wenn sich ihr Wert ändert.

**Identifizierung des nicht indizierten Parameters**

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-65505e828de6590eb1d67cb0861211ff661f7d53%2F%7B01DA2100-8C27-4CB0-BFF0-3EFE3043FE34%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Verwendung von **Param Miner** (Funktion zum Erraten von Query-Parametern), der `utm_content` Parameter wird identifiziert.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-20c44b2767ed05cc3d703e77327ef684da948c37%2F%7B05D74FEB-B745-45BE-B1A4-CC31B5C89F63%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

* Durch das Testen verschiedener Werte für diesen Parameter stellen wir fest, dass der Cache unverändert bleibt, was bestätigt, dass er nicht im Cache-Schlüssel enthalten ist.

<pre class="language-bash"><code class="lang-bash"><strong>/?utm_content=test
</strong></code></pre>

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-58224d7a9841bc18b9b0c1d9e2da7bf5cd984cf2%2F%7B39C0B55B-4D1C-4D05-9E2F-10064DBBE52C%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**Ausnutzung**

Die bösartige Payload wird dann in diesen nicht indizierten Parameter injiziert:

```bash
/?utm_content='/><script>alert(1)</script>
```

Die vergiftete Antwort wird im Cache gespeichert und den folgenden Besuchern ausgeliefert.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-561c0564a9cc1ff15928ee60745fc1b1a454b91f%2F%7BB11F48CD-41CB-4DF8-8C99-A21C820C843B%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/de/web/cache-poisoning/cache-poisoning-via-unindexed-query-parameter.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.
