Script smtp-enum-users

Script types: portrule
Categories: auth, external, intrusive
Download: https://svn.nmap.org/nmap/scripts/smtp-enum-users.nse

Script Summary

Attempts to enumerate the users on a SMTP server by issuing the VRFY, EXPN or RCPT TO commands. The goal of this script is to discover all the user accounts in the remote system.

The script will output the list of user names that were found. The script will stop querying the SMTP server if authentication is enforced. If an error occurs while testing the target host, the error will be printed with the list of any combinations that were found prior to the error.

The user can specify which methods to use and in which order. The script will ignore repeated methods. If not specified the script will use the RCPT first, then VRFY and EXPN. An example of how to specify the methods to use and the order is the following:

smtp-enum-users.methods={EXPN,RCPT,VRFY}

Script Arguments

smtp.domain

or smtp-enum-users.domain Define the domain to be used in the SMTP commands

smtp-enum-users.methods

Define the methods and order to be used by the script (EXPN, VRFY, RCPT)

passdb, unpwdb.passlimit, unpwdb.timelimit, unpwdb.userlimit, userdb

See the documentation for the unpwdb library.

smbdomain, smbhash, smbnoguest, smbpassword, smbtype, smbusername

See the documentation for the smbauth library.

Example Usage

nmap --script smtp-enum-users.nse [--script-args smtp-enum-users.methods={EXPN,...},...] -p 25,465,587 <host>

Script Output

Host script results:
| smtp-enum-users:
|_  RCPT, root

Requires


Author:

  • Duarte Silva <duarte.silva@serializing.me>

License: Same as Nmap--See https://nmap.org/book/man-legal.html