SamySR369/Subdomain-enumeration-tool
GitHub: SamySR369/Subdomain-enumeration-tool
自动化侦察管道工具,整合子域名枚举、端口扫描、漏洞扫描及安全加密存储功能。
Stars: 0 | Forks: 0
# Recon Pipeline Toolkit
自动化侦察管道,包含**子域名枚举**、**漏洞扫描**以及**AES-256-GCM加密**,确保安全存储至 GitHub。
## 文件
| 文件 | 作用 |
|------|------|
| `recon_pipeline.sh` | 主编排器(Bash) |
| `subdomain_enum.py` | 异步 DNS 暴力破解枚举器(Python) |
| `crypto_helper.py` | AES-256-GCM 加密/解密,确保 GitHub 存储安全 |
## 快速开始
### 1 – 安装 Python 依赖
```
pip install cryptography aiodns tqdm
```
### 2 – 安装系统工具(Kali / Ubuntu)
```
# Go tools
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@latest
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
go install -v github.com/lc/gau/v2/cmd/gau@latest
go install -v github.com/s0md3v/uro@latest
go install -v github.com/tomnomnom/anew@latest
# Amass
sudo apt install amass -y
# Dirsearch
pip install dirsearch
```
### 3 – 运行管道
```
chmod +x recon_pipeline.sh
./recon_pipeline.sh targets.txt /path/to/wordlist.txt
```
`targets.txt` — 每行一个根域名,例如:
```
example.com
testsite.org
```
## 子域名枚举器(独立使用)
```
# 单个域名
python3 subdomain_enum.py --domain example.com \
--wordlist /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt
# 从文件读取多个域名
python3 subdomain_enum.py --domains targets.txt \
--wordlist subdomains.txt --output found.txt --verbose
```
### 功能说明
- **被动**枚举:通过 subfinder + amass(由管道调用)
- **主动**异步 DNS 暴力破解,支持 200 个并发查询
- **通配符检测** — 使用随机子域名探测并过滤掉通配符 IP
- **去重** — 合并所有来源并排序
## 加密助手 — 安全 GitHub 存储
### 首次设置
```
# 添加 .gitignore 规则
python3 crypto_helper.py setup-gitignore
# (Optional) 生成随机主密钥文件
python3 crypto_helper.py genkey
```
### 在 `git push` 前加密敏感结果
```
# 加密单个文件
python3 crypto_helper.py encrypt recon-output/secrets.txt
# 加密输出目录中的所有内容
python3 crypto_helper.py encrypt-dir ./recon-output --delete
```
### 需要时解密
```
python3 crypto_helper.py decrypt recon-output/secrets.txt.enc
python3 crypto_helper.py decrypt-dir ./recon-output
```
### 轮换密码短语
```
python3 crypto_helper.py rotate recon-output/secrets.txt.enc
```
### 加密细节
| 属性 | 值 |
|----------|-------|
| 算法 | AES-256-GCM |
| KDF | PBKDF2-HMAC-SHA256 |
| KDF 迭代次数 | 600,000(NIST 2023)|
| 盐值 | 每个文件 32 字节随机 |
| Nonce | 每个文件 12 字节随机 |
| 认证标签 | 16 字节 GCM |
## 管道步骤
```
0. Subdomain Enum subfinder (passive) → amass (passive) → Python DNS brute-force
1. Port Scan naabu → nmap -sV -sC
2. Live Hosts httpx (HTTP/HTTPS probe)
3. Dir Brute-force dirsearch
4. URL Harvest gau (GetAllUrls)
5. Param Filter uro / grep fallback
6. JS Enumeration extract .js URLs → dedup
7. Vuln Scan nuclei (-tags lfi,rce,sqli)
8. Secret Extract SecretFinder on JS files
9. Encrypt crypto_helper.py → *.enc files ready for GitHub
```
## .gitignore(由 `setup-gitignore` 自动生成)
```
recon-output/*.txt
recon-output/*.json
recon-output/*.csv
recon-output/secretfinder/
.recon_key
```
仅提交 `*.enc` 文件。明文结果保留在本地。
标签:AES-256-GCM, AES加密, DNS枚举, ESC4, GitHub安全, OSINT, Python安全工具, Recon, Web安全, 代码生成, 后渗透, 子域名枚举, 安全存储, 实时处理, 密码管理, 应用安全, 异步编程, 操作系统检测, 数据加密, 日志审计, 渗透测试工具, 系统安全, 网络安全, 网络安全审计, 网络安全工具, 蓝队分析, 运行时操纵, 逆向工具, 通配符检测, 隐私保护