performing-web-application-scanning-with-nikto

Nikto 是一款开源 Web 服务器和 Web 应用程序扫描器,可针对超过 7,000 个潜在危险文件/程序进行测试,检查超过 1,250 个服务器的过期版本,并识别超过 270 个服务器的版本特定问题。

9 stars

Best use case

performing-web-application-scanning-with-nikto is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Nikto 是一款开源 Web 服务器和 Web 应用程序扫描器,可针对超过 7,000 个潜在危险文件/程序进行测试,检查超过 1,250 个服务器的过期版本,并识别超过 270 个服务器的版本特定问题。

Teams using performing-web-application-scanning-with-nikto should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/performing-web-application-scanning-with-nikto/SKILL.md --create-dirs "https://raw.githubusercontent.com/killvxk/cybersecurity-skills-zh/main/skills/performing-web-application-scanning-with-nikto/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/performing-web-application-scanning-with-nikto/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How performing-web-application-scanning-with-nikto Compares

Feature / Agentperforming-web-application-scanning-with-niktoStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Nikto 是一款开源 Web 服务器和 Web 应用程序扫描器,可针对超过 7,000 个潜在危险文件/程序进行测试,检查超过 1,250 个服务器的过期版本,并识别超过 270 个服务器的版本特定问题。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 使用 Nikto 执行 Web 应用程序扫描

## 概述
Nikto 是一款开源 Web 服务器和 Web 应用程序扫描器,可针对超过 7,000 个潜在危险文件/程序进行测试,检查超过 1,250 个服务器的过期版本,并识别超过 270 个服务器的版本特定问题。它执行全面测试,包括 XSS、SQL 注入、服务器错误配置、默认凭据和已知漏洞 CGI 脚本。

## 前置条件
- 已安装 Nikto(基于 Perl,Kali Linux 中已包含)
- 扫描目标 Web 服务器的书面授权
- 目标 Web 应用程序的网络访问权限
- 了解 HTTP/HTTPS 协议

## 核心概念

### Nikto 可检测的内容
- 服务器错误配置和危险的默认文件
- 具有已知 CVE 的过期服务器软件版本
- 常见 CGI 漏洞和危险脚本
- 默认凭据和管理页面
- 应禁用的 HTTP 方法(PUT、DELETE、TRACE)
- SSL/TLS 错误配置和弱密码套件
- 缺失的安全标头(X-Frame-Options、CSP、HSTS)
- 通过响应头和错误页面的信息泄露

### Nikto 与其他 Web 扫描器对比
| 功能 | Nikto | OWASP ZAP | Burp Suite | Nuclei |
|------|-------|-----------|------------|--------|
| 许可证 | 开源 | 开源 | 商业 | 开源 |
| 重点 | 服务器/配置 | 应用逻辑 | 完整渗透测试 | 模板驱动 |
| 速度 | 快 | 中 | 慢 | 非常快 |
| 误报率 | 中等 | 低 | 低 | 低 |
| 认证支持 | 基本 | 完整 | 完整 | 模板 |
| 活跃社区 | 是 | 是 | 是 | 是 |

## 工作流程

### 步骤 1:基本扫描
```bash
# 对目标执行基本扫描
nikto -h https://target.example.com

# 扫描特定端口
nikto -h target.example.com -p 8443

# 扫描多个端口
nikto -h target.example.com -p 80,443,8080,8443

# 强制 SSL 扫描
nikto -h target.example.com -ssl

# 从主机列表文件扫描
nikto -h targets.txt
```

