Enumerating users in an SMTP server

E-mail accounts used as usernames are very common in web applications, and finding them is a necessary task when auditing mail servers. Enumerating users via SMTP commands can obtain excellent results, and thanks to the Nmap Scripting Engine we can automate this task.

This recipe shows how to enumerate users on an SMTP server by using Nmap.

How to do it...

To enumerate users of an SMTP server by using Nmap, enter the following command:

$ nmap -p25 –script smtp-enum-users <target>

Any usernames found will be included in the script output section:

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

How it works...

The script smtp-enum-users was written by Duarte Silva, and it attempts to enumerate users in ...

Get Nmap 6: Network Exploration and Security Auditing Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.