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/dnsx.md
View on GitHub# dnsx
- **Category**: Information Gathering / DNS Analysis
- **Risk Level**: 🟢 Low
---
## 描述
ProjectDiscovery 开发的快速多用途 DNS 工具集。支持批量解析域名、爆破子域名、提取 DNS 记录(A、CNAME、MX、TXT、NS、SOA)。管道友好——可从标准输入读取,直接与 subfinder、httpx 等 ProjectDiscovery 工具集成。批量操作速度远超 `dig`;用于从大量发现列表中过滤有效子域名。
## 安装
```bash
sudo apt install dnsx
```
## 参数说明
| 参数 | 说明 |
|------|------|
| `-l <file>` | 待解析的子域名/主机列表(文件或 stdin) |
| `-d <domain>` | 待爆破的域名列表(文件、逗号分隔或 stdin) |
| `-w <wordlist>` | 待爆破的词列表(文件、逗号分隔或 stdin) |
| `-r <file>` | 使用的解析器列表(文件或逗号分隔) |
| `-a` | 查询 A 记录(默认) |
| `-aaaa` | 查询 AAAA 记录 |
| `-cname` | 查询 CNAME 记录 |
| `-mx` | 查询 MX 记录 |
| `-txt` | 查询 TXT 记录 |
| `-ns` | 查询 NS 记录 |
| `-resp` | 显示 DNS 响应 |
| `-resp-only` | 仅显示 DNS 响应 |
| `-rc <codes>` | 按 DNS 状态码过滤结果(如 noerror,servfail,refused) |
| `-t <n>` | 并发线程数(默认 100) |
| `-silent` | 抑制横幅信息,仅输出结果 |
| `-json` | 以 JSONL(ines) 格式输出 |
| `-o <file>` | 输出文件路径 |
## 常用命令
```bash
# 批量解析子域名列表(过滤有效域名)
dnsx -l subdomains.txt -a -silent
# 直接通过管道处理 subfinder 的输出
subfinder -d example.com -silent | dnsx -a -silent
# 使用字典爆破子域名
dnsx -d example.com -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -a
# 提取所有 A 记录
dnsx -l subdomains.txt -a -resp-only
# 提取 MX 记录(邮件服务器)
dnsx -d example.com -mx -resp
# 提取 TXT 记录(SPF、DMARC、验证令牌)
dnsx -d example.com -txt -resp
# 完整侦察流水线:发现 → 解析 → 探测
subfinder -d example.com -silent | dnsx -a -silent | httpx -silent
# 仅保留可解析的域名(过滤 NXDOMAIN)
dnsx -l domains.txt -rc NOERROR -a -silent
```
## 注意事项
1. dnsx 的批量解析速度远超 `dig` —— 适合从大型列表中筛选有效子域名。
2. `-rc NOERROR` 过滤可解析的域名,丢弃 NXDOMAIN 响应(不存在的域名)。
3. 使用 `-resp` 可在查询域名旁显示实际 DNS 响应值 —— 分析 CNAME 链时必不可少。
4. 通过 `-r resolvers.txt` 配置自定义解析器,避免被公共 DNS 服务器限速。
5. TXT 记录中常含有 API 密钥、云服务验证令牌及内部基础设施线索 —— 务必逐一检查。
---
## 官方参考
- [dnsx (GitHub)](https://github.com/projectdiscovery/dnsx)
- [Kali dnsx](https://www.kali.org/tools/dnsx/)
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 |