# Start the DB and Metasploit
sudo su
service postgresql start
msfconsole
db_status # If you receive the message "postgresql selected, no connection
exit
msfdb init
service postgresql restart
msfconsole
db_status # You should now see that the DB connection was succesful
# Scan the Network
nmap -Pn -sS -A -oX Test Target
# Import the hosts to the Database
db_import Test
hosts
services # To show the services running on the hosts
# Scan using metasploit syn scan
search portscan
use auxiliary/scanner/portscan/syn
set INTERFACE eth0
set PORTS 80
set RHOSTS targets
set THREADS 50
run
# Scan using metasploit tcp scan
auxilary/scanner/portscan/tcp
hosts -R
set RHOSTS target
run
# Scan using metasploit smb version scan
use auxilary/scanner/smb/smb_version
set RHOSTS targets
set THREDS 11
run