SMTP Enumeration (25, 587)#
Run nmap SMTP scripts#
nmap --script=smtp-* -p 25,587 $IPVerify user with VRFY#
echo "VRFY root" | nc -nv $IP 25Expand alias with EXPN#
echo "EXPN root" | nc -nv $IP 25Check EHLO capabilities#
printf 'EHLO test\r\nQUIT\r\n' | nc -nv $IP 25Enumerate users with smtp-user-enum#
smtp-user-enum -M VRFY -U /usr/share/wordlists/seclists/Usernames/top-usernames-shortlist.txt -t $IP
smtp-user-enum -M EXPN -U /usr/share/wordlists/seclists/Usernames/top-usernames-shortlist.txt -t $IP
smtp-user-enum -M RCPT -U /usr/share/wordlists/seclists/Usernames/top-usernames-shortlist.txt -t $IPTest STARTTLS on port 25#
openssl s_client -starttls smtp -connect $IP:25Test STARTTLS on port 587#
openssl s_client -starttls smtp -connect $IP:587Test SMTPS on port 465#
openssl s_client -connect $IP:465Brute force SMTP auth with hydra#
hydra -l admin -P /usr/share/wordlists/rockyou.txt -s 25 smtp://$IP