Introduction

image.png

image.png

Nmap Scripting Engine (NSE)

Port Scanning & Enumeration With Nmap

Enumerate: get/ extract as much as possible from the target

image.png

nmap $target #From the result, target might be up but block ping 
nmap -Pn $target # No ping -scan all port

image.png

image.png

nmap -Pn -sV -O $target # service version and OS running on the target 
nmap -Pn -sV -O $target -oX windows_server_2012 # output in xml format -> for metasploit 

image.png

Importing Nmap Scan Results into MSF

service postgresql start 
msfconsole 

image.png

# IN msf5
workspace # check workspace 
workspace -a Win2k12 # add new workspace 
db_import <file_path> 
host # check that the data is imported successfully 
services # same thing as above

image.png

#msfconsole allows us to do nmap inside 
workspace -a Nmap_MSF # create new workspace 
db_nmap -Pn -sV -O $target