nikto-scan

$npx mdskill add wgpsec/AboutSecurity/nikto-scan

Scan web servers for vulnerabilities using Nikto's 7000+ checks.

  • Detects outdated software, dangerous files, and misconfigurations.
  • Integrates with OWASP standards and supports custom tuning flags.
  • Executes targeted scans via command-line arguments and plugins.
  • Outputs results in JSON or HTML report formats.

SKILL.md

.github/skills/nikto-scanView on GitHub ↗
---
name: nikto-scan
description: "使用 Nikto 进行 Web 服务器漏洞扫描。当需要检测 Web 服务器的已知漏洞、过时软件版本、危险文件/CGI、配置错误时使用。Nikto 内置 7000+ 检查项,覆盖 OWASP 常见问题。任何涉及 Web 漏洞扫描、服务器安全检查、配置审计的场景都应使用此技能"
metadata:
  tags: "nikto,web,scan,漏洞扫描,Web服务器,CGI,配置错误,OWASP,SSL,过时软件"
  category: "tool"
---

# Nikto Web 服务器漏洞扫描方法论

Nikto 是经典的 Web 服务器漏洞扫描器。核心优势:**检查项丰富**(7000+ 项)+ **开箱即用**(无需配置)+ **覆盖面广**(过时软件/危险文件/配置错误/已知漏洞)。

项目地址:https://github.com/sullo/nikto

## Phase 1: 基本扫描

```bash
# 扫描单个目标
nikto -h http://target.com

# 指定端口
nikto -h target.com -p 8080

# HTTPS 扫描
nikto -h https://target.com

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

## Phase 2: 扫描调优

```bash
# 指定扫描类型(Tuning)
# 1=文件上传 2=默认文件 3=信息泄露 4=注入 5=远程获取 6=DoS 7=远程shell 8=命令执行 9=SQL注入
nikto -h http://target.com -Tuning 123489

# 只做信息泄露检查
nikto -h http://target.com -Tuning 3

# 排除 DoS 类检查
nikto -h http://target.com -Tuning x6

# 指定插件
nikto -h http://target.com -Plugins apache_expect_xss,ssl

# 设置最大扫描时间
nikto -h http://target.com -maxtime 300
```

## Phase 3: 认证和代理

```bash
# Basic Auth
nikto -h http://target.com -id admin:password

# Cookie 认证
nikto -h http://target.com -C "session=abc123"

# 自定义 User-Agent
nikto -h http://target.com -useragent "Mozilla/5.0"

# 通过代理
nikto -h http://target.com -useproxy http://127.0.0.1:8080

# 禁用 404 猜测(减少误报)
nikto -h http://target.com -no404
```

## Phase 4: 输出格式

```bash
# JSON 输出
nikto -h http://target.com -Format json -output results.json

# HTML 报告
nikto -h http://target.com -Format html -output report.html

# CSV 输出
nikto -h http://target.com -Format csv -output results.csv

# XML 输出
nikto -h http://target.com -Format xml -output results.xml
```

## 常用场景速查

| 场景 | 命令 |
|------|------|
| 快速扫描 | `nikto -h http://target.com -maxtime 120` |
| 全面扫描 | `nikto -h http://target.com -Tuning 123456789abc` |
| SSL 检查 | `nikto -h https://target.com -Plugins ssl` |
| 信息泄露 | `nikto -h http://target.com -Tuning 3` |
| 带认证扫描 | `nikto -h http://target.com -id admin:pass` |

More from wgpsec/AboutSecurity

SkillDescription
401-403-bypass401/403 访问拒绝绕过方法论。当遇到管理后台、API 端点返回 401/403 Forbidden 时使用。覆盖路径操纵、HTTP 方法篡改、Header 注入、协议降级、组合攻击
ad-acl-abuseActive Directory ACL 滥用攻击方法论。当 BloodHound 发现 GenericAll/WriteDACL/WriteOwner/GenericWrite/ForceChangePassword 等危险 ACE 时使用。覆盖 ACE 枚举、权限滥用链、Shadow Credentials、RBCD 攻击
ad-delegation-attackKerberos 委派攻击(非约束/约束/RBCD)。当 BloodHound 发现委派配置、或已获取有 SPN 的服务账号/机器账号控制权时使用。通过 S4U 协议滥用可实现跨服务模拟任意用户,常用于域内权限提升和横向移动。
ad-domain-attackActive Directory 域环境攻击全链路。当目标主机在域环境中(systeminfo 显示 Domain 非 WORKGROUP)、发现 88/389/636 端口、或获取到域用户凭据时使用。覆盖域信息收集、用户枚举、Kerberoasting、AS-REP Roasting、委派攻击、ACL 滥用、DCSync、Golden/Silver Ticket
ad-persistenceAD 域环境持久化技术。当已获取域管/本地管理员权限、需要建立持久访问以确保重启或密码更改后仍能回到目标环境时使用。覆盖主机级持久化(计划任务/注册表Run/COM劫持/WMI事件订阅/Windows服务/启动文件夹)、域级持久化(Golden Ticket/Silver Ticket/Skeleton Key/DSRM/AdminSDHolder)、DCShadow/GoldenGMSA高级技术、清理命令与检测规避
ad-trust-attack域信任关系攻击。当目标存在多域/多林环境时使用。包含父子域提权(Golden Ticket + ExtraSid)、跨林攻击(SID History/MSSQL Trust Links)、单向信任利用。已获取子域 Domain Admin 或发现信任关系时优先加载。
adcs-certipy-attackActive Directory Certificate Services (ADCS) 证书攻击。当发现域内有 CA 服务器、ADCS Web Enrollment、证书模板配置错误时使用。覆盖 ESC1-ESC11 所有证书滥用路径、Certipy 工具链、证书伪造、NTLM 中继到 ADCS。发现 ADCS/CA/证书/certsrv 相关内容时一定要使用此技能
adinfo-enum使用 Adinfo 进行 Active Directory 信息收集。当获得域用户凭据后需要快速收集域环境信息时使用。Adinfo 是一个快速 AD 信息收集工具,一条命令输出域控列表、域管用户、信任关系、GPO、SPN、委派配置等关键信息——比手动 LDAP 查询快得多。发现域环境后第一步信息收集使用此技能
agent-security|
ai-data-security|