### 步骤 2:高级扫描选项
```bash
# 使用所有调优选项执行全面扫描
nikto -h https://target.example.com \
  -Tuning 123456789abcde \
  -timeout 10 \
  -Pause 2 \
  -Display V \
  -output report.html \
  -Format htm

# 调优选项控制测试类型:
# 0 - 文件上传
# 1 - 有趣的文件/日志中发现
# 2 - 错误配置/默认文件
# 3 - 信息泄露
# 4 - 注入(XSS/Script/HTML)
# 5 - 远程文件获取 - Web 根目录内
# 6 - 拒绝服务
# 7 - 远程文件获取 - 服务器全局
# 8 - 命令执行/远程 Shell
# 9 - SQL 注入
# a - 认证绕过
# b - 软件识别
# c - 远程源包含
# d - WebService
# e - 管理控制台

# 使用特定调优扫描(XSS + SQL 注入 + 认证绕过)
nikto -h https://target.example.com -Tuning 49a

# 使用认证扫描
nikto -h https://target.example.com -id admin:password

# 通过代理扫描
nikto -h https://target.example.com -useproxy http://proxy:8080

# 使用自定义 User-Agent 扫描
nikto -h https://target.example.com -useragent "Mozilla/5.0 (Security Scan)"

# 扫描特定 CGI 目录
nikto -h https://target.example.com -Cgidirs /cgi-bin/,/scripts/

# 规避技术(仅用于授权的 IDS 规避测试)
# 1-随机 URI 编码,2-目录自引用
# 3-提前结束 URL,4-前置长随机字符串
nikto -h https://target.example.com -evasion 1234
```

### 步骤 3:输出与报告
```bash
# 生成多种输出格式
nikto -h https://target.example.com -output scan.csv -Format csv
nikto -h https://target.example.com -output scan.xml -Format xml
nikto -h https://target.example.com -output scan.html -Format htm
nikto -h https://target.example.com -output scan.txt -Format txt

# JSON 输出(较新版本)
nikto -h https://target.example.com -output scan.json -Format json

# 同时保存为多种格式
nikto -h https://target.example.com \
  -output scan_report \
  -Format htm
```

### 步骤 4:扫描多个目标
```bash
# 创建目标文件(每行一个)
cat > targets.txt << 'EOF'
https://app1.example.com
https://app2.example.com:8443
http://internal-app.corp.local
192.168.1.100:8080
EOF

# 扫描所有目标
nikto -h targets.txt -output multi_scan.html -Format htm

# 使用 GNU parallel 并行扫描
cat targets.txt | parallel -j 5 "nikto -h {} -output {/}_report.html -Format htm"
```

### 步骤 5:SSL/TLS 评估
```bash
# 全面 SSL 扫描
nikto -h https://target.example.com -ssl \
  -Tuning b \
  -Display V

# 检查特定 SSL 漏洞
# Nikto 检查以下内容:
# - 过期证书
# - 自签名证书
# - 弱密码套件
# - 启用了 SSLv2/SSLv3
# - BEAST、POODLE、Heartbleed 指标
# - 缺少 HSTS 标头
```

### 步骤 6:与其他工具集成
```bash
# 将 Nmap 结果管道传输到 Nikto
nmap -p 80,443,8080 --open -oG - 192.168.1.0/24 | \
  awk '/open/{print $2}' | \
  while read host; do nikto -h "$host" -output "${host}_nikto.html" -Format htm; done

# 导出为 Metasploit 兼容格式
nikto -h target.example.com -output msf_import.xml -Format xml

# 使用 Python 解析 Nikto XML 输出以生成自定义报告
python3 -c "
import xml.etree.ElementTree as ET
tree = ET.parse('scan.xml')
for item in tree.findall('.//item'):
    print(f\"[{item.get('id')}] {item.findtext('description', '')[:100]}\")
"
```

## 解读结果

### 严重性分类
- **OSVDB/CVE 引用**:与 NVD 交叉对比以获取 CVSS 评分
- **服务器信息泄露**:版本横幅、技术栈
- **危险 HTTP 方法**:启用了 PUT、DELETE、TRACE
- **默认/备份文件**:.bak、.old、.swp、web.config.bak
- **管理界面**:暴露的 /admin、/manager、/console
- **缺失安全标头**:CSP、X-Frame-Options、HSTS

### 常见误报
- 自定义 404 页面触发的通用检查
- 防 CSRF 令牌被标记为表单漏洞
- CDN/WAF 响应被错误识别为漏洞
- 负载均衡器健康检查页面

## 最佳实践
1. 扫描前务必获取书面授权
2. 将 Nikto 与应用层扫描器(ZAP、Burp)结合使用
3. 使用 -Pause 标志降低对生产服务器的负载
4. 报告前手动验证发现
5. 结合 SSL 测试工具(testssl.sh、sslyze)进行全面覆盖
6. 将定期扫描纳入持续漏洞管理流程
7. 保持 Nikto 数据库更新以检查最新漏洞
8. 仅在授权的 IDS 测试中使用适当的规避设置

