talyush/corvus_corax
GitHub: talyush/corvus_corax
一款模块化网络安全侦察与情报分析框架,通过统一架构收集、规范化和关联多源侦察数据,生成可导出的交互式情报报告。
Stars: 0 | Forks: 0
# Corvus Corax
Corvus Corax 是一个专为网络安全学习者与研究人员设计的模块化侦察与情报分析框架。
它旨在通过可扩展的核心架构来收集、规范化和关联侦察数据,从而创建统一的情报流——并支持将其导出为交互式报告。
**洞察未见之系统。**
## 当前版本
**v0.7.2 — 子域名稳定性补丁**
v0.7.2 是一个稳定性版本,通过引入多个被动 OSINT 来源(HackerTarget 和 RapidDNS)并配合自定义超时处理和优雅降级,解决了子域名枚举超时错误。
## 更新日志
### v0.7.2 — 子域名稳定性补丁
- **`modules/subdomain_enum.py`**:
- 新增 **HackerTarget** API 和 **RapidDNS** 解析查询,与 `crt.sh` 并行运行。
- 为所有被动 OSINT 资源配置了至少 `8.0 秒` 的超时时间,以防止在较慢的服务器上发生过早超时。
- 针对每个来源隔离了连接/超时错误,确保某个不稳定的来源(如 `crt.sh`)不会导致整个模块执行失败。
- 合并了所有活跃来源的子域名,并使用合并后的证据名称更新了情报关联。
- **`output/output_manager.py`**:
- 动态格式化子域名结果,以列出具体的活跃来源(例如 `Active Sources: hackertarget, rapiddns`)。
- 支持向后兼容旧计数值的数据结构。
- **品牌更新**:
- 在 `core/banner.py`、`modules/version.py` 和 `modules/help.py` 中将版本更新为 `v0.7.2-stability-patch`。
### v0.7.1 — 稳定性与优化
- **`core/logger.py`:** 移除了 `StreamHandler`(控制台输出)。Logger 现在仅写入文件——在执行 `help` 等命令后,终端中不再出现原始日志行。
- **`output/output_manager.py`:**
- `to_log()`: 从转储完整 JSON payload 更改为记录简短摘要(`[module] status=X target=Y`)。
- `to_text()`: `help` 和 `version` 模块现在会跳过 `[+] SUCCESS / Target / Time` 标题块——仅保留纯净输出。
- **`main.py`:**
- 新增 `exit_animation()`: 在 `exit`、`quit` 或 `Ctrl+C` 时显示打字机风格的 *“乌鸦归于暗影之中...”*。
- 移除了冗余的 `[*] Running module` / `[+] Module finished` 打印信息。
- 改进了未知命令提示,现在会显示用户输入的具体内容。
## 架构概览
```
[ Module Executions ]
│
(Generates Standardized Payload)
│
┌─────────────────────┴──────────────────────┐
▼ ▼
[ OutputManager ] [ ContextManager ]
(Terminal Presentation) (Centralized Intelligence Graph)
│ │
├─► Render formatted terminal output ├─► Map IPs / Domains
├─► Summarize discoveries ├─► Record Notes w/ Confidence
└─► Display Notes & Nexus alerts └─► Graph Entity Relationships
│
[ NexusEngine ]
(Correlation & Risk Scoring)
│
[ NexusExporter ]
(HTML Dossier / Neo4j JSON)
```
## v0.7 新特性(Nexus Intelligence)
### `core/exporter.py` — 情报导出引擎 *(新增)*
- **`export_html(filepath)`** — 生成独立、单文件的交互式 HTML 情报档案。
- **Executive Summary** 标签页:威胁警报、置信度评分和审计事件日志。
- **Risk Profiles** 标签页:可展开的实体卡片,包含风险评分进度条和证据链。
- **Graph Relations Explorer** 标签页:可搜索的表格,展示所有原始及 Nexus 推断出的关系。
- 毛玻璃深色 UI,Google Fonts,平滑的标签页切换——无外部依赖。
- **`export_neo4j_json(filepath)`** — 将完整情报图导出为适配 Neo4j 的 JSON schema。
- 节点:`IP`、`Domain`、`Port`、`Location`、`Server`、`Tech` 等。
- 关系:包含所有原始侦察关系 + Nexus 推断出的派生关系。
- 可直接用于 `LOAD CSV` 或 `APOC` 导入。
- **`generate_neo4j_data()`** — 将 `ContextManager` 图转换为扁平化的 `{ nodes, relationships }` 字典。
### `modules/nexus.py` — CLI 路由扩展
新增以下子命令:
| 命令 | 描述 |
|---|---|
| `nexus` / `nexus analyze` | 运行 Nexus 关联引擎,打印终端仪表板 |
| `nexus export html [path]` | 导出交互式 HTML 档案(默认:`logs/nexus_report.html`) |
| `nexus export json [path]` | 导出 Neo4j 图谱 JSON(默认:`logs/nexus_neo4j.json`) |
### `output/output_manager.py` — 重新设计的 Nexus 仪表板
- 对齐的列布局,并使用 `#` 条形图展示风险分布。
- 为 `analyze`、`export html` 和 `export json` 结果类型提供独立的终端格式化工具。
- 通过结构化的区块分隔符提升了可读性。
### `modules/help.py` — 全面更新
- 记录了所有 nexus 子命令(`nexus analyze`、`nexus export html`、`nexus export json`)。
- 新增了注意事项区块,解释了前置条件和默认导出路径。
- 版本头更新至 v0.7。
## v0.6.1 新特性(优化的扫描)
- **多线程端口扫描:** 使用 `ThreadPoolExecutor` 进行并发端口探测。
- **预置常用端口 (`TOP_PORTS`):** 默认快速扫描涵盖 20 多个常见安全服务,耗时约 1 秒。
- **隐蔽慢速模式:** 依然全面支持带有可配置延迟的顺序扫描。
## 命令参考
```
================================================================================
CORVUS CORAX v0.7 — NEXUS INTELLIGENCE | Modular Recon Framework
================================================================================
Command | Arguments | Description
--------------------------------------------------------------------------------
help | | Show commands
version | | Show tool version
context | | Show collected context
scan | ... | Port scan (normal/slow/banner/subnet)
netscan | | Scan a network/subnet
footprint | | Get IP and hostname info
geoip | | Get geolocation info
whois | | Run WHOIS lookup
subdomain | [wordlist] | Passive subdomain enum (crt.sh+wordlist)
tech | | Detect server, framework & tech stack
crawl | | Get title, links, forms & status code
nexus | [analyze] | Run Nexus Correlation Engine
nexus analyze | | Correlate & score all collected data
nexus export html | [filepath] | Export HTML intelligence dossier
nexus export json | [filepath] | Export Neo4j-ready graph JSON
================================================================================
Notes:
- Nexus commands require prior data collection (scan, footprint, etc.)
- Default export path: logs/nexus_report.html | logs/nexus_neo4j.json
- Use 'context' at any time to inspect the collected intelligence graph
================================================================================
```
## 标准输出 Schema
所有模块均返回规范化的 JSON 风格 payload:
```
{
"module": "scan",
"target": "192.168.1.10",
"status": "success",
"data": {
"ip": "192.168.1.10",
"mode": "normal",
"open_ports": [
{"port": 22, "service": "SSH"},
{"port": 80, "service": "HTTP"}
]
},
"notes": [
{
"text": "Port 22 (SSH) discovered open on 192.168.1.10",
"source": "scan",
"severity": "info",
"confidence": 1.0,
"timestamp": "2026-06-13T00:00:00Z"
}
],
"relationships": [
{
"src": {"type": "ip", "value": "192.168.1.10"},
"relation": "has_open_port",
"dst": {"type": "port", "value": "22/SSH"},
"evidence": "port scan",
"confidence": 1.0,
"timestamp": "2026-06-13T00:00:00Z"
}
],
"timestamp": "2026-06-13T00:00:00Z"
}
```
错误格式:
```
{
"module": "geoip",
"target": "invalid-ip",
"status": "error",
"error": "Lookup failed",
"notes": [],
"relationships": [],
"timestamp": "2026-06-13T00:00:00Z"
}
```
## Context 结构
`ContextManager` 维护着一个由每个模块实时更新的情报图谱:
```
{
"ips": {
"8.8.8.8": {
"ports": [{"port": 80, "service": "http"}],
"geo": {
"country": "United States",
"city": "Mountain View",
"isp": "Google LLC"
},
"hostname": "dns.google"
}
},
"domains": {
"dns.google": {"ips": ["8.8.8.8"]}
},
"notes": [...],
"relations": [
{
"src": {"type": "ip", "value": "8.8.8.8"},
"relation": "located_in",
"dst": {"type": "location", "value": "Mountain View, United States"},
"evidence": "geoip lookup",
"confidence": 1.0
}
],
"derived_relations": [...],
"meta": {
"created_at": "...",
"updated_at": "...",
"event_count": 5,
"recent_events": ["ip_added:8.8.8.8", "geo_updated:8.8.8.8"]
}
}
```
## 配置
运行时配置位于 `config/config.json`:
```
{
"log_level": "INFO",
"threads": 20,
"timeout": 3.0,
"user_agent": "CorvusCorax/0.7",
"output_mode": "text",
"scan_defaults": {
"connect_timeout": 1.0,
"banner_timeout": 2.0,
"host_probe_ports": [80, 22],
"host_probe_timeout": 0.3,
"slow_scan_delay": 0.3,
"normal_port_range": [1, 1024],
"max_threads": 200
}
}
```
## 典型工作流
```
# 1. 收集情报
corvus > footprint example.com
corvus > scan 192.168.1.10
corvus > geoip 8.8.8.8
corvus > whois example.com
corvus > subdomain example.com
corvus > tech example.com
corvus > crawl example.com
# 2. 检查 live graph
corvus > context
# 3. 运行 Nexus 关联与风险分析
corvus > nexus analyze
# 4. 导出结果
corvus > nexus export html # -> logs/nexus_report.html
corvus > nexus export json # -> logs/nexus_neo4j.json
corvus > nexus export html reports/my_report.html # custom path
```
## 路线图
- **交互式分析层:** LLM 引导的威胁推理和自然语言上下文查询。
- **动态可视化图谱:** 交互式网络关系可视化工具(D3.js / Cytoscape)。
- **Neo4j 集成:** 通过 Bolt 协议直接推送到运行中的 Neo4j 实例。
- **PDF 导出:** 与 HTML 版本相辅相成的可打印情报档案。
## 免责声明
本项目仅供教育和授权的安全研究目的使用。严禁未经授权使用。
标签:ESC4, ESC6, GitHub, Homebrew安装, OSINT, Python, 侦察框架, 多模态安全, 子域名枚举, 实时处理, 情报分析, 无后门, 系统安全, 网络安全, 网络诊断, 逆向工具, 隐私保护