Nikto 扫描结果分析

(base) sunyuhua@sunyuhua-HKF-WXX:~/tools/botscript$ nikto -h https://www.geexek.com
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          116.62.244.223
+ Target Hostname:    www.geexek.com
+ Target Port:        443
---------------------------------------------------------------------------
+ SSL Info:        Subject: /CN=*.geexek.com
                   Ciphers: ECDHE-RSA-AES128-GCM-SHA256
                   Issuer:  /C=CN/O=Beijing Xinchacha Credit Management Co., Ltd./CN=Xcc Trust DV SSL CA
+ Start Time:         2024-07-04 16:21:29 (GMT8)
---------------------------------------------------------------------------
+ Server: nginx
+ The anti-clickjacking X-Frame-Options header is not present.
+ Uncommon header 'access-control-allow-origin' found, with contents: *
+ Cookie session created without the secure flag
+ Cookie session created without the httponly flag
+ Server leaks inodes via ETags, header found with file /D6MzL53Y.adjunct, fields: 0x5950be20 0x599 
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ File/dir '/' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ "robots.txt" contains 9 entries which should be manually viewed.
+ Server is using a wildcard certificate: '*.geexek.com'
+ DEBUG HTTP verb may show server debugging information. See http://msdn.microsoft.com/en-us/library/e8z01xdh%28VS.80%29.aspx for details.
+ 6544 items checked: 0 error(s) and 9 item(s) reported on remote host
+ End Time:           2024-07-04 16:29:25 (GMT8) (476 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

从 Nikto 扫描结果来看,发现了一些潜在的安全问题和配置错误。下面是对日志中发现的问题的分析以及每个漏洞的详细说明和可能的利用方式:

分析扫描结果

  1. X-Frame-Options header 不存在

    • 描述:目标服务器没有设置 X-Frame-Options 头,这意味着该网站可能容易受到点击劫持(Clickjacking)攻击。
    • 修复建议:在服务器配置中添加 X-Frame-Options 头,例如 X-Frame-Options: DENYX-Frame-Options: SAMEORIGIN
  2. 不常见的头部 ‘access-control-allow-origin’

    • 描述:发现一个不常见的头部 access-control-allow-origin,内容为 *,这意味着允许所有来源的跨域请求。
    • 风险:这可能导致跨站点请求伪造(CSRF)攻击。
    • 修复建议:确保此设置的必要性,如果不需要开放跨域请求,删除或限制此头部的值。
  3. Cookie session 创建时没有 secure 标志

    • 描述:会话 Cookie 没有设置 secure 标志,这意味着即使在非 HTTPS 连接上也会发送该 Cookie。
    • 风险:可能导致 Cookie 被窃取。
    • 修复建议:确保所有敏感 Cookie 都设置 secure 标志,使其只能在 HTTPS 连接上传输。
  4. Cookie session 创建时没有 httponly 标志

    • 描述:会话 Cookie 没有设置 httponly 标志,这意味着客户端 JavaScript 可以访问该 Cookie。
    • 风险:可能导致跨站脚本攻击(XSS)中窃取 Cookie。
    • 修复建议:确保所有敏感 Cookie 都设置 httponly 标志,使其不能被客户端 JavaScript 访问。
  5. 服务器通过 ETags 泄露 inodes

    • 描述:ETags 头部包含 inode 信息,可能泄露文件系统结构。
    • 风险:攻击者可以利用此信息进行缓存投毒或其他攻击。
    • 修复建议:在服务器配置中禁用 ETags 或移除 inode 信息。
  6. robots.txt 文件条目

    • 描述robots.txt 文件包含 9 个条目,返回 HTTP 200 状态码。
    • 风险:攻击者可以查看 robots.txt 文件中列出的路径,并试图访问这些路径。
    • 修复建议:手动检查 robots.txt 文件中的条目,确保没有泄露敏感路径或信息。
  7. 使用通配符证书

    • 描述:服务器使用的是通配符 SSL 证书 *.geexek.com
    • 风险:通配符证书本身不是漏洞,但需要确保证书的私钥安全。
    • 修复建议:定期检查和更新证书,确保证书私钥的安全存储。
  8. DEBUG HTTP 动词可能泄露调试信息

    • 描述:服务器支持 DEBUG HTTP 动词,这可能会泄露调试信息。
    • 风险:攻击者可以通过发送 DEBUG 请求获取服务器的调试信息。
    • 修复建议:禁用 DEBUG HTTP 动词。

进一步的安全措施

除了上述具体问题的修复建议,还可以采取以下通用的安全措施:

  1. 定期更新服务器和应用程序:确保所有服务器和应用程序组件保持最新,修复已知漏洞。
  2. 实施严格的访问控制:确保只有授权用户和系统才能访问敏感资源。
  3. 使用 Web 应用防火墙(WAF):部署 WAF 以检测和阻止常见的 web 攻击。
  4. 启用 HTTPS:确保所有传输的数据通过 HTTPS 进行加密。

通过分析和修复这些问题,可以提高 Web 服务器的安全性,防止潜在的攻击和数据泄露。如果你有进一步的问题或需要更详细的指导,请随时告诉我。

  • 5
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
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
发出的红包

打赏作者

MonkeyKing.sun

对你有帮助的话,可以打赏

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值