使用Nikto扫描网站漏洞

article/2025/10/15 4:32:53

Nikto简介

Nikto是一个简单的开源Web服务器扫描程序,可以检查网站并报告它发现的可能用于利用或破解网站的漏洞。此外,它是业界使用最广泛的网站漏洞工具之一,并且在许多圈子中被认为是行业标准。

虽然这个工具非常有效,但它根本不是隐秘的。任何具有入侵检测系统或其他安全措施的站点都将检测到它正在被扫描。最初设计只是用于安全测试,并不在意隐形问题。

【Nikto-百度百科】


Nikto使用教程

一、安装Nikto

在Kali Linux上,会预装Nikto,因此无需下载或安装任何东西,它在分类“Vulnerability Analysi”中。如果由于某种原因没有安装Nikto,可以从GitHub获取Nikto 或使用apt install命令安装。

apt install nikto

如果在Mac上执行此操作,则可以使用Homebrew安装Nikto。

brew install nikto

 


二、Nikto使用

在使用Nikto深入扫描Web服务器之前,先使用-Help选项查看Nikto所有操作命令和功能。

nikto -Help

 


三、基本使用语法

从上一步可以看出,Nikto有很多功能选项,基本语法如下。我们将<IP or hostname>替换为实际IP地址或主机名sans尖括号。

nikto -h <IP or hostname>

Nikto能够进行扫描SSL和端口443(HTTPS网站使用的端口)(HTTP默认使用端口80)。因此,我们可以扫描使用了SSL的网站。

如果知道它是SSL网站,可以在Nikto中指定它,通过在命令末尾添加-ssl来节省扫描时间。

nikto -h <IP or hostname> -ssl

 


四、扫描使用SSL的网站

以pbs.org为例:

nikto -h pbs.org -ssl
- Nikto v2.1.6
------------------------------------------------------------------------------
- STATUS: Starting up!
+ Target IP:			54.225.198.196
+ Target Hostname:		pbs.org
+ Traget Port:			443
------------------------------------------------------------------------------
+ SSl Info:			Subject:	/CN=www.pbs.orgAltnames:	account.pbs.org, admin.pgs.org, dipsy-tc.pbs.org, docs.pbs.org, ga.video.cdn.pbs.org, git.pbs.org, heart.ops.pbs.org, hub-dev.pbs.org, image.pbs.org,jaws..pbs.org, kids.pbs.org, koth-qa.svp.pbs.org, login.pbs.org, ops.pbs.org, pbs.org, player.pbs.org, projects.pbs.org, sentry.pbs.org, teacherline.pbs.org,urs.pbs.org, video.pbs.org, weta-qa.svp.pbs.org, whut-qa.svp.pbs.org, wnet.video-qa.pbs.org, wnet.video-staging.pbs.org, www-cache.pbs.org, www.pbs.orgCiphers:	ECDHE-RSA-AES128-GCM-SHA256Issuer:		/C-US/0=Let's Encrypt/CN=Let's Encrypt Authority X3
+ Start Time:			2018-12-05 23:34:06 (GMT-8)
------------------------------------------------------------------------------
+ Server: nginx
+ The anti-clickjacking X-Frame-Options header is not present.
+ The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS
+ Uncommon header 'x-pbs-fwsrvname' found, with contents: fwcacheproxy1
+ The site uses SSL and the Strict-Transport-Security HTTP header is not defined.
+ The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type
+ Root page / redirects to: https://www.pbs.org/
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ RC-1918 IP address found in the 'x-pbs-appsvrip' header: The IP is "10.137.181.52".
+ Uncommon header 'x-cache-fs-status' found, with contents: EXPIRED
+ Uncommon header 'x-pbs-appsvrname' found, with contents: fwcacheproxy1
+ Uncommon header 'x-pbs-appsvrip' found, with contents: 10.137.181.52
+ Server leaks inodes via ETags, header found with file /pbs.org.zip, fields: 0x5b96537e 0x1678
+ 7446 requests: 0 error(s) and 10 item(s) reported on remote host
+ End Time:				2018-12-06 00:30:29 (GMT-8) (3383 seconds)
------------------------------------------------------------------------------
+ 1 host(s) tested

可以看到有关于密码的一些有用信息以及服务器是Nginx等

 


五、扫描IP地址

ipcalc 192.168.0.48
Address:   192.168.0.48         11000000.10101000.00000000. 00110000
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   192.168.0.0/24       11000000.10101000.00000000. 00000000
HostMin:   192.168.0.1          11000000.10101000.00000000. 00000001
HostMax:   192.168.0.254        11000000.10101000.00000000. 11111110
Broadcast: 192.168.0.255        11000000.10101000.00000000. 11111111
Hosts/Net: 254                   Class C, Private Internet

 


