> 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 via Informationsleck

### Authentifizierungsumgehung durch Informationsoffenlegung

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 nicht bekannt ist. / Um das Lab zu lösen, müssen Sie den Namen dieses Headers ermitteln, ihn zur Umgehung der Authentifizierung verwenden, auf die Administrationsoberfläche zugreifen und den Benutzer löschen **carlos**.

**Erstzugriff auf die Administrationsoberfläche**

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

> *Administrationsoberfläche nur für lokale Benutzer verfügbar*

Dies zeigt, dass der Zugriff auf Anfragen vom lokalen Host beschränkt ist.

<figure><img src="/files/28d1ec09d839187ee8d0658505bee294bfe4d8bd" alt=""><figcaption></figcaption></figure>

**Informationsoffenlegung ü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="/files/37f68567b86168634dc8a63f2fcf4e4ac80c8153" 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.

**Umgehung der Authentifizierung**

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

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

<figure><img src="/files/6b2bcd61d3adeed24577868b5f8af33680480195" alt=""><figcaption></figcaption></figure>

betrachtet der Server die Anfrage als lokal. / Die Administrationsoberfläche ist 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 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/information-disclosure/authentication-bypass-via-information-disclosure.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.
