crypto-nidh/subdomain-enumeration
GitHub: crypto-nidh/subdomain-enumeration
汇总了子域名枚举与被动侦察的常用命令和工作流,为安全测试人员提供从信息收集到存活探测的快速参考。
Stars: 0 | Forks: 0
# 🔍 被动侦察指南
本仓库包含用于**被动侦察**和**子域名枚举**的命令和工具,无需直接与目标进行交互。
## 🧠 1. 被动侦察 (无直接交互)
### 📜 证书透明度日志
#### 使用 crt.sh
```
curl -s "https://crt.sh/?q=%.target.com&output=json" | jq -r '.[].name_value' | sort -u
```
#### 使用 subfinder
```
subfinder -d target.com -o subdomains.txt
```
## 🛰️ 2. OSINT 工具
### Amass (被动模式)
```
amass enum -passive -d target.com -o amass_passive.txt
```
### theHarvester
```
theHarvester -d target.com -b all -f results.html
```
## 🌐 3. 在线来源
- crt.sh → SSL 证书日志
- Shodan, Censys, FOFA → 互联网范围扫描数据
- VirusTotal, SecurityTrails, BufferOver → 域名情报
## 🌍 4. 子域名发现 / 暴力破解
### Gobuster
```
gobuster dns -d target.com \
-w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-5000.txt \
-t 50
```
### ffuf
```
ffuf -u https://FUZZ.target.com \
-w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-5000.txt
```
### dnsrecon
```
dnsrecon -d target.com -t brt \
-D /usr/share/wordlists/dnsmap.txt
```
### massdns (高速)
```
massdns -r resolvers.txt -t A -o S -w results.txt wordlist.txt
```
## 🔐 5. DNS 区域传送
```
dig axfr @ns1.target.com target.com
host -l target.com ns1.target.com
dnsrecon -d target.com -t axfr
```
## 🔗 6. 合并结果
```
cat amass_passive.txt assetfinder.txt subdomains.txt | sort -u > all_subdomains.txt
```
## 🌐 7. 发现存活主机
### 使用 httprobe
```
cat all_subdomains.txt | httprobe > live_hosts.txt
```
### 使用 httpx
```
cat all_subdomains.txt | httpx -silent -status-code -title -o live_results.txt
```
## ⚙️ 8. 安装
### 通过 APT 安装
```
sudo apt update
sudo apt install amass gobuster dnsrecon seclists -y
```
### 安装 Go 工具
```
go install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
go install github.com/tomnomnom/assetfinder@latest
go install github.com/projectdiscovery/httpx/cmd/httpx@latest
go install github.com/tomnomnom/httprobe@latest
```
## ⚠️ 免责声明
- 仅在获得授权的目标上使用。
- 将 `target.com` 替换为您的实际目标。
- 仅供教育目的使用。
## ⭐ 贡献
欢迎 fork 并改进本仓库。
标签:BlackHat, dnsrecon, DNS解析, ESC4, ffuf, GitHub, httprobe, httpx, massdns, OPA, OSINT, theHarvester, Windows内核, 域名爆破, 子域名枚举, 安全工具库, 实时处理, 密码管理, 应用安全, 开源项目, 日志审计, 白帽子, 系统安全, 网络安全, 被动侦察, 证书透明度, 资产测绘, 进程管理, 逆向工具, 隐私保护, 靶场