六、扫描HTTP网站

nikto -h www.afl.com.au
- Nikto v2.1.6
---------------------------------------------------------------------------
+ Target IP:          159.180.84.10
+ Target Hostname:    www.afl.com.au
+ Target Port:        80
+ Start Time:         2018-12-05 21:48:32 (GMT-8)
---------------------------------------------------------------------------
+ Server: instart/nginx
+ Retried via header: 1.1 varnish (Varnish/6.1), 1.1 e9ba0a9a729ff2960a04323bf1833df8.cloudfront.net (CloudFront)
+ The anti-clickjacking X-Frame-Options header is not present.
+ The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS
+ Uncommon header 'x-cache' found, with contents: Miss from cloudfront
+ Uncommon header 'x-instart-cache-id' found, with contents: 17:12768802731504004780::1544075250
+ Uncommon header 'v-cache-hit' found, with contents: Hit
+ Uncommon header 'x-amz-cf-id' found, with contents: Dr-r6OwO5kk9ABt4ejzpc7R7AIF6SuH6kfJHQgP0v6xZoHwMLE55rQ==
+ Uncommon header 'x-instart-request-id' found, with contents: 12814413144077601501:BEQ01-CPVNPPRY18:1552504721:0
+ Uncommon header 'x-oneagent-js-injection' found, with contents: true
+ Uncommon header 'grace' found, with contents: cache
+ The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type
+ Uncommon header 'x-ruxit-js-agent' found, with contents: true
+ Cookie dtCookie created without the httponly flag
+ Server banner has changed from 'instart/nginx' to 'nginx' 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)
+ Entry '/sites/' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/search/' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '*.mobileapp' in robots.txt returned a non-forbidden or redirect HTTP code (400)
+ Entry '*.liveradio' in robots.txt returned a non-forbidden or redirect HTTP code (400)
+ Entry '*.smartmobile' in robots.txt returned a non-forbidden or redirect HTTP code (400)
+ Entry '*.responsive' in robots.txt returned a non-forbidden or redirect HTTP code (400)
+ Entry '/stats?*/' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ "robots.txt" contains 8 entries which should be manually viewed.
+ OSVDB-3092: /sitemap.xml: This gives a nice listing of the site content.
+ OSVDB-3092: /psql_history: This might be interesting...
+ OSVDB-3092: /global/: This might be interesting...
+ OSVDB-3092: /home/: This might be interesting...
+ OSVDB-3092: /news: This might be interesting...
+ OSVDB-3092: /search.vts: This might be interesting...
+ OSVDB-3092: /stats.htm: This might be interesting...
+ OSVDB-3092: /stats.txt: This might be interesting...
+ OSVDB-3092: /stats/: This might be interesting...
+ OSVDB-3092: /Stats/: This might be interesting...
+ OSVDB-3093: /.wwwacl: Contains authorization information
+ OSVDB-3093: /.www_acl: Contains authorization information
+ OSVDB-3093: /.htpasswd: Contains authorization information
+ OSVDB-3093: /.access: Contains authorization information
+ OSVDB-3093: /.addressbook: PINE addressbook, may store sensitive e-mail address contact information and notes
+ OSVDB-3093: /.bashrc: User home dir was found with a shell rc file. This may reveal file and path information.
+ OSVDB-3093: /.bash_history: A user's home directory may be set to the web root, the shell history was retrieved. This should not be accessible via the web.
+ OSVDB-3093: /.forward: User home dir was found with a mail forward file. May reveal where the user's mail is being forwarded to.
+ OSVDB-3093: /.history: A user's home directory may be set to the web root, the shell history was retrieved. This should not be accessible via the web.
+ OSVDB-3093: /.htaccess: Contains configuration and/or authorization information
+ OSVDB-3093: /.lynx_cookies: User home dir found with LYNX cookie file. May reveal cookies received from arbitrary web sites.
+ OSVDB-3093: /.mysql_history: Database SQL?
+ OSVDB-3093: /.passwd: Contains authorization information
+ OSVDB-3093: /.pinerc: User home dir found with a PINE rc file. May reveal system information, directories and more.
+ OSVDB-3093: /.plan: User home dir with a .plan, a now mostly outdated file for delivering information via the finger protocol
+ OSVDB-3093: /.proclog: User home dir with a Procmail rc file. May reveal mail traffic, directories and more.
+ OSVDB-3093: /.procmailrc: User home dir with a Procmail rc file. May reveal subdirectories, mail contacts and more.
+ OSVDB-3093: /.profile: User home dir with a shell profile was found. May reveal directory information and system configuration.
+ OSVDB-3093: /.rhosts: A user's home directory may be set to the web root, a .rhosts file was retrieved. This should not be accessible via the web.
+ OSVDB-3093: /.sh_history: A user's home directory may be set to the web root, the shell history was retrieved. This should not be accessible via the web.
+ OSVDB-3093: /.ssh: A user's home directory may be set to the web root, an ssh file was retrieved. This should not be accessible via the web.
+ OSVDB-5709: /.nsconfig: Contains authorization information
+ /portal/changelog: Vignette richtext HTML editor changelog found.
+ 7587 requests: 4 error(s) and 55 item(s) reported on remote host
+ End Time:           2018-12-05 22:42:41 (GMT-8) (3249 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

 


七、与Metasploit配对扫描

Nikto可以将信息导出为Metasploit在执行扫描时可以读取的格式。只需使用上面的命令来执行扫描,但将-Format msf +附加到它的末尾。该格式可以帮助我们使用漏洞库快速配检索数据。

nikto -h <IP or hostname> -Format msf+

 

===========全文结束===========

 

 

 


http://chatgpt.dhexx.cn/article/1hhyTNtj.shtml

相关文章

Kali工具库之Nikto

工具简介 Nikto是一个开源的WEB扫描评估软件&#xff0c;可以对Web服务器进行多项安全测试&#xff0c;能在230多种服务器上扫描出 2600多种有潜在危险的文件、CGI及其他问题。Nikto可以扫描指定主机的WEB类型、主机名、指定目录、特定CGI漏洞、返回主机允许的 http模式等。 链…

Nikto 网页服务器扫描器

一、Nikto介绍 Nikto是一款开源的&#xff08;GPL&#xff09;网页服务器扫描器&#xff0c;它可以对网页服务器进行全面的多种扫描&#xff0c;包含超过3300种有潜在危险的文件CGIs&#xff1b;超过625种服务器版本&#xff1b;超过230种特定服务器问题。扫描项和插件可以自动…

nmap和nikto扫描

先通过本机的VMware启动Kali攻击机和Metasploitable2靶机 端口扫描 使用 ip addr 或者 ifconfig 先看一下靶机的ip地址 在Kali里面使用 nmap IP 先用默认的方式对靶机进行扫描 事实上nmap的默认扫描方式就是 -sS 也就是SYN扫描&#xff0c;这种扫描方式基于TCP三次握手的前两…

4 | Nikto使用

目录 1 Nikto简介2 部署2.1 下载地址 3 操作参数4 具体使用4.1 扫描单个地址4.2 详细输出4.3 扫描多个地址4.4 使用代理进行扫描4.5 使用LibWhisker绕过IDS的检测&#xff08;10个参数 1-8、A、B&#xff09; 1 Nikto简介 发现Web服务器配置错误、插件和Web漏洞&#xff0c;支…

Nikto 扫描

0x00:简介 nikto 是一款用来发现 web 应用程序漏洞的一个工具,扫描的内容大概包括服务器软件的版本,比较版本是否为最新,现版本和最新版的差以及这个版本可能存在的漏洞。会搜索一些存在隐患的文件,例如测试文件,或者是网站备份文件等。也会去扫描服务器的配置漏洞,有没…

Nikto:从零开始到专业版的完整教程

文章目录 [TOC](文章目录) 介绍一、什么是Nikto&#xff1f;二、Nikto工具中的功能Nikto工具中的命令有如何使用Nikto工具&#xff1f;1.安装Nikto2.标准扫描3.对目标SSl或TLS扫描4.扫描特定/多个端口5.忽略某些HTTP代码在这里插入图片描述 结论&#xff1a; 介绍 在这篇文章中…

网络安全——Nikto的使用

一、什么是Nikto Perl&#xff1a;Perl语言是一种解释型的脚本语言。Perl语言由Larry wall于1986年开发成功。当初的目的主要是在Unix环境下&#xff0c;用于处理面向系统任务而设计的脚本编程语言。Perl对文件和字符有很强的处理、变换能力&#xff0c;它特别适用于有关系统管…

Web漏洞扫描神器Nikto使用指南

文章目录 工具简介工具下载链接nikto安装nikto基础语句指定端口进行扫描指定目录进行扫描多目标扫描其他功能扫描结果输出Nikto扫描交互参数IDS 躲避使用代理扫描 后言 工具简介 Nikto是一款开源的&#xff08;GPL&#xff09;网页服务器扫描器&#xff0c;它可以对网页服务器…

pageoffice

激活失败&#xff0c;重新激活 输入序列号没有激活&#xff0c;提示当前PageOffice需要获取更高版本的授权才能正常运行 想要重新激活&#xff0c;要删除项目中WEB-INF下的lib中的license.lic文件&#xff0c;才能重新输入序列号 删除以后&#xff0c;出现激活窗口 注意&am…

clientX、pageX、offsetX、screenX、offsetWidth、clientWidth等

文章目录 1、clientX 、clientY2、pageX、pageY注意&#xff1a; clientX和pageX的区别3、offsetX、offsetY4、screenX、screenY5、offsetWidth、offsetHeight 、offsetLeft、offsetTop6、clientWidth、clientHeight、clientLeft、clientTop总结 1、clientX 、clientY documen…

图解鼠标事件的 ScreenX ,LayerX,clientX,PageX,offsetX,X

前言&#xff1a; 完在上一篇文章 &#x1f381;如何实现原生 JS 的拖拽效果我中使用到了 MouseEvent 事件对象身上的 clienX 的属性&#xff0c;但同时我也注意到了事件对象身上关于 X 的相关属性还有很多&#xff0c;并且在移动端开发中&#xff0c;这些属性需要频繁的用到&a…

pageX,clientX,offsetLeft,scrollLeft的区别

pageX,clientX,offsetLeft,scrollLeft的区别 1、pageX / pageY pageX / pageY的值为鼠标相对于document的距离&#xff0c;即网页左上角的位置 2、clientX / clientY clientX / clientY的值为鼠标相对于浏览器可视区域左上角的距离 3、offsetLeft / offsetTop offsetLeft …

详细区分offsetX,clientX,pageX,screenX,layerX和X的区别

详细区分DOM事件中鼠标指针的坐标问题 前面博客中我们讲解到了DOM事件的event对象&#xff0c;里边包含了鼠标事件的指针坐标属性。比如event.offsetX,event.clientX,event.pageX,event.screenX等等。现在我们来解析一下这些坐标属性的区别。 HTML代码&#xff1a; <div c…

screenX、client X、pageX、offsetX、layerX

screenX, client X screenX: 鼠标在屏幕中的水平坐标 client X: 鼠标在客户端区域&#xff08;浏览器可视区域&#xff09;的水平坐标&#xff0c;不论页面是否有水平滚动 pageX 相对于整个文档的x&#xff08;水平&#xff09;坐标 个人认为&#xff1a;pageX clientX sc…

Page和PageInfo

Page和PageInfo 两者都能获取到数据&#xff0c;Page是一个ArrayList。 PageInfo是一个对象&#xff0c;能获取到的数据比Page多 如何使用 Page对象 参数解析 private int pageNum; //当前页码 private int pageSize; //每页数据的数量 private int startRow; //始页首行行…

正确使用pageX、pageY、offsetLeft、offsetTop

获取鼠标位置的时候&#xff0c;遇到一点疑问&#xff0c;然后验证了一下自己的疑惑&#xff1b; pageX、pageY跟clientX和clientY类似&#xff0c;是相对于浏览器文档的坐标&#xff1b; offsetLeft、offsetTop获取的是固定定位&#xff0c;也就是说&#xff0c;监听某个选择…

pageX,pageY,screenX,screenY,clientX,和clientY,offsetX ,offsetY,layerX,layerY的使用 和 区别

pageX&#xff0c;pageY&#xff0c;screenX&#xff0c;screenY&#xff0c;clientX&#xff0c;和clientY返回一个数&#xff0c;其指示物理“CSS像素”的数量的点是从参考点。事件点是用户单击的位置&#xff0c;参考点是左上角的一个点。这些属性返回该参考点的水平和垂直距…

clientX,screenX,pageX,offsetX的区别

前言 关于clientX,screenX,pageX,offsetX的区别之前也比较迷糊&#xff0c;然后自己写了几个demo算是弄明白了&#xff0c;在这记录一下。 定义 一、clientX、clientY 点击位置距离当前body可视区域的x&#xff0c;y坐标。 可以理解为距离浏览器窗口的距离&#xff0c;但注意…

clientX、offsetX、screenX、pageX的区别

一、概念总结 1、event.clientX、event.clientY 鼠标相对于浏览器窗口可视区域的X&#xff0c;Y坐标&#xff08;窗口坐标&#xff09;&#xff0c;可视区域不包括工具栏和滚动条。IE事件和标准事件都定义了这2个属性.clientX指可视区域内离左侧的距离&#xff0c;以滚动条滚…

页面上pageX、offsetLeft等的使用方法

页面上pageX、offsetLeft等的使用方法 pageX: 页面X坐标位置 pageY: 页面Y坐标位置 <script>window.onmousemovefunction(e){// 鼠标移动的时候得到鼠标实时的位置console.log(${e.pageX},${e.pageY});} </script>screenX: 屏幕X坐标位置 screenY: 屏幕Y坐标位置…