51
用Nikto探测一个网站所用到的技术

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,所以下载解压就能直接使用了。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
wget https://cirt.net/nikto/nikto-2.1.5.tar.gz
tar -zxvf nikto-2.1.5.tar.gz
cd nikto-2.1.5
 
perl ./nikto.pl -h www.baidu.com
 
[root@nowamagic nikto-2.1.5]# perl ./nikto.pl -h www.baidu.com
- ***** SSL support not available (see docs for SSL install) *****
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          115.239.210.27
+ Target Hostname:    www.baidu.com
+ Target Port:        80
+ Start Time:         2015-02-20 18:25:34 (GMT8)
---------------------------------------------------------------------------
+ Server: BWS/1.1
+ Cookie BAIDUID created without the httponly flag
+ Cookie BAIDUPSID created without the httponly flag
+ Cookie BDSVRTM created without the httponly flag
+ The anti-clickjacking X-Frame-Options header is not present.
+ Uncommon header 'bduserid' found, with contents: 0
+ Uncommon header 'bdqid' found, with contents: 0xfc103f47000ce711
+ Uncommon header 'bdpagetype' found, with contents: 1
+ Server banner has changed from 'BWS/1.1' to 'Apache' which may suggest a WAF,load balancer or proxy is in place
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ Server leaks inodes via ETags, header found with file /robots.txt, fields: 0x91e 0x50b02db060c00
+ File/dir '/shifen/' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ File/dir '/' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ "robots.txt" contains 103 entries which should be manually viewed.
+ Multiple index files found: index.php, index.htm, index.html
+ OSVDB-5737: WebLogic may reveal its internal IP or hostname in the Location header. The value is "http://www.baidu.com/search/error.html".
+ OSVDB-3092: /home/: This might be interesting...
+ OSVDB-3092: /tw/: This might be interesting... potential country code (Taiwan)
+ 6544 items checked: 28 error(s) and 15 item(s) reported on remote host
+ End Time:           2015-02-20 18:26:12 (GMT8) (38 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

在某些版本的Linux,可能会出现 -bash: ./nikto.pl: Permission denied 错误提示,可以用下面的命令试着用:

1
2
3
nikto -h www.baidu.com
./nikto.pl -h www.baidu.com
perl ./nikto.pl -h www.baidu.com

下面是 Nikto 的一些参数设置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
-c(config):使用指定的config文件来替代安装在本地的config.txt文件。
-C(Cgidirs):扫描包含指定内容的CGI目录。所包含的内容在-C后面指定。如-C  /cgi/。
-D(Display):打开或关闭默认输出。输出选项:
       1     显示重定向
       2     显示获取的cookies信息
       3     显示所有200/OK的回应
       4     显示请求认证的URLs
       D     Debug输出
       V     冗余输出
-dbcheck:检查数据库和其它重要文件的句法错误。
-e(evasion):使用LibWhisker中对IDS的躲避技术,可使用以下几种类型:
       1     随机URL编码 (非UTF-8方式)
       2     自选择路径(/./)
       3     过早结束的URL
       4     优先考虑长随机字符串
       5     参数欺骗
       6     使用TAB作为命令的分隔符
       7     使用变化的URL
       8     使用Windows路径分隔符“\”
-f(findonly):只寻找HTTP或HTTPS端口,不进行完全扫描。
-F(Format):指定检测报告输出文件的格式,默认是txt文件格式(可以是htm、csv、txt或xml格式)
-h(host):指定目标主机,可以是IP或域名。
-H(Help):显示帮助信息。
-i(id):用于主机鉴定,其格式为:userid:password
-m(mutate):猜解更多的文件名:
       1     检测根目录下的所有文件
       2     猜测密码文件名
       3     通过Apache(/~user 请求类型)枚举用户名
       4     通过cgiwrap(/cgi-bin/cgiwrap/~user 请求类型)枚举用户名
-n(nolookup):不执行主机名查找。
-o(output):输出到指定文件
-p(port):指定使用的端口,默认为80。
-P(Pause):各项操作之间的延时时间。
-r(root):对所有请求优先考虑root的值,格式为:/目录名
-s(ssl):强制在端口上使用ssl模式
-S(Single):实行对单个目标的请求模式。
-t(timeout):超时时间,默认为2秒。
-T(Tuning):控制Nikto使用不同的方式对目标进行扫描
       0     检查文件上传页面
       1     检查Web日志
       2     检查错误配置或默认文件
       3     检查信息泄漏问题
       4     检查XSS/Script/HTML问题
       5     远程文件检索,从根目录检查是否存在可访问的文件
       6     检查拒绝服务问题
       7     远程文件检索,从任意文件检索是否存在可访问文件
       8     代码执行-远程shell,检查是否存在系统命令执行漏洞
       9     检查SQL注入漏洞
       a     检查认证绕过问题
       b     识别安装的软件版本
       c     检查源代码泄露问题
       x     反向链接选项
-u(useproxy):使用在config.txt中定义的代理。
-update:从cirt.net上升级数据库和插件。
-V(Version):显示插件和数据库的版本信息。
-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


这条帮助是否解决了您的问题? 已解决 未解决

提交成功!非常感谢您的反馈,我们会继续努力做到更好! 很抱歉未能解决您的疑问。我们已收到您的反馈意见,同时会及时作出反馈处理!