AsHfIEXE/HellForge

GitHub: AsHfIEXE/HellForge

一个模块化、事件驱动的开源攻击面管理平台,整合被动侦察、漏洞发现、JS 情报提取与多因素风险评分为一体。

Stars: 1 | Forks: 0

# HELLFORGE ### *构建攻击面。狩猎不可能。* [![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT) [![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-blue.svg)](https://python.org) [![FastAPI](https://img.shields.io/badge/Backend-FastAPI-009688.svg)](https://fastapi.tiangolo.com) [![React](https://img.shields.io/badge/Frontend-React_18-61DAFB.svg)](https://reactjs.org) [![Event Driven](https://img.shields.io/badge/Architecture-Event--Driven-purple.svg)](#系统架构) **HellForge** 是一个模块化、事件驱动的攻击面管理(ASM)和安全情报平台。它将被动侦察、HTTP 情报、JavaScript 密钥提取、漏洞关联、多因素风险评分和 AI 辅助的威胁向量分析统一在一个生态系统中。
## 系统架构 ``` Web Dashboard (React + Vite + Cyber UI) │ ┌──────────────────────────────────────┼──────────────────────────────────────┐ ▼ ▼ ▼ REST API (v1) WebSocket Telemetry CLI Utility │ │ │ └──────────────────────────────────────┼──────────────────────────────────────┘ ▼ Topic-Based Event Bus Manager │ ┌───────────────┬───────────────┬──────┴────────┬───────────────┬───────────────┐ ▼ ▼ ▼ ▼ ▼ ▼ scan_bus asset_bus http_bus finding_bus risk_bus system_bus (ScanContext) (AssetEvent) (HTTPEvent) (FindingEvent) (RiskEvent) │ │ │ │ │ │ └───────────────┴───────────────┼───────────────┴───────────────┴───────────────┘ ▼ Categorized Plugin Marketplace ┌────────────────────────────────┐ │ plugins/official/ │ │ ├── subfinder │ │ ├── httpx │ │ └── nuclei │ │ plugins/community/ │ │ plugins/private/ │ └────────────────────────────────┘ │ ▼ Multi-Factor Risk Scoring Engine │ ▼ SQLAlchemy Async Relational Database ``` ## 核心功能 - **事件驱动的 Topic 引擎:** 解耦的 Pub/Sub 消息传递机制可防止不相关的插件之间发生事件洪泛(`scan`、`asset`、`http`、`finding`、`risk`、`system`)。 - **不可变 DTO 契约:** 严格的 Pydantic 模型(`ScanContext`、`AssetEvent`、`HTTPEvent`、`FindingEvent`、`RiskEvent`)确保插件之间干净地进行通信,而不会直接更改 ORM 状态。 - **模块化多因素风险引擎:** 使用独立的评分器(`ExposureScorer`、`CVEScorer`、`TechnologyScorer`、`AuthScorer`)动态计算 0–100 的资产风险评分。 - **分类插件市场:** 自动从 `plugins/official`、`plugins/community` 和 `plugins/private` 发现插件,并进行 `plugin.yaml` 清单验证。 - **HellForge CLI 工具:** 完整的命令行套件(`hellforge doctor`、`hellforge scan`、`hellforge plugin`、`hellforge report`、`hellforge ai`)。 - **赛博玻璃质感仪表盘:** 交互式 React 仪表盘,具有 D3.js 网络拓扑图和实时的 AI Security Copilot。 ## 快速开始 ### 1. 前置条件 - Python 3.10+ - Node.js 18+ ### 2. 后端设置 ``` cd backend pip install -r requirements.txt python -m pytest tests # Run automated test suite python app/main.py # Launch FastAPI server ``` ### 3. 前端仪表盘设置 ``` cd frontend npm install npm run dev ``` ### 4. Docker 部署 ``` docker-compose up --build ``` ## CLI 使用 `hellforge` CLI 允许安全工程师直接从终端执行扫描、检查插件市场并运行系统健康检查。 ``` # 运行系统诊断 python cli/hellforge_cli.py doctor # 添加目标 domain python cli/hellforge_cli.py target add example.com # 执行 Event-Driven Scan Pipeline python cli/hellforge_cli.py scan example.com # 列出已安装的 marketplace plugins 和 event subscriptions python cli/hellforge_cli.py plugin # 生成 Executive Security Posture Report python cli/hellforge_cli.py report # 查询 HellForge AI Copilot python cli/hellforge_cli.py ai "Explain XSS vector on dev portal" ``` ## 编写第三方插件 插件是位于 `plugins/community//` 下的独立模块。 ### 第一步:创建 `plugin.yaml` ``` name: custom_subdomain_hunter version: 1.0.0 author: Security Researcher description: Custom passive subdomain collector plugin subscriptions: - scan ``` ### 第二步:创建 `main.py` ``` import os import asyncio from typing import Any from app.plugins.sdk import BasePlugin from app.core.events import event_bus_manager from app.core.dtos import ScanContext, AssetEvent class CustomSubdomainHunter(BasePlugin): def __init__(self): manifest_path = os.path.join(os.path.dirname(__file__), "plugin.yaml") super().__init__(manifest_path) async def execute(self, event_data: Any): if isinstance(event_data, ScanContext): domain = event_data.target_domain # Emit discovered asset DTO to asset_bus asset_evt = AssetEvent( scan_id=event_data.scan_id, domain=domain, subdomain=f"internal-auth.{domain}", tags=["custom", "passive"], discovery_source="custom_hunter" ) await event_bus_manager.asset_bus.publish(asset_evt) ``` ## 项目路线图与实施计划 ``` [Phase 1] ──► [Phase 2] ──► [Phase 3] ──► [Phase 4] ──► [Phase 5] Core Platform Recon & JS Distributed Enterprise Continuous Engine Intel Workers & AI RBAC ASM ``` ### 阶段一:核心框架(已完成) - [x] 基于 Topic 拆分的事件总线引擎 - [x] 不可变 Pydantic DTO 数据契约 - [x] 带有 `plugin.yaml` 清单验证的 Plugin SDK - [x] 分类插件市场加载器(`official`、`community`、`private`) - [x] 模块化多因素风险引擎 - [x] FastAPI REST API (v1) 和 WebSocket 遥测通道 - [x] 富终端 CLI 工具(`hellforge doctor`、`scan`、`report`、`plugin`、`ai`) - [x] 包含 D3 拓扑图的赛博朋克风格 React 仪表盘 - [x] Docker Compose 部署配置 - [x] 自动化测试套件(Pytest 集成) ### 阶段二:高级侦察与 JS 情报(已完成) - [x] 自动化 JavaScript bundle 下载与 AST 解析以进行密钥检测 - [x] 带有变化增量追踪的定时和循环目标扫描引擎 - [x] 执行报告生成引擎(HTML 和 Markdown 格式) - [x] 屏幕截图可视化界面分类引擎 ### 阶段三:分布式 Worker 与云连接器 - [ ] 用于 EventBus 扩展的 Redis / NATS 消息队列后端插件 - [ ] 用于跨 VPC 进行分布式扫描的远程 agent worker 节点 - [ ] AWS、Azure、GCP 和 Cloudflare 资产发现连接器 - [ ] 使用 Ollama 和向量数据库对扫描结果进行本地 RAG AI 引擎分析 ### 阶段四:企业级 RBAC 与多租户 - [ ] 基于角色的访问控制(Admin、Analyst、Auditor、Viewer) - [ ] 项目作用域用户权限和 JWT refresh token 身份验证 - [ ] 第三方集成(Slack 警报、Jira issue 创建、GitHub actions、SIEM webhooks) - [ ] 基于网页的插件市场商店 UI ### 阶段五:持续攻击面管理 (EASM) - [ ] 历史资产演变与变化增量追踪(随时间添加/移除的资产) - [ ] 暴露趋势分析和 CVSS 威胁热力图 - [ ] 自动化修复验证和 SLA 追踪 - [ ] 高可用性 Kubernetes 部署清单(Helm chart) ## 许可证 基于 MIT 许可证分发。详情请参阅 `LICENSE`。
标签:AV绕过, FastAPI, GitHub, MITM代理, Python, React, SOC工具, Syscalls, 动态插桩, 安全侦察, 实时处理, 密码管理, 无后门, 漏洞发现, 请求拦截, 逆向工具