> 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/simple-2fa-bypass.md).

# Einfache 2FA-Umgehung

### Einfacher 2FA-Bypass

Dieses Labor verwendet eine Zwei-Faktor-Authentifizierung, die umgangen werden kann. Wir haben bereits einen gültigen Benutzernamen und ein Passwort, haben jedoch keinen Zugriff auf den an das Opfer gesendeten 2FA-Code. Das Ziel ist es, auf Carlos' Kontoseite zuzugreifen.

```bash
Ihre Zugangsdaten: wiener:peter
Zugangsdaten des Opfers carlos:montoya
```

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

Nach der Anmeldung mit Carlos' Zugangsdaten sendet der Server einen 2FA-Code per E-Mail. Durch Eingabe dieses 4-stelligen Codes wird die Anfrage gesendet **POST** an den Endpunkt **/login2**.

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

<figure><img src="/files/df809a16a3a1fbc6c5f69aecc4bdf59c9db23c73" alt="" width="499"><figcaption></figcaption></figure>

Es ist jedoch möglich, diesen Schritt vollständig zu umgehen. Anstatt den 2FA-Code einzugeben, fordern Sie einfach direkt Zugriff an auf **/my-account**. Der Server prüft den 2FA-Validierungsstatus nicht korrekt und gewährt trotz fehlenden Codes Zugriff.

<figure><img src="/files/7dd3c7fb959a63031ff81caf161fcc1356bf18eb" alt="" width="563"><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/simple-2fa-bypass.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.
