4 ways to SMTP Enumeration

We can also find out version and valid user of SMTP server using telnet. Execute the following command and find out its version and valid user.

Telnet

From the given image you can observe that it has successfully shown “220 mail.ignite.lab ESMTP Postfix” has been installed on the target machine.

You can guess for valid user account through the following command and if you receive response code 550 it means unknown user account:

If you received a message code 250,251,252 which means the server has accepted the request and user account is valid.

But if you received a message code 550 it means invalid user account as shown in given image

Metasploit

The SMTP service has two internal commands that allow the enumeration of users: VRFY (confirming the names of valid users) and EXPN (which reveals the actual address of user’s aliases and lists of e-mail (mailing lists)). Through the implementation of these SMTP commands can reveal a list of valid users.

From the given image you can read the valid username found in the targeted server as well as it also grabs the SMTP banner.

smtp-user-enum

smtp-user-enum is a tool for enumerating OS-level user accounts on Solaris via the SMTP service (sendmail). Enumeration is performed by inspecting the responses to VRFY, EXPN, and RCPT TO commands. It could be adapted to work against other vulnerable SMTP daemons, but this hasn’t been done as of v1.0.

 Type following command to enumerate username using a dictionary of usernames:

 -M: mode Method to use for username guessing EXPN, VRFY or RCPT 

 -U: file File of usernames to check via SMTP service
 -t: host Server host running SMTP service

From the given image you can see out of total 7 queries only 5 names are valid and exist in SMTP server.

Type following command to verify user email address on mail server:

-D:  dom   Domain to append to supplied user list to make email addresses; Use this option when you want to guess valid email addresses instead of just usernames.

From the given image you can see it has shown [email protected] is valid email ID for user raj.

iSMTP

iSMTP is the Kali Linux tool which is used for testing SMTP user enumeration (RCPT TO and VRFY), internal spoofing, and relay.

Type following command to enumerate valid email ID of targeted server:

-h <host>       The target IP and port (IP:port)

 -e <file>   Enable SMTP user enumeration testing and imports email list.

From the given image you can see blue color text refer to a valid email account and the red color text refers to an invalid account.

Author: Sanjeet Kumar is an Information Security Analyst | Pentester | Researcher  Contact Here

1 Comment 4 ways to SMTP Enumeration

  1. hrishi

    Hi there,
    Command : “smtp-user-enum -M VRFY -p 25 -U /root/n.txt -t 10.11.1.22”
    When i tried the below command, it shows zero results.

    But when i tired using nectar or telnet, i am able to VRFY user.

    Can you help or figure out why i am unable to get results using smtp-user-enum.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *