Web Application Hacking (Hands-On)
Authentication Attacks — Concept + Live Lab
Username enumeration and dictionary attacks against weak logins.
Open the interactive lesson & lab →
Authentication is the front door. Two very common weaknesses: leaking whether a username exists (enumeration), and accepting weak passwords that fall to a dictionary attack.
1. Username enumeration
If 'wrong password' and 'no such user' produce different responses, you can build a list of valid usernames — half the login already solved. The lab returns different messages on purpose; spot the difference.
2. Dictionary / brute-force attack
Once you know a valid username, you try common passwords from a wordlist (rockyou.txt is the classic). Weak passwords like 'password123' fall in seconds.
# Conceptually, tools like Hydra automate this:
hydra -l michael -P rockyou.txt target http-post-form \
"/login:username=^USER^&password=^PASS^:Incorrect"