Metasploit has a auxiliary module dedicated to anonymous FTP scanning. I was interest to compare this Metasploit module with Nmap ftp-anon NSE script.
I decided to scan a /19 rang, how represent 8192 IP addresses with the 2 tools, compare the results and the time to do these scans.
Metasploit
time ./msfcli auxiliary/scanner/ftp/anonymous ConnectTimeout=1 FTPTimeout=1 RHOSTS=xxx.xxx.xxx.0/19 E
[*] aaa.aaa.aaa.aaa:21 Anonymous READ (220 aaa.aaa.aaa.aaa FTP server ready)[*] Scanned 4075 of 8192 hosts (050% complete)[*] Auxiliary module execution completed
[*] bbb.bbb.bbb.bbb:21 Anonymous READ/WRITE (220 Welcome to my FTP Server)[*] Scanned 5045 of 8192 hosts (060% complete)[*] Auxiliary module execution completed
Nmap
time sudo nmap -p21 -n -sC -sV –script=banner –script=ftp-anon xxx.xxx.xxx.0/19
Nmap scan report for aaa.aaa.aaa.aaaHost is up (0.026s latency).PORT STATE SERVICE VERSION21/tcp open ftp ProFTPD|_banner: 220 aaa.aaa.aaa.aaa FTP server ready|_ftp-anon: Anonymous FTP login allowedService Info: Host: aaa.aaa.aaa.aaa; OS: Unix
Nmap scan report for bbb.bbb.bbb.bbbHost is up (0.027s latency).PORT STATE SERVICE VERSION21/tcp open ftp|_banner: 220 Welcome to my FTP Server|_ftp-anon: Anonymous FTP login allowed1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at http://www.insecure.org/cgi-bin/servicefp-submit.cgi :SF-Port21-TCP:V=5.21%I=7%D=5/16%Time=4BF05218%P=i386-apple-darwin9.8.0%r(NSF:ULL,1E,”220\x20Welcome\x20to\x20my\x20FTP\x20Server\r\n”)%r(GenericLineSF:s,33,”220\x20Welcome\x20to\x20my\x20FTP\x20Server\r\n500\x20Unknown\x20SF:Command\r\n”)%r(Help,33,”220\x20Welcome\x20to\x20my\x20FTP\x20Server\r\SF:n500\x20Unknown\x20Command\r\n”)%r(SMBProgNeg,33,”220\x20Welcome\x20to\SF:x20my\x20FTP\x20Server\r\n500\x20Unknown\x20Command\r\n”);Service Info: Host: my
time sudo nmap -p21 -PS -n –script=ftp-anon xxx.xxx.xxx.0/19
time sudo nmap -p21 -PS -n -T4 –script=ftp-anon xxx.xxx.xxx.0/19