Metasploit, NMAP

Import nmap results into Metasploit

It is very helpful to scan your target with nmap and then import the results into Metasploit. All you have to do is scan your target using the -oX option to generate an XML file that will contain the results.

To do this, execute the following command

nmap -Pn -sS -A -oX scan.xml

Launch the msfconsole, if you haven’t already, and import the results,

import scan.xml

To verify that the import was succesfull, use the hosts command to list all targeted hosts.

You can also run nmap through msfconsole and have the results automatically stored into database. Run from msfconsole,

db_nmap -Pn -sS -A

To verify that the results from the scan are stored in the database, we run