工具简介
Nikto是一个开源的Web服务器扫描器,专为发现潜在的危险文件/程序、过时的软件版本以及服务器配置问题而设计。它能够扫描多种Web服务器以识别已知的安全风险。
主要功能
漏洞扫描
检测常见漏洞
配置检查
识别错误配置
版本检测
识别过时的服务
报告生成
多种格式的扫描结果
基本用法
# 基本扫描
nikto -h example.com
# 使用SSL
nikto -h https://example.com
# 指定端口
nikto -h example.com -p 8080
# 扫描多个目标
nikto -h example.com,example2.com
# 生成HTML报告
nikto -h example.com -o report.html -F html
常用参数
| 参数 | 说明 |
|---|---|
| -h | 指定目标主机 |
| -p | 指定端口 |
| -ssl | 使用SSL/TLS连接 |
| -o | 指定输出文件 |
| -F | 指定输出格式 |
使用示例
示例1:全面扫描
# 启用所有测试
nikto -h example.com -Tuning x
# 详细输出
nikto -h example.com -Display V
# 执行完整扫描并生成详细报告
nikto -h example.com -Tuning x -Display V -o full_scan.html -F html
执行全面的网站安全扫描
示例2:代理和身份验证
# 使用代理
nikto -h example.com -useproxy http://proxy:8080
# 基本身份验证
nikto -h example.com -id admin:password
# 与端口扫描相结合
nikto -h example.com -p 80,443,8080,8443
通过代理扫描并使用身份验证
安全提示
- 仅在获得授权的目标上使用
- 扫描可能会产生大量流量
- 注意服务器负载影响
- 某些测试可能触发安全防护