Lion Cipher Lab

Enumerate SMTP usernames with VRFY, EXPN and RCPT

Why it matters

Almost every attack that starts with a login form starts one step earlier, with a list of real usernames. If an attacker can hand a mail server a name and be told, reliably, whether that account exists, they can turn a giant wordlist into a short list of confirmed employees before they ever try a single password. That confirmed list is what makes PASSWORD SPRAYING viable — one common password tried against many real accounts, quietly, under the lockout threshold — and it is what makes phishing land, because an email to a name that exists is read and an email to a name that does not bounces…

What you'll learn

Steps in this lab

  1. What SMTP username enumeration is, and why an attacker wants a list of your accounts
  2. VRFY and EXPN — the two commands that were built to answer this question
  3. Stand up a leaky mail server on your OWN lab
  4. Attack it by hand — netcat, VRFY, and the 250-vs-550 split
  5. When VRFY is off: the MAIL FROM / RCPT TO technique
  6. Automate it with smtp-user-enum against a wordlist
  7. Fix it: disable VRFY/EXPN, make responses uniform, rate-limit
  8. Re-measure — prove valid and invalid are now indistinguishable
  9. Judgment — where this fits, and how not to fool yourself with it

Open the full interactive lab →