x-glacier/kali-pentest / kali-pentest-zh
kali-pentest-zh
Flagged通过 SSH 或 Docker 使用 Kali Linux CLI 工具执行授权渗透测试。 覆盖:信息收集、漏洞分析、嗅探与欺骗、Web/API 渗透、漏洞利用、密码攻击、无线、云原生安全、RFID/NFC、VoIP/ICS、逆向工程、取证分析、后渗透/C2、报告生成。
references/information-gathering/tools/whatweb.md
View on GitHub# WhatWeb
- **Category**: Information Gathering / Web Fingerprinting
- **Risk Level**: 🟢 Low
---
## 描述
WhatWeb 是一款 Web 应用指纹识别工具,能够识别 Web 应用使用的技术栈,包括 CMS(WordPress、Joomla、Drupal 等)、博客平台、统计工具、JavaScript 库、Web 服务器及嵌入式设备等。它拥有超过 1800 个插件,通过分析 HTTP 头、HTML 内容、Cookie、URL 模式等多个维度进行识别。
## 安装
```bash
whatweb --version
sudo apt install whatweb
gem install whatweb
```
## 参数说明
### 侵略性级别
| 级别 | 说明 | 危险性 |
|------|------|--------|
| 1 | 隐蔽(默认):每个 URL 发送单个 HTTP 请求 | 极低 |
| 2 | 未使用(实际与级别 1 行为相同) | 极低 |
| 3 | 侵略性:发送多个请求,包含额外路径探测 | 中等 |
| 4 | 重量级:每个目标发送大量请求 | 高 |
| 参数 | 说明 |
|-----------|-------------|
| `<target>` | URL / IP / CIDR / 文件 示例:`http://example.com` |
| `-i <file>` | 从文件读取目标 示例:`-i targets.txt` |
| `-a <level>` | 设置侵略性级别(默认:1) |
| `--log-verbose <file>` | 详细日志输出 |
| `--log-xml <file>` | 记录 XML 格式日志 |
| `--log-json <file>` | 记录 JSON 格式日志 |
| `--log-json-verbose <file>` | 记录详细 JSON 格式日志 |
| `--log-brief <file>` | 记录简洁单行输出 |
| `--log-errors <file>` | 记录错误日志 |
| `-q` | 不向 STDOUT 显示简要日志 |
| `-v` | 详细输出(包含插件描述) |
| `--no-errors` | 抑制错误消息 |
| `-t <threads>` | 并发线程数(默认:25) |
| `--open-timeout <sec>` | 超时时间(秒,默认:15) |
| `--read-timeout <sec>` | 超时时间(秒,默认:30) |
| `--max-redirects <count>` | 最大重定向次数(默认:10) |
| `-p <plugin>` | 选择插件(逗号分隔列表) |
| `--list-plugins` | 列出所有插件 |
| `--info-plugins [plugin]` | 列出所有插件的详细信息 |
| `--dorks [plugin]` | 列出所选插件的 Google dorks |
| `-U <User-Agent>` | 伪装为指定 Agent(替代默认 WhatWeb/0.6.3) |
| `--user-agent <string>` | 伪装为指定 Agent(替代默认 WhatWeb/0.6.3) |
| `--user <user:pass>` | HTTP 认证 |
| `--proxy <proxy>` | 设置代理主机名和端口 |
| `--proxy-user <user:pass>` | 设置代理用户名和密码 |
| `--cookie <cookie>` | 使用 Cookie(如 'name=value; name2=value2') |
| `--header <header>` | 添加 HTTP 头(如 "Foo:Bar") |
| `--follow-redirect <rule>` | 控制何时跟随重定向 |
| `--url-prefix <prefix>` | 为目标 URL 添加前缀 |
| `--url-suffix <suffix>` | 为目标 URL 添加后缀 |
| `--url-pattern <pattern>` | 将目标插入 URL 模式中 |
| `--colour <value>` | 控制是否使用颜色(always/never/auto) |
| `--colour=never` | 禁用彩色输出 |
## 常用命令
### 基础识别
```bash
# 基本 Web 指纹识别
whatweb http://example.com
# HTTPS 目标
whatweb https://example.com
# 详细输出
whatweb -v http://example.com
# 静默模式(仅输出结果)
whatweb -q http://example.com
```
### 批量扫描
```bash
# 扫描 IP 段
whatweb 192.168.1.0/24
# 从文件读取目标(每行一个 URL)
whatweb -i targets.txt --log-json results.json
# 并发扫描(50 线程)
whatweb -t 50 -i targets.txt
```
### 侵略性扫描
```bash
# 侵略性模式(更多探测,检测更多技术)
whatweb -a 3 http://example.com
# 最大侵略性(全面检测)
whatweb -a 4 http://example.com
```
### 输出格式
```bash
# JSON 输出(便于解析)
whatweb --log-json results.json http://example.com
# XML 输出
whatweb --log-xml results.xml http://example.com
# 详细日志
whatweb --log-verbose results.txt http://example.com
```
### 认证和代理
```bash
# HTTP 基础认证
whatweb --user admin:password http://example.com/admin
# 使用 Cookie
whatweb --cookie "session=abc123" http://example.com
# 通过 Burp 代理
whatweb --proxy 127.0.0.1:8080 http://example.com
# 自定义 User-Agent
whatweb -U "Mozilla/5.0 (Custom)" http://example.com
# 或等效写法:
whatweb --user-agent "Mozilla/5.0 (Custom)" http://example.com
```
### 结合其他工具
```bash
# 从 amass 结果批量识别
# 注意:amass 将子域名输出到标准输出,状态消息输出到标准错误
amass enum -passive -d example.com | sed 's/^/http:\/\//' | whatweb -i /dev/stdin
# 先用 httpx 探测 http 和 https,再批量识别:
amass enum -passive -d example.com | httpx -o /tmp/alive.txt
whatweb -i /tmp/alive.txt --log-json whatweb_results.json
# 与 httprobe 结合
cat subdomains.txt | httprobe | whatweb -i /dev/stdin --log-json whatweb_results.json
```
## 注意事项
1. **版本信息**:某些版本信息可能已被系统管理员隐藏,结果不一定完整
2. **误报**:某些插件可能产生误报,重要发现需手动验证
3. **WAF 绕过**:如目标有 WAF,可能干扰识别结果,考虑使用 `-a 1` 降低侵略性
4. **HTTPS**:会自动跟随重定向,可用 `--max-redirects` 控制
---
## 官方参考
- [WhatWeb GitHub](https://github.com/urbanadventurer/WhatWeb)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |