Ubuntu 14.04 LTS下安装Nikto Web Scanner

What is Nikto web scanner and it’s use ?

Nikto Web-scanner is a open source web-server scanner which can be used to scan the web-servers for malicious programs and files. Nikto can be used to scan the outdated versions of programs too. Nikto will provide us a quick and easy scan to find out the dangerous files and programs in server, At the end of scan result with a log file. Using nikto we can scan http, https, httpd traffics too.

To run the Nikto we don’t need any hard resource using software’s, If our server installed with Perl it’s fine to run the nikto. It’s available for every Operating systems such as Linux, Unix like RedHatCentosDebianUbuntu,SolarisBackTrackMacOSX. Supports SSL, http proxy, Scan multiple ports on a server, Check for outdated server components etc.. We can get the output of result in following formats TXTCSVHTMLXML.

Newly released version of Nikto Web scanner:

Nikto released it’s version 2.1.5 in 2012 but it’s under updates for each and every new vulnerabilities till date.

vulnerabilities Database:

We can find each and every vulnerabilities database in following URL.

http://osvdb.org/

以上云云(自行google).

环境要求:

  • Hostname                   prodsrv.unixmen.com (prodsrv)

  • IP address                     192.168.230.151

  • Operating system            Ubuntu 14.04 LTS

执行如下命令检查主机名 IP地址 系统版本

hostname

ifconfig |grep inet

lsb_release -a

安装开始:

登录官网https://cirt.net/Nikto2,官方列出了两种格式的安装包.

https://cirt.net/nikto/nikto-2.1.5.tar.bz2  https://cirt.net/nikto/nikto-2.1.5.tar.gz

  1. 下载安装包

wget https://cirt.net/nikto/nikto-2.1.5.tar.gz

  1. tar -zxvf  nikto-2.1.5.tar.gz

  1. 移动nikto-2.1.5下的所有文件到/usr/local/bin:

cd ~

sudo cp -apvf nikto-2.1.5/* /usr/local/bin/

ls -l /usr/local/bin/

* Nikto config file need to be in /etc/, But now it’s currently under /usr/local/bin/ While having a look into conf we can find that nikto will skip the scan for ports 21 & 111, And from were it want to download it’s update and much more.

sudo vim /usr/local/bin/nikto-2.1.5/nikto.conf

  1. 创建配置文件链接并配置权限

我们需要为conf文件在/etc/目录下创建一个链接(软连接).并赋予nikto.pl 755权限:

sudo ln -s /usr/local/bin/nikto.conf /etc/nikto.conf

ls -l /etc/nikto.conf

sudo chmod 755 /usr/local/bin/nikto.pl

ls -l /usr/local/bin/nikto.pl

  1. 更新nikto数据库(初始化)

再进行任何扫描前需要先更新nikto数据库文件.

sudo  /usr/local/bin/nikto.pl -update

执行如下命令可列出nikto下可供使用的插件:

nikto.pl -list-plugins  // To list the installed plugins //

  1. 开始扫描:

扫描某站点时,我们可以使用”-h”选项,然后执行扫描.

nikto.pl -h www.unixmen.com // To scan a website //

在扫面多端口时我们可以使用”-p”选项,然后执行扫描:

nikto.pl -h www.google.com -p 80,443

如果你需要看到整个扫描的过程,可以使用Display选项(-D)

nikto.pl -D v -h www.google.com

  • -D = Display

  •  v = Verbose

  • -h = hostname

在进行特定的扫描时需要调整的参数项:

在测试中我们可以针对测试需要调整对应的参数,使用x选项我们可以排除我们不需要的目标。以下参数可用于特定的扫描:

0 – File Upload

1 – Interesting File // we will get in logs

2 – Misconfiguration / Default File

3 – Information Disclosure

4 – Injection (XSS/Script/HTML)

5 – Remote File Retrieval – Inside Web Root

6 – Denial of Service // Scan for DDOS

7 – Remote File Retrieval – Server Wide

8 – Command Execution // Remote Shell

9 – SQL Injection // Scan for mysql vulnerabilities

a – Authentication Bypass

b – Software Identification

c – Remote Source Inclusion

x – Reverse Tuning Options

如果扫描存在SQL漏洞的站点,单项测试在很短的时间就可以搞定.但如不指定单项测试的话,将花费数小时之久.

对于多项测试执行扫描命令:

nikto.pl -Tuning 69 -h www.isanalytics.com

扫描,并将结果保存到指定文件,可以使用下面的命令来查找漏洞.

nikto.pl -Display V -o nikto_scan_result.html -Format html -h 192.168.0.166

扫描完成后我们会在当前目录得到以html格式保存的扫描结果文件,如下所示.

这样我们将得到一份格式化的html输出文件,使用的html文件来查找漏洞。

我们已经明了针对若干漏洞该如何保护我们的网站。要获取最新的漏洞信息,我们需要保证扫描之前更新nkito数据库。

 

参考:

 

对于使用Web站点测试的人员来说,nikto将是最为有力的工具之一.它将成为你进行Web测试的一个可喜选择,对提升你的站点安全起到应有的作用.

翻译: http://www.unixmen.com/install-nikto-web-scanner-check-vulnerabilities/


转载于:https://my.oschina.net/HeAlvin/blog/373970

Nikto是一款Web安全扫描工具,可以扫描指定主机的web类型,主机名,特定目录,cookie,特定CGI漏洞,XSS漏洞,SQL注入漏洞等,非常强大滴说。。。 root@91ri.org:~# cd /pentest/web/nikto/ root@91ri.org:/pentest/web/nikto# ls docs nikto.conf nikto.pl plugins templates root@91ri.org:/pentest/web/nikto# ./nikto.pl -h Option host requires an argument -config+ Use this config file -Cgidirs+ scan these CGI dirs: ‘none’, ‘all’, or values like “/cgi/ /cgi-a/” -dbcheck check database and other key files for syntax errors -Display+ Turn on/off display outputs -evasion+ ids evasion technique -Format+ save file (-o) format -host+ target host -Help Extended help information -id+ Host authentication to use, format is id:pass or id:pass:realm -list-plugins List all available plugins -mutate+ Guess additional file names -mutate-options+ Provide extra information for mutations -output+ Write output to this file -nocache Disables the URI cache -nossl Disables using SSL -no404 Disables 404 checks -port+ Port to use (default 80) -Plugins+ List of plugins to run (default: ALL) -root+ Prepend root value to all requests, format is /directory -ssl Force ssl mode on port -Single Single request mode -timeout+ Timeout (default 2 seconds) -Tuning+ Scan tuning -update Update databases and plugins from CIRT.net -vhost+ Virtual host (for Host header) -Version Print plugin and database versions + requires a value Note: This is the short help output. Use -H for full help. 升级插件 root@91ri.org:/pentest/web/nikto# ./nikto.pl -update -h 指定扫描的目标 –p 端口 root@91ri.org:/pentest/web/nikto# ./nikto.pl -h www.91ri.org -p 80 -C 指定CGI目录 –all表示猜解CGI目录 root@91ri.org:/pentest/web/nikto# ./nikto.pl -h www.91ri.org -C all -T选项包含很多小选项 –T 9表示扫描SQL注入漏洞 root@91ri.org:/pentest/web/nikto# ./nikto.pl -h www.91ri.org -T 9 -D指定输出显示 2显示cookies root@91ri.org:/pentest/web/nikto# ./nikto.pl -h www.91ri.org -D 2 -T选项包含的小选项解释: 0 检查文件上传页面 1 检查web日志 2 检查错误配置或默认文件 3检查信息泄露问题 4 检查XSS/Script/HTML问题 5 从根目录检查是否存在可访问的文件 6 检查拒绝服务问题 7 从任意文件检索是否存在可访问文件 8 检查是否存在系统命令执行漏洞 9 检查SQL注入漏洞 a 检查认证绕过问题 b 识别安装的软件版本 c 检查源代码泄露问题 x 反向链接选项
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值