> 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).

# Benutzerenumeration über Antwortzeiten

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

### Benutzernamen-Enumerierung über Antwortzeitmessung

Dieses Labor ist anfällig für Benutzernamen-Enumerierung anhand der Antwortzeit. Um es zu lösen, 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
```

### **Erstanalyse**

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="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-18e4eee134747be67f320dc7e8362dc65968a908%2F%7B94C85D5E-85D5-4FD4-A779-8BCC8351A49E%7D.png?alt=media" alt="" width="477"><figcaption></figcaption></figure>

Um diesen Schutz 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 %}

Dann wird beobachtet, dass die Antwort etwa **3 Sekunden** zum Eintreffen braucht.

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

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

Dieser Unterschied ermöglicht es daher, einen gültigen **Benutzername** von einem ungültigen zu unterscheiden.

#### **Liste mit Intruder**

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

* Erste Position: Liste von **Benutzernamen** die getestet werden sollen

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-197dcb9591365ae17191442c5a8886be433599ac%2F%7B6B917060-177C-43FB-BC6C-A9A265F7CEFA%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d04b41d186f46f44b1b240c2812a9c6587bb362f%2F%7B4501EB8A-7BA4-4D12-A530-6A2BCF8616AF%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-bb65673524388490f1db31021b3246baa6780b5a%2F%7B0E72DC9F-1194-4CC3-BE7B-27566B70ACC9%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Das Feld **Antwort abgeschlossen** wird analysiert:

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

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c15e53d3534008714c11158246a43fbb571d8cc5%2F%7B863369CA-5117-4A5C-8AE6-F62933497E92%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

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

#### \*\* Brute-Force-Passwortstärke\*\*

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

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4748af9aab774dc58ed5e790387038593c0c6afb%2F%7BC272F45E-E8D1-463F-9DD9-995AB7B1B41C%7D.png?alt=media" 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="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-aaa7587356864b4fb30b590ba5c9c9a4b5027b5b%2F%7B122670AB-B019-411C-BF83-2B4DA65EB3EF%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Der Zugriff auf das Konto wird dann bestätigt.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e6e8b8d15f2bf424b2259fea3884765f23561860%2F%7B815C9DA3-77D7-4CCE-8B13-27F346874840%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/authentication/username-enumeration-via-response-timing.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.
