Nikto 介绍
Nikto 是一个开源的 Web 服务器扫描工具,专注于检测潜在的安全问题和漏洞。它能够扫描 Web 服务器的多个方面,包括过时的软件版本、潜在的危险文件和目录、配置错误等。Nikto 通过检查各种已知的漏洞和错误配置,帮助安全研究人员和渗透测试人员发现 Web 服务器的安全隐患。
安装命令
在 Kali Linux 上,Nikto 通常已经预安装。如果没有预安装,可以使用以下命令进行安装:
sudo apt update sudo apt install nikto
Nikto 命令及详细说明
1.基本扫描
nikto -h <target>
示例:
nikto -h http://example.com
2.指定端口
nikto -h <target> -p <port>
示例:
nikto -h http://example.com -p 8080
指定扫描目标的特定端口。
3.使用 SSL/TLS 扫描
nikto -h <target> -ssl
示例:
nikto -h https://example.com -ssl
强制使用 SSL/TLS 进行扫描。
4.指定输出文件
nikto -h <target> -o <outputfile> -Format <format>
示例:
nikto -h http://example.com -o results.html -Format html
将扫描结果保存到指定的文件中,并指定输出格式(支持 txt、html、csv、xml 等)。
5.使用代理服务器
nikto -h <target> -useproxy http://<proxy>:<port>
示例:
nikto -h http://example.com -useproxy http://127.0.0.1:8080
通过指定的代理服务器进行扫描。
6.指定扫描范围
nikto -h <target> -Tuning <options>
示例:
nikto -h http://example.com -Tuning 123456
根据指定的选项调整扫描范围:
0
: 检查文件/CGI1
: 检查服务器选项2
: 检查危险文件/CGI3
: 检查目录索引4
: 检查过时的服务器软件5
: 检查未知类型的文件/CGI6
: 检查所有类型的文件/CGI
7.扫描特定的 URL
nikto -h <target> -url <url>
示例:
nikto -h http://example.com -url /admin
扫描目标服务器上的特定 URL。
8.禁用主机名解析
nikto -h <target> -norecursion
示例:
nikto -h http://example.com -norecursion
禁用对主机名的递归解析
9.指定测试文件
nikto -h <target> -list-plugins
列出所有可用的插件,并显示其详细信息。
10.指定扫描的插件
nikto -h <target> -Plugins <plugin_name>
示例:
nikto -h http://example.com -Plugins outdated
使用指定的插件进行扫描。
11.综合使用示例
例如,如果你想对一个目标 Web 服务器进行 SSL/TLS 扫描,指定扫描端口为 8443,保存结果为 HTML 格式的文件,并使用代理服务器进行扫描,可以使用以下命令:
nikto -h https://example.com -p 8443 -ssl -o results.html -Format html -useproxy http://127.0.0.1:8080
此命令将对 example.com
的 8443 端口进行 SSL/TLS 扫描,保存结果为 HTML 格式的 results.html
文件,并通过 127.0.0.1:8080
代理服务器进行扫描。
评论区
请登录后发表评论。