Integrating nmap with Metasploit
Performing a vulnerability assessment with only is insufficient since vulnerabilities keep increasing in number, day after day. There are many vulnerabilities reported within a month, and therefore it is recommended that you make use of more than one vulnerability scanning tool. In the previous chapter, we saw how we can export the output of the scan to an XML file; here, we will learn how to integrate the nmap output with Metasploit for vulnerability assessment purposes.
Getting ready
We will have to first set up and update Metasploit in the Kali Linux machine.
One thing to note is that, for demonstration purposes, we have added more services to the Windows operating system to understand the activity better, since by default only a handful of ports are shown open. To prepare for the activity, we perform a scan on the Windows machine and save an XML output for the same.
How to do it...
- We will first save the XML file for the 2 server using the following command...