Metasploit has auxiliary modules that can be used to perform UDP, SYN, and TCP connect scanning. Using Metasploit for scanning as well as exploitation can be an effective way to cut down on the total number of tools required to complete a penetration test. This specific recipe demonstrates how we can use Metasploit to perform port scanning.