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/theHarvester.md
View on GitHub# theHarvester
- **Category**: Information Gathering / OSINT / Email & Subdomain Enumeration
- **Risk Level**: 🟢 Low
---
## 描述
theHarvester 是一款专注于从公开数据源收集邮件地址、主机名、子域名、IP 地址、开放端口等信息的 OSINT 工具。它特别适合渗透测试前期的信息收集阶段,通过查询搜索引擎、DNS 数据库、公开 API 等方式在不接触目标系统的情况下获取情报。
## 安装
```bash
theHarvester -h
sudo apt install theharvester
git clone https://github.com/laramies/theHarvester
cd theHarvester && pip3 install -r requirements/base.txt
# 配置 API 密钥
# 系统级(Kali 默认安装):
nano /etc/theHarvester/api-keys.yaml
# 用户级(pip/git 安装):
mkdir -p ~/.local/share/theHarvester
nano ~/.local/share/theHarvester/api-keys.yaml
```
## 参数说明
| 参数 | 说明 |
|-----------|-------------|
| `-d <domain>` | 要搜索的公司名称或域名 |
| `-l <count>` | 限制搜索结果数量(默认:500) |
| `-b <source>` | 数据源(逗号分隔或 all) |
| `-f <file>` | 输出到 JSON 和 XML 文件(生成 `<file>.json` 和 `<file>.xml`) 示例:`-f results` |
| `-e <DNS server>` | 用于查询的 DNS 服务器 |
| `--dns-resolve` | 使用解析器列表对子域名执行 DNS 解析 |
| `-t`, `--take-over` | 检查子域名接管 |
| `-c`, `--dns-brute` | 对域名执行 DNS 暴力破解 |
| `-a`, `--api-scan` | 扫描 API 端点 |
| `--screenshot <dir>` | 对已解析的域名截图并保存到指定输出目录 |
| `--shodan` | 用 Shodan 查询发现的主机 |
## 常用命令
### 基础搜索
```bash
# 使用所有数据源搜索
theHarvester -d example.com -b all
# 指定数据源
theHarvester -d example.com -b google,bing,baidu
# 限制返回数量
theHarvester -d example.com -b google -l 200
# 使用 Google 搜索并输出报告
theHarvester -d example.com -b google -l 500 -f example_report
```
### 邮箱收集
```bash
# 针对邮箱收集优化(使用 hunter、linkedin 等)
theHarvester -d example.com -b hunter,linkedin,google
theHarvester -d example.com -b google --dns-resolve
```
### 子域名枚举
```bash
# 使用证书透明度数据源
theHarvester -d example.com -b crtsh,certspotter,dnsdumpster
# 全面子域名搜索
theHarvester -d example.com -b all -l 1000 -f report
```
### 使用 Shodan
```bash
# 结合 Shodan 获取端口信息
theHarvester -d example.com -b shodan --shodan
```
## 注意事项
1. **API 密钥**:配置 API 密钥可获取更多结果,特别是 Hunter、VirusTotal
2. **速率限制**:Google 等搜索引擎有 CAPTCHA,频繁使用可能被临时封锁
3. **结果质量**:不同数据源结果质量差异大,建议多数据源交叉验证
4. **配合使用**:结合 amass、sublist3r 获得更完整的子域名列表
---
## 官方参考
- [theHarvester GitHub](https://github.com/laramies/theHarvester)
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: 196k | Updated | Claude CodeCodex | Verified | Install |