Nikto是一款开源的(GPL)网页服务器扫描器,它可以对网页服务器进行全面的多种扫描,包含超过3300种有潜在危险的文件/CGIs;超过625种服务器版本;超过230种特定服务器问题,包括多种有潜在危险的文件、CGI及其他问题,它可以扫描指定主机的WEB类型、主机名、特定目录、COOKIE、特定CGI漏洞、返回主机允许的http模式等等。这是一款非常棒的工具,Nikto是网管安全人员必备的WEB审计工具之一。
当然,还可以用来探测目标网站究竟使用了什么技术。
Nikto最新版本为2.1.5版,官方下载网站:http://www.cirt.net/nikto2
Nikto是基于PERL开发的程序,所以需要PERL环境。Nikto支持Windows(使用ActivePerl环境)、MacOSX、多种Linux 或Unix系统。在Windows平台下使用,需要使用ActivePerl环境,ActivePerl可以其官方网站上下载,下载地址:http://www.activestate.com/activeperl
我这里用的是Linux,自带了perl,所以下载解压就能直接使用了。
02 |
tar -zxvf nikto-2.1.5.tar.gz |
05 |
perl ./nikto.pl -h www.baidu.com |
07 |
[root@nowamagic nikto-2.1.5]# perl ./nikto.pl -h www.baidu.com |
08 |
- ***** SSL support not available (see docs for SSL install) ***** |
10 |
--------------------------------------------------------------------------- |
11 |
+ Target IP: 115.239.210.27 |
12 |
+ Target Hostname: www.baidu.com |
14 |
+ Start Time: 2015-02-20 18:25:34 (GMT8) |
15 |
--------------------------------------------------------------------------- |
17 |
+ Cookie BAIDUID created without the httponly flag |
18 |
+ Cookie BAIDUPSID created without the httponly flag |
19 |
+ Cookie BDSVRTM created without the httponly flag |
20 |
+ The anti-clickjacking X-Frame-Options header is not present. |
21 |
+ Uncommon header 'bduserid' found, with contents: 0 |
22 |
+ Uncommon header 'bdqid' found, with contents: 0xfc103f47000ce711 |
23 |
+ Uncommon header 'bdpagetype' found, with contents: 1 |
24 |
+ Server banner has changed from 'BWS/1.1' to 'Apache' which may suggest a WAF,load balancer or proxy is in place |
25 |
+ No CGI Directories found (use '-C all' to force check all possible dirs) |
26 |
+ Server leaks inodes via ETags, header found with file /robots.txt, fields: 0x91e 0x50b02db060c00 |
27 |
+ File/dir '/shifen/' in robots.txt returned a non-forbidden or redirect HTTP code (200) |
28 |
+ File/dir '/' in robots.txt returned a non-forbidden or redirect HTTP code (200) |
29 |
+ "robots.txt" contains 103 entries which should be manually viewed. |
30 |
+ Multiple index files found: index.php, index.htm, index.html |
32 |
+ OSVDB-3092: /home/: This might be interesting... |
33 |
+ OSVDB-3092: /tw/: This might be interesting... potential country code (Taiwan) |
34 |
+ 6544 items checked: 28 error(s) and 15 item(s) reported on remote host |
35 |
+ End Time: 2015-02-20 18:26:12 (GMT8) (38 seconds) |
36 |
--------------------------------------------------------------------------- |
在某些版本的Linux,可能会出现 -bash: ./nikto.pl: Permission denied 错误提示,可以用下面的命令试着用:
2 |
./nikto.pl -h www.baidu.com |
3 |
perl ./nikto.pl -h www.baidu.com |
下面是 Nikto 的一些参数设置:
01 |
-c(config):使用指定的config文件来替代安装在本地的config.txt文件。 |
02 |
-C(Cgidirs):扫描包含指定内容的CGI目录。所包含的内容在-C后面指定。如-C /cgi/。 |
03 |
-D(Display):打开或关闭默认输出。输出选项: |
10 |
-dbcheck:检查数据库和其它重要文件的句法错误。 |
11 |
-e(evasion):使用LibWhisker中对IDS的躲避技术,可使用以下几种类型: |
20 |
-f(findonly):只寻找HTTP或HTTPS端口,不进行完全扫描。 |
21 |
-F(Format):指定检测报告输出文件的格式,默认是txt文件格式(可以是htm、csv、txt或xml格式) |
22 |
-h(host):指定目标主机,可以是IP或域名。 |
24 |
-i(id):用于主机鉴定,其格式为:userid:password |
28 |
3 通过Apache(/~user 请求类型)枚举用户名 |
29 |
4 通过cgiwrap(/cgi-bin/cgiwrap/~user 请求类型)枚举用户名 |
30 |
-n(nolookup):不执行主机名查找。 |
32 |
-p(port):指定使用的端口,默认为80。 |
33 |
-P(Pause):各项操作之间的延时时间。 |
34 |
-r(root):对所有请求优先考虑root的值,格式为:/目录名 |
36 |
-S(Single):实行对单个目标的请求模式。 |
37 |
-t(timeout):超时时间,默认为2秒。 |
38 |
-T(Tuning):控制Nikto使用不同的方式对目标进行扫描 |
44 |
5 远程文件检索,从根目录检查是否存在可访问的文件 |
46 |
7 远程文件检索,从任意文件检索是否存在可访问文件 |
47 |
8 代码执行-远程shell,检查是否存在系统命令执行漏洞 |
53 |
-u(useproxy):使用在config.txt中定义的代理。 |
54 |
-update:从cirt.net上升级数据库和插件。 |
55 |
-V(Version):显示插件和数据库的版本信息。 |
56 |
-v(vhost):虚拟主机(针对主机头)。 |
一些使用:
- nikto.pl -h 10.100.100.10 #扫描主机10.100.100.10的80口上的WEB
- nikto.pl -h 10.100.100.10 -p 443 -s -g #扫描主机10.100.100.10端口443强制使用SSL模式 ???-g
- nikto.pl -h 10.100.100.10 -p 80-90 扫描主机10.100.100.10 端口80-90 ,Nikto自动判定是HTTP还是HTTPS
- nikto.pl -h 10.100.100.10 -p 80,443,8000,8080 扫描主机 10.100.100.10 端口 80 443 8000 8080
- nikto.pl -h 10.100.100.10 -p 80 -e 167 -e 167使用IDS规避技术1 6 7