> 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/business-logic/inconsistent-handling-of-exceptional-input.md).

# Inkonsistente Behandlung außergewöhnlicher Eingaben

### Inkonsistente Behandlung außergewöhnlicher Eingaben

**Beschreibung des Labs**

Dieses Labor zeigt eine mangelhafte Validierung von Benutzereingaben im Registrierungsprozess. Dieser logische Fehler ermöglicht den Zugriff auf administrative Funktionen, die normalerweise Mitarbeitern vorbehalten sind. / Zweck: Zugriff auf das Administrationspanel und Löschen von Benutzern **carlos**.

<figure><img src="/files/2bcba2b11c4ed79a5893c3193635683460dc015e" alt=""><figcaption></figcaption></figure>

**Erste Beobachtung**

Bei der Registrierung wird eine Bestätigungs-E-Mail an die angegebene Adresse gesendet. / Der Betriebsserver empfängt \*\*alle E-Mails\*\* im Zusammenhang mit der Domain und ihren Subdomains:

```bash
@exploit-0a8c00a504628ac58246f51601c6009c.exploit-server.net
```

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

Daher ist jede mit dieser Domain oder ihren Subdomains erstellte Adresse zulässig.

<figure><img src="/files/5df4296a3bf71ce4e1730e1cb947690760c39774" alt=""><figcaption></figcaption></figure>

**Identifiziertes abnormales Verhalten**

Durch das Erstellen einer E-Mail-Adresse mit einer sehr großen Anzahl von Zeichen vor dem `@` Symbol stellen wir fest, dass das Feld \*\*

{% code overflow="wrap" %}

```bash
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@exploit-0a8c00a504628ac58246f51601c6009c.exploit-server.net
```

{% endcode %}

Diese Begrenzung führt zu einer Inkonsistenz zwischen dem tatsächlich gespeicherten Wert und dem, der angezeigt oder für Sicherheitsprüfungen verwendet wird.

<figure><img src="/files/98f1568a534b80ac437316774831cf19b7b9b450" alt=""><figcaption></figcaption></figure>

**Funktionsweise des Fehlers**

Das Ziel besteht darin, eine Trunkierung zu erzwingen, sodass die registrierte E-Mail genau mit dem `dontwannacry.com` Vertrauensbereich.

Längenüberprüfung:

{% code overflow="wrap" %}

```bash
eecho -n "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@dontwannacry.com" | wc -c
```

{% endcode %}

<figure><img src="/files/07f1485486f728c8de0f65f909eb1b60d35428a1" alt=""><figcaption></figcaption></figure>

Sobald die 255 Zeichen erreicht sind, wird die endgültige Adresse auf diese Weise konstruiert:

{% code overflow="wrap" %}

```bash
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@dontwannacry.com.exploit-0a8c00a504628ac58246f51601c6009c.exploit-server.net
```

{% endcode %}

Der Betriebsserver empfängt die E-Mail problemlos, da er alle Subdomains akzeptiert.

<figure><img src="/files/84693b59eda055b909b251dd958eae8b6522ae85" alt=""><figcaption></figcaption></figure>

Die Anwendung interpretiert die Adresse nach der Trunkierung als zu der `dontwannacry.com` Domain.

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

Das Konto wird als intern oder vertrauenswürdig betrachtet. / Sobald verbunden, ist der Zugriff auf das **Administrationsbereich** ohne zusätzliche Kontrolle erlaubt.

<figure><img src="/files/828f70f12ad1514d0017b92c8549303fb59ec403" 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/business-logic/inconsistent-handling-of-exceptional-input.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.
