SMTP 25

SMTP Banner Grabbing

Using Netcat

nc -nv <target_ip> 25

Commands to test SMTP functionality:

VRFY root
VRFY test

Using Telnet

telnet <target_ip> 25

Nmap Enumeration

Common Nmap SMTP Scripts

locate .nse | grep smtp

Run the following Nmap command:

nmap --script smtp-commands,smtp-enum-users,smtp-vuln-cve2010-4344,smtp-vuln-cve2011-1720,smtp-vuln-cve2011-1764 -p 25 <target_ip>
sudo nmap --script "smtp-*" -p 25 <target_ip>

Metasploit Enumeration

Enumerate Users


Exploitation

Postfix Shellshock Vulnerability

Using SearchSploit

Run the exploit:

Using the Automated Script from GitHub

Download the script:

Set permissions and execute:

Example:


Common Tests for Enumeration

Test for Open Relay

Manually test with Netcat or Telnet:

Test for VRFY Command

Use:

Test for EXPN Command


Useful Tools

Automated SMTP Enumeration Scripts

  • smtp-user-enum:

  • Metasploit for User Enumeration:

Last updated