kgambhir05/BucketFinder
GitHub: kgambhir05/BucketFinder
一款模块化 Python 云侦察工具,结合子域名枚举与 AWS S3、GCS、Azure Blob 存储桶公开访问权限检测,帮助安全团队发现云存储错误配置风险。
Stars: 1 | Forks: 1
# 云侦察工具
一款模块化的 Python 侦察工具,用于子域名枚举和云存储错误配置检测(AWS S3、GCS、Azure Blob)。
## 功能
| 模块 | 功能说明 |
|---|---|
| **子域名枚举器** | 针对可配置字典表进行多线程 DNS 暴力破解 |
| **Bucket 名称生成器** | 根据每个域名/子域名推导出约 25 种命名模式 |
| **Bucket 扫描器** | 检查 AWS S3、Google Cloud Storage 和 Azure Blob 的公开访问权限 |
| **公开访问检查** | 检测 `ListBucket`(目录列表)和 `GetObject`(公开读取) |
| **输出写入器** | 以 `.txt`、`.json` 和 `summary.txt` 格式输出结构化结果 |
## 安装说明
```
pip install -r requirements.txt
```
## 使用说明
```
# 基础扫描
python recon.py example.com
# 使用自定义 wordlist 和更多 threads
python recon.py example.com --wordlist subdomains.txt --threads 30
# 跳过子域名枚举,直接进行 bucket 扫描
python recon.py example.com --skip-subdomains
# 自定义输出目录
python recon.py example.com --output-dir /tmp/results
# 所有选项
python recon.py example.com \
--threads 20 \
--timeout 5 \
--wordlist my_subs.txt \
--bucket-wordlist extra_buckets.txt \
--output-dir results/
```
# 单个域名(保持不变)
python recon.py nykaa.com
# 批量 — 扫描域名列表
python recon.py --domains-file targets.txt
# 批量并并行扫描域名(同时扫描 3 个域名)
python recon.py --domains-file targets.txt --domain-threads 3
# 所有其他标志在两种模式下均可使用
## python recon.py --domains-file targets.txt --confidence 50 --skip-subdomains
## 输出结构
```
example.com/
├── subdomains.txt ← All discovered subdomains + IPs/CNAMEs
├── buckets_found.txt ← All buckets (public and private)
├── public_buckets.txt ← Only misconfigured/public buckets ⚠
├── results.json ← Full machine-readable JSON
├── summary.txt ← Quick stats overview
└── recon.log ← Full debug log
```
### `subdomains.txt`
```
dev.example.com → 203.0.113.5
api.example.com → CNAME: lb-123.us-east-1.elb.amazonaws.com
```
### `buckets_found.txt`
```
[LIST, READ] AWS https://example-backup.s3.amazonaws.com
[exists] GCS https://storage.googleapis.com/example-assets
```
### `public_buckets.txt`
```
Provider : AWS
Name : example-backup
URL : https://example-backup.s3.amazonaws.com
List : YES ⚠
Read : YES ⚠
Notes : Public listing – 42 object(s) visible
```
## 执行的检查
### AWS S3
- `GET https://.s3.amazonaws.com` — ListBucket(XML 列表)
- `HEAD https://.s3.amazonaws.com/` — 公开对象读取
### Google Cloud Storage
- `GET https://storage.googleapis.com/` — 公开列表
### Azure Blob
- `GET https://.blob.core.windows.net/$web?restype=container&comp=list` — 容器列表
## 扩展工具
- **添加字典表**:放入一个 `--wordlist` 文件用于子域名,或使用 `--bucket-wordlist` 添加额外的 bucket 候选项。
- **添加提供商**:在 `BucketScanner` 中添加一个新的 `_check_` 方法,并从 `scan_name()` 调用它。
- **集成 crt.sh / SecurityTrails**:使用 API 调用替换或增强 `SubdomainEnumerator.enumerate()` 以进行被动侦察。
## 法律声明
标签:GitHub, Python, 内存取证对抗, 子域名枚举, 无后门, 系统安全, 逆向工具