> 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/authentication/username-enumeration-via-response-timing.md).

# Benutzernamen-Enumeration über Antwortzeitmessung

### Benutzername-Enumerierung über Antwortzeit

Dieses Lab ist anfällig für eine Benutzername-Enumerierung anhand der Antwortzeit. Um dies zu beheben, müssen Sie einen gültigen Benutzernamen identifizieren, einen rohen Brute-Force-Angriff auf Ihr Passwort durchführen und dann auf Ihre Kontoseite zugreifen.

```bash
Ihre Zugangsdaten: wiener:peter
```

### **Erste Analyse**

Beim Testen einer großen Anzahl von Passwörtern zeigt die Anwendung eine Fehlermeldung an, die darauf hinweist, dass eine übermäßige Anzahl von Versuchen erkannt wurde.

<figure><img src="/files/088197ea4c076b5e922ac29194caf613eba92ca8" alt="" width="477"><figcaption></figcaption></figure>

Um diese Schutzmaßnahme zu umgehen, wird der folgende Header hinzugefügt:

```bash
X-Forwarded-For: 127.0.0.2
```

### **Messung der Antwortzeit**

Senden Sie eine Anfrage mit einem extrem langen **Passwort** für den Benutzer `wiener`:

{% code overflow="wrap" %}

```bash
username=wiener&password=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
```

{% endcode %}

Es wird dann beobachtet, dass die Antwort etwa **3 Sekunden** benötigt, um anzukommen.

Andererseits ist, wenn dieselbe Anfrage mit einem ungültigen Benutzernamen\*\* gesendet wird, die Antwort **quasi sofort**:

```bash
username=dwdwd&password=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
```

Dieser Unterschied macht es daher möglich, einen gültigen **Benutzernamen** von einem ungültigen.

#### **Liste mit Intruder**

In Intruder verwenden wir die **Pitchfork** Technik.

* Erste Position: Liste von **Benutzernamen** zum Testen

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

Zweite Position: Liste von **verschiedenen IP-Adressen** gesendet an `X-Forwarded-For`

<figure><img src="/files/7747ffa8ba7d7c4dd19add733b94e3a91abde8c0" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/0e358be524e8194ed262f8b1916c7b1e9458aff7" alt=""><figcaption></figcaption></figure>

Das Feld **Antwort abgeschlossen** wird analysiert:

Antworten, die mit einem gültigen Benutzer verknüpft sind, haben eine deutlich höhere Zeit (Apache zeigt einen wesentlich größeren Wert an).

<figure><img src="/files/803737e1b51c52c008f91aed9fd4a7697cf45b17" alt=""><figcaption></figcaption></figure>

Dies ermöglicht es, den richtigen Benutzer zu identifizieren.

#### \*\* Passwort per Brute-Force\*\*

Nachdem Sie den gültigen Benutzernamen gefunden haben, starten Sie den Angriff auf Ihr Passwort.

<figure><img src="/files/0b07f897a12b64a53096d1014f3a09afb0190063" alt=""><figcaption></figcaption></figure>

Wir stellen fest, dass der Versuch mit dem Passwort **chelsea** eine andere Antwort erzeugt: ein **302 Found**, ein Zeichen dafür, dass die Authentifizierung erfolgreich ist.

<figure><img src="/files/1e86505aa7e6324e6a6eb3c57ec30c1df17c88b8" alt=""><figcaption></figcaption></figure>

Der Zugriff auf das Konto wird dann bestätigt.

<figure><img src="/files/708cd883408c642fb3fb7f2842ff745a5f8d171c" 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/authentication/username-enumeration-via-response-timing.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.
