一、安装nmap
1、linux yum 安装 yum install nmap -y
2、源码安装方法:
下载压缩包,解压;
./configure
make&&make install
二、nmap scan参数总结
1、nmap -sC 使用默认NSE脚本分类进行扫描
2、nmap -sV 服务检测
3、nmap -o 操作系统检测
三、NSE脚本选项
1、nmap –script 脚本名称 +target ,例如: nmap –script http-title
2、指定端口扫描目标 nmap -p80 –script http-title +target
3、多个脚本扫描目标 nmap –script http-title ,http-methods + target
4、指定脚本分类扫描目标 nmap –script exploit +target
5、指定多个脚本分类扫描目标 namp –script discovery, exploit +target
6、执行自己开发nse脚本扫描目标 nmap –script= /path/script.nse
7、执行多个nse脚本扫描目标 nmap –script /path/script1.nse,/path/script2.nse + target
8、执行目录下所有脚本扫描目标 namp –script /path/script + target
四、高级脚本表达式选项
1、 非exploit 扫描 nmap -sV –script “not exploit” +target
2、多个脚本分类排除扫描目标 namp –script “not(dos or exploit)” -sV +target