4 ways to SMTP Enumeration

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

Telnet

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

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

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

But if you received 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 given image you can read the valid username found in targeted server as well as it also grab 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 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 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 given image you can see it has shown [email protected] is valid email ID for user raj.

iSMTP

iSMTP is the kali Linux toolw which is use 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 given image you can see blue color text refer to valid email account and red color text refer to invalid account.

Author: Sanjeet Kumar is a 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 *