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

# シンプルな2FAバイパス

シンプルな2FAバイパスの PortSwigger Web Security Academy ラボ向けノート。攻撃フロー、ペイロードテスト、Burp Suite による検証、および是正策の文脈を含みます。

### 2要素認証の簡単なバイパス

このラボでは、バイパス可能な2要素認証を使用しています。すでに有効なユーザー名とパスワードはありますが、被害者に送信された2FAコードにはアクセスできません。目的は、Carlosのアカウントページにアクセスすることです。

```bash
あなたの認証情報: wiener:peter
被害者の認証情報 carlos:montoya
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-bdc1aa5af305ccb244a863d2e3d49d6361fb8291%2F%7B0BE8A5AC-9311-40A2-A0D5-1AC4BF391230%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

CarlosのIDで接続すると、サーバーはメールで2FAコードを送信します。この4桁のコードを入力すると、リクエストは **POST** エンドポイントへ送信されます **/login2**.

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-9cea1846d26674ea0ce830bdb8cd84eb6b1039f2%2F%7B6DA8DC74-3130-4AB7-98CE-BA6C0AA0A5C4%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-8bb66a79dacacabd4c561c64ff6c87a94b4e34f2%2F%7BE0B7211B-BDC9-45EF-BFFC-D15F6E9BFF90%7D.png?alt=media" alt="" width="499"><figcaption></figcaption></figure>

ただし、この手順は完全にバイパスできます。2FAコードを送信する代わりに、次の場所へ直接アクセスを要求するだけです **/my-account**。サーバーは2FAの検証状態を正しく確認せず、コードがなくてもアクセスを許可します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-61291969d8a04913a7e5fc71615822c891c912f8%2F%7BBBE6644C-6869-4046-9B20-37F42B4188C1%7D.png?alt=media" 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 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/ja/web/authentication/simple-2fa-bypass.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.
