0xmrma/sentinel-recon
GitHub: 0xmrma/sentinel-recon
一款轻量级模块化 Python 侦察 CLI,为授权渗透测试整合了 WHOIS、DNS、子域名枚举、端口扫描、技术指纹识别和多格式报告生成能力。
Stars: 0 | Forks: 0
# SentinelRecon
SentinelRecon 是一款轻量级、模块化的侦察 CLI,专为授权的渗透测试和红队准备而构建。它执行被动发现、保守的主动检查,并生成易于阅读的报告以便交接。
## 功能
- 支持 IANA 引荐处理的 WHOIS 查询。
- 针对 A、AAAA、MX、TXT 和 NS 记录的 DNS 枚举。
- 通过 crt.sh 和 AlienVault OTX 进行被动子域名枚举。
- 可选的 Cert Spotter 和 HackerTarget HostSearch 被动来源。
- 使用 Python socket 进行 TCP 端口扫描。
- 针对常见 TCP 和 HTTP/TLS 服务的 Banner 抓取。
- 从 header、cookie 和页面标记中进行 HTTP 技术指纹识别。
- 包含时间戳、解析出的 IP、发现和警告的 HTML、TXT 和 JSON 报告。
- 模块化命令标志、详细日志级别以及 Docker 支持。
## 快速开始
```
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .
sentinel-recon example.com --all --format all -v
```
在 Linux 或 macOS 上:
```
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
sentinel-recon example.com --all --format all -v
```
报告默认写入 `reports/` 目录。
## CLI 用法
```
sentinel-recon [module flags] [options]
```
常见示例:
```
# 仅限 Passive recon:WHOIS、DNS 和 subdomains
sentinel-recon example.com --passive --format html
# 仅限 DNS
sentinel-recon example.com --dns --format txt
# 针对特定 port list 的 Active recon
sentinel-recon example.com --active --ports 80,443,8080 --format all -v
# Full task 覆盖
sentinel-recon example.com --all --ports 80,443,8080,8443 --format all -v
```
重要标志:
| 标志 | 用途 |
| --- | --- |
| `--whois` | 运行 WHOIS 查询。 |
| `--dns` | 枚举 A、AAAA、MX、TXT 和 NS 记录。 |
| `--subdomains` | 通过被动 API 枚举子域名。 |
| `--ports-scan` | 运行 TCP 端口扫描。 |
| `--tech` | 检测 HTTP 技术。 |
| `--passive` | 运行 WHOIS、DNS 和子域名枚举。 |
| `--active` | 运行端口扫描和技术检测。 |
| `--all` | 运行所有模块。 |
| `--ports` | 设置逗号分隔的端口和范围,例如 `80,443,8000-8010`。 |
| `--sources` | 选择 `all`、`crtsh`、`otx`、`certspotter` 或 `hackertarget`。 |
| `--format` | 选择 `html`、`txt`、`json` 或 `all`。 |
| `-v`, `-vv` | 提高日志详细级别。 |
## Docker 附加功能
构建镜像:
```
docker build -t sentinel-recon .
```
运行全面评估:
```
docker run --rm -v "${PWD}/reports:/app/reports" sentinel-recon example.com --all --ports 80,443 --format all -v
```
Linux 或 macOS 的卷语法:
```
docker run --rm -v "$PWD/reports:/app/reports" sentinel-recon example.com --all --ports 80,443 --format all -v
```
## 架构
```
sentinel_recon/
cli.py CLI parsing, module orchestration, logging
utils.py target validation, port parsing, IP resolution
modules/
whois_lookup.py WHOIS referral lookup and summary parsing
dns_enum.py DNS record enumeration
subdomains.py crt.sh and AlienVault OTX passive enumeration
ports.py TCP scanner and banner grabber
tech_detect.py HTTP technology fingerprinting
reporting.py HTML, TXT, and JSON report rendering
```
每项侦察能力都是独立的,可通过专用标志调用,这使得该工具易于扩展以支持额外的数据源或输出格式。
## 示例报告
针对 `example.com` 生成的示例报告包含在:
- `reports/example.com-sample-report.html`
- `reports/example.com-sample-report.txt`
它是使用以下命令生成的:
```
sentinel-recon example.com --all --sources hackertarget --ports 80,443 --format all -v
```
## 参考
- OWASP Web 安全测试指南,信息收集:https://owasp.org/www-project-web-security-testing-guide/stable/4-Web_Application_Security_Testing/01-Information_Gathering/README
- Sublist3r OSINT 子域名枚举模型:https://github.com/aboul3la/Sublist3r
- OWASP Amass 攻击面映射模型:https://github.com/owasp-amass/amass
标签:GitHub, Python, 实时处理, 密码管理, 无后门, 服务器安全, 红队侦察, 请求拦截, 逆向工具