Mitigating SMTP User Enumeration: Disable VRFY and EXPN
A security analyst observes repeated attempts to validate user accounts via SMTP using VRFY commands from an external IP. What is the BEST immediate action to mitigate this reconnaissance?
Quick Answer
The answer is to disable VRFY and EXPN commands in the SMTP server configuration, as this directly stops user enumeration during the reconnaissance phase. VRFY, defined in RFC 821, lets an attacker verify if an email address exists, while EXPN reveals mailing list members; both are abused to map valid accounts without authentication. On the Certified Ethical Hacker CEH exam, this tests your understanding of SMTP reconnaissance techniques and the principle of reducing the attack surface by disabling unnecessary protocol features. A common trap is to suggest rate-limiting or logging instead, but those only detect or slow the attack, not prevent it—disabling the commands is the definitive mitigation. Remember the mnemonic: “VRFY and EXPN are the attacker’s pen; disable them to end the recon again.”
⚠ Common exam trap
A common mix-up: candidates choose to block the IP address (Option C) as a quick fix, failing to recognize that the root cause is the enabled VRFY/EXPN commands, which must be disabled at the server configuration level for a permanent mitigation.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Disable VRFY and EXPN commands in the SMTP server configuration
The VRFY command is an SMTP protocol feature (RFC 821) that allows a client to verify whether a specific email address exists on the server. Attackers use VRFY and EXPN to enumerate valid user accounts during the reconnaissance phase. Disabling these commands in the SMTP server configuration directly stops this enumeration technique without affecting legitimate mail delivery.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Upgrade to the latest version of the SMTP server
Why it's wrong here
Upgrading may not remove the commands.
- ✗
Enable SMTP authentication for all incoming connections
Why it's wrong here
Authentication does not stop VRFY if allowed.
- ✗
Block the external IP address at the firewall
Why it's wrong here
IP blocking is reactive; the attacker can use different IPs.
- ✓
Disable VRFY and EXPN commands in the SMTP server configuration
Why this is correct
This prevents the enumeration technique entirely.
Go deeper
Related to this question
About these practice questions
One of 870 original CEH practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
3 more ways this is tested on CEH
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. An attacker uses SMTP commands to verify the existence of email accounts on a mail server. Which sequence of SMTP commands is used for this purpose?
hard- A.EHLO, AUTH, STARTTLS
- B.HELO, MAIL FROM, RCPT TO, DATA
- C.NOOP, QUIT, RSET
- ✓ D.VRFY, EXPN, RCPT TO
Why D: The VRFY command asks the mail server to verify whether a given email address exists, EXPN expands a mailing list to reveal individual addresses, and RCPT TO (used in the SMTP transaction) can also be used to check address validity by observing the server's response. Together, these commands allow an attacker to enumerate valid email accounts on the server.
Variation 2. A penetration tester is attempting to enumerate user accounts on a mail server. They connect to port 25 and issue the commands `VRFY root` and `EXPN support`. Which protocol is being targeted?
medium- A.LDAP
- ✓ B.SMTP
- C.SMB
- D.SNMP
Why B: The commands VRFY and EXPN are SMTP (Simple Mail Transfer Protocol) commands defined in RFC 821 and RFC 5321. VRFY is used to verify whether a mailbox exists on the server, while EXPN expands a mailing list alias to reveal its members. Since the tester connected to port 25 (the default SMTP port) and issued these commands, SMTP is the protocol being targeted.
Variation 3. A penetration tester wants to enumerate user accounts on a Linux system running SMTP service. Which commands are commonly used for this purpose?
medium- A.USER, PASS, QUIT
- ✓ B.VRFY, EXPN, RCPT TO
- C.AUTH LOGIN, STARTTLS, EHLO
- D.HELO, MAIL FROM, DATA
Why B: The VRFY command verifies whether a user mailbox exists on the SMTP server, EXPN expands a mailing list or alias to reveal individual member addresses, and RCPT TO specifies the recipient for a mail message and can be used to validate addresses during the SMTP conversation. These three commands are the standard SMTP enumeration techniques for discovering valid user accounts on a Linux system running an SMTP service.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CEH practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CEH exam.