> 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/information-disclosure/authentication-bypass-via-information-disclosure.md).

# Authentifizierungsumgehung durch Informationsoffenlegung

Notizen zur Authentifizierungsumgehung durch Informationsoffenlegung für die Labs der PortSwigger Web Security Academy, einschließlich Ausnutzungsablauf, Payload-Tests, Burp-Suite-Validierung und Behebungskontext.

### Authentifizierungsumgehung durch Informationspreisgabe

Die Administrationsoberfläche der Anwendung enthält einen Mechanismus zur Umgehung der Authentifizierung. Dieser basiert auf einem benutzerdefinierten HTTP-Header, der vom Frontend verwendet wird, aber a priori unbekannt ist. / Um das Lab zu lösen, müssen Sie den Namen dieses Headers ermitteln, ihn verwenden, um die Authentifizierung zu umgehen, auf die Administrationsoberfläche zugreifen und den Benutzer löschen **carlos**.

**Erstzugriff auf die Administrationsoberfläche**

Ein Versuch, direkt über die `/admin` Route auf die Admin-Seite gibt die folgende Nachricht zurück:

> *Admin-Oberfläche nur für lokale Benutzer verfügbar*

Dies weist darauf hin, dass der Zugriff auf Anfragen vom lokalen Host beschränkt ist.

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

**Informationspreisgabe über die TRACE-Methode**

Durch Senden einer HTTP-Anfrage mit der `TRACE` Methode an `/admin`gibt der Server mehr Header als nötig zurück.

```bash
TRACE /admin
```

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

Unter diesen Informationen wird ein benutzerdefinierter Header offengelegt:

```bash
X-Custom-Ip-Authorization
```

Dieser Header wird vom Frontend verwendet, um festzustellen, ob die Anfrage von einem lokalen Benutzer stammt.

**Authentifizierungsumgehung**

Das Hinzufügen des folgenden Headers zu einer Anfrage an `/admin`:

```bash
X-Custom-Ip-Authorization: 127.0.0.1
```

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

betrachtet der Server die Anfrage als lokal. / Die Administrationsoberfläche wird dann ohne zusätzliche Authentifizierung zugänglich.

**Abschließende Ausnutzung**

Sobald Sie mit dem Administrationsbereich verbunden sind, ist es möglich, den Zielbenutzer zu entfernen, indem Sie die folgende URL aufrufen:

```bash
/admin/delete?username=carlos
```


---

# 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/information-disclosure/authentication-bypass-via-information-disclosure.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.
