介绍
nmap是一个网络连接端扫描软件,用来扫描网上电脑开放的网络连接端。确定哪些服务运行在哪些连接端,并且推断计算机运行哪个操作系统。它是网络管理员必用的软件之一,以及用以评估网络系统安全。
—— 来自百度百科
那么今天带大家来揭露Nmap的另一个面纱 ,那就是脚本。
在某些时候,我们大部分都使用Nmap进行扫描,然后再通过Metasploit进行漏洞利用,但是这个过程比较繁琐,一个个漏洞去验证的话还需要打开MSF去设置参数,最后run/exploit(不包括自动化,所以不要喷了)。
那么我们就要有必要认识一下Nmap的扩展脚本啦~
脚本参数
这个小例子中我会演示几个基本的脚本使用方式,但是更多的还是需要大家掌握使用脚本的技巧,然后自行发掘了。笔者在此不概述太多。
SCRIPT SCAN:
-sC: equivalent to --script=default
--script=<Lua scripts>: <Lua scripts> is a comma separated list of
directories, script-files or script-categories
--script-args=<n1=v1,[n2=v2,...]>: provide arguments to scripts
--script-args-file=filename: provide NSE script args in a file
--script-trace: Show all data sent and received
--script-updatedb: Update the script database.
--script-help=<Lua scripts>: Show help about scripts.
<Lua scripts> is a comma-separated list of script-files or
script-categories.
上面这部分是Nmap关于脚本的参数,下面一个一个来介绍:
-sC 是指的是采用默认配置扫描,与--script=default参数等价
--script=脚本名称,脚本一般都在Nmap的安装目录下的scripts目录中
那么Linux下可以查看脚本数量:
ls /u