## 常见陷阱
- 未经授权运行 Nikto(法律责任)
- 将 Nikto 视为完整的 Web 应用程序扫描器(它专注于服务器/配置问题)
- 不验证结果导致误报报告
- 对生产系统进行过于激进的扫描
- 将 SSL/TLS 发现忽视为"信息性"

## 相关技能
- scanning-infrastructure-with-nessus
- scanning-apis-for-security-vulnerabilities
- performing-network-vulnerability-assessment

Related Skills

scanning-network-with-nmap-advanced

9
from killvxk/cybersecurity-skills-zh

使用 Nmap 的脚本引擎、时序控制、规避技术和输出解析,对授权目标网络执行高级网络侦察, 发现主机、枚举服务、检测漏洞并识别操作系统。

scanning-kubernetes-manifests-with-kubesec

9
from killvxk/cybersecurity-skills-zh

使用 Kubesec 对 Kubernetes 资源清单执行安全风险分析,识别错误配置、权限提升风险以及与安全最佳实践的偏差。

scanning-infrastructure-with-nessus

9
from killvxk/cybersecurity-skills-zh

Tenable Nessus 是业界领先的漏洞扫描器,用于识别网络基础设施(包括服务器、工作站、网络设备和操作系统)中的安全弱点。

scanning-docker-images-with-trivy

9
from killvxk/cybersecurity-skills-zh

Trivy 是 Aqua Security 开源的综合性漏洞扫描器,用于检测容器镜像中操作系统软件包、语言特定依赖项的漏洞、错误配置、密钥和许可证违规,并集成到 CI/CD 流水线,支持 SARIF、CycloneDX 和 SPDX 等多种输出格式。

scanning-containers-with-trivy-in-cicd

9
from killvxk/cybersecurity-skills-zh

本技能涵盖将 Aqua Security 的 Trivy 扫描器集成到 CI/CD 流水线中,用于全面的容器镜像漏洞检测。包括扫描 Docker 镜像中的操作系统包和应用依赖 CVE、检测 Dockerfile 中的错误配置、扫描文件系统和 Git 仓库,以及建立基于严重性的质量门禁以阻止有漏洞的镜像部署。

scanning-container-images-with-grype

9
from killvxk/cybersecurity-skills-zh

使用 Anchore Grype 扫描容器镜像的已知漏洞(Vulnerability),支持基于 SBOM 的匹配和可配置的严重性阈值。

performing-yara-rule-development-for-detection

9
from killvxk/cybersecurity-skills-zh

通过识别可执行文件中的唯一字节模式、字符串和行为指标,开发精准的 YARA 恶意软件检测规则,同时将误报率降至最低。

performing-wireless-security-assessment-with-kismet

9
from killvxk/cybersecurity-skills-zh

使用 Kismet 通过被动射频监控进行无线网络安全评估,检测流氓接入点(Rogue AP)、隐藏 SSID、弱加密和未授权客户端。

performing-wireless-network-penetration-test

9
from killvxk/cybersecurity-skills-zh

执行无线网络渗透测试,通过捕获握手包、破解 WPA2/WPA3 密钥、检测流氓接入点以及使用 Aircrack-ng 和相关工具测试无线网络分段,评估 WiFi 安全性。

performing-windows-artifact-analysis-with-eric-zimmerman-tools

9
from killvxk/cybersecurity-skills-zh

使用 Eric Zimmerman 的开源 EZ Tools 套件(包括 KAPE、MFTECmd、PECmd、LECmd、JLECmd 和 Timeline Explorer)执行全面的 Windows 取证制品分析,解析注册表 hive、预取文件、事件日志和文件系统元数据。

performing-wifi-password-cracking-with-aircrack

9
from killvxk/cybersecurity-skills-zh

在授权无线安全评估中捕获 WPA/WPA2 握手包,并使用 aircrack-ng、hashcat 和字典攻击进行离线密码破解, 以评估密码短语强度和无线网络安全状况。

performing-web-cache-poisoning-attack

9
from killvxk/cybersecurity-skills-zh

在授权安全测试期间,通过未纳入缓存键的头部和参数毒化缓存响应,利用 Web 缓存机制向其他用户投递恶意内容。