mouadboudhar/Security-Operations-Center
GitHub: mouadboudhar/Security-Operations-Center
一个基于 Wazuh、TheHive、Cortex 和 Grafana 构建的端到端容器化安全运营中心仿真环境,覆盖威胁检测、自动事件响应、威胁情报富化与实时仪表板展示。
Stars: 2 | Forks: 0
# 学术 SOC — 开源安全运营中心
一个完全容器化、端到端的**安全运营中心**,作为网络安全工程大四的毕业设计项目。它将开源工具串联成一个完整的**检测 → 响应 → 威胁情报 → 可视化** pipeline,并内置五条自定义检测规则、自动化事件案例创建、自动化威胁情报富化、实时仪表板以及五个可复现的攻击模拟。
```
Endpoints SIEM Response Threat Intel Visualization
┌────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ linux-agent│ │ Wazuh Manager│ │ TheHive │ │ Cortex │ │ Grafana │
│ 1 and 2 │──► │ + Indexer │──► │ (cases) │──► │ VirusTotal │ │ SOC live │
│ (Wazuh │ │ (rules, │ │ auto-opened │ │ AbuseIPDB │ │ dashboard │
│ agents) │ │ alerts) │ │ per alert │ │ enrichment │ │ │
└────────────┘ └──────┬───────┘ └──────────────┘ └──────────────┘ └──────┬───────┘
└──────────────────── alerts indexed (OpenSearch) ──────────┘
```
## 功能说明
| 功能 | 实现 |
| --- | --- |
| **检测** | 5 条自定义 Wazuh 规则(SSH 暴力破解、sudo 权限提升、探测工具、文件完整性篡改、Web 扫描),每条均映射到 MITRE ATT&CK |
| **响应** | 一个 Wazuh integration 为每个 SOC 告警自动创建一个 **TheHive 案例**,并将源 IP 作为 observable 附加 |
| **威胁情报** | 分析师只需点击一下,即可对案例中的 observables 运行 **Cortex** 分析器(VirusTotal + AbuseIPDB) |
| **可视化** | 一个预配置的 **Grafana** 仪表板:告警量、热门规则、agent 状态、MITRE 战术细分、实时严重告警源 |
| **验证** | 5 个单命令攻击模拟 + 一个评审演示运行器,每个都验证告警是否触发以及案例是否开启 |
## 技术栈
| 服务 | 角色 | 镜像 | URL |
| --- | --- | --- | --- |
| Wazuh Manager | SIEM 引擎(agents、API、分析) | `wazuh/wazuh-manager:4.7.4` | — (API `:55000`) |
| Wazuh Indexer | OpenSearch 告警存储 | `wazuh/wazuh-indexer:4.7.4` | `:9200` |
| Wazuh Dashboard | 告警探索 UI | `wazuh/wazuh-dashboard:4.7.4` | https://localhost:443 |
| TheHive | 事件/案例管理 | `strangebee/thehive:5.2` | http://localhost:9000 |
| Cortex | Observable 分析(分析器) | `thehiveproject/cortex:3.1.7` | http://localhost:9001 |
| Elasticsearch | 仅用于 Cortex 的后端(内部) | `elasticsearch:7.17.15` | — |
| Grafana | SOC 仪表板 | `grafana/grafana:10.4.2` | http://localhost:3000 |
| linux-agent-1 / 2 | 受监控的 endpoint(攻击目标) | 基于 `ubuntu:22.04` 构建 | SSH `:2221` / `:2222` |
所有服务共享一个 Docker 桥接网络(`soc-network`)并持久化到命名卷中。
## 一键启动
**前置条件:** Docker Engine 20.10+、Docker Compose v2、约 8 GB 可用内存,以及
`vm.max_map_count=262144`(如果可以,脚本会自动提升该值)。
```
git clone Acedemic-SOC
cd Acedemic-SOC
# 1. 创建你的 secrets 文件并填写相应的值(密码 + 两个
# free-tier threat-intel API 密钥)
cp infrastructure/.env.example infrastructure/.env
# 编辑 infrastructure/.env (VIRUSTOTAL_API_KEY, ABUSEIPDB_API_KEY, *_PASSWORD…)
# 2. 启动整个环境 + 运行所有 bootstrap 步骤
./start.sh
```
`./start.sh` 会启动技术栈,等待每个服务就绪,初始化 TheHive 和 Cortex 的组织/用户/密钥,打通 Wazuh→TheHive 案例集成,从 `.env` 启用 VirusTotal + AbuseIPDB 分析器,并打印访问 URL。首次运行会拉取镜像并构建 agent(10–15 分钟);该脚本是幂等的,可安全重复运行。
### 运行实时攻击演示
```
cd infrastructure/scenarios
./run_demo.sh # interactive — press Enter between scenarios
./run_demo.sh --auto # hands-free, fixed pauses
```
每个场景都会发起一次攻击,然后**验证**预期的 Wazuh 规则是否触发以及 TheHive 案例是否开启。
## 访问与凭据
| UI | URL | 登录 |
| --- | --- | --- |
| Grafana (SOC dashboard) | http://localhost:3000 | `admin` / `GRAFANA_PASSWORD` → 文件夹 **SOC** |
| TheHive (cases) | http://localhost:9000 | `wazuh@thehive.local` / `SocLab_TheHive2026!` (SOC 分析师) |
| Cortex (analyzers) | http://localhost:9001 | `admin` / `SocLab_Cortex2026!` |
| Wazuh Dashboard | https://localhost:443 | `admin` / `INDEXER_PASSWORD` |
## 仓库结构
```
Acedemic-SOC/
├── start.sh # one-command bring-up + bootstrap
├── README.md # this file
├── docs/
│ ├── technical_report.md # full capstone technical report
│ ├── mitre_mapping.md # rule → MITRE ATT&CK mapping table
│ └── runbooks/ # 5 analyst runbooks (one per scenario)
└── infrastructure/
├── docker-compose.yml # the 12-container stack
├── .env / .env.example # secrets (git-ignored)
├── README-SETUP.md # detailed manual setup reference
├── wazuh-rules/
│ └── custom_soc_rules.xml # the 5 custom detection rules
├── integrations/
│ ├── wazuh_thehive.py # Wazuh → TheHive case integration
│ ├── setup_thehive.sh # TheHive org/user/key bootstrap
│ └── setup_cortex.sh # Cortex org/user/key + analyzer bootstrap
├── grafana/provisioning/ # datasources + SOC dashboard JSON
├── endpoints/ # the two monitored Ubuntu agents
└── scenarios/ # 5 attack simulations + run_demo.sh
```
## 文档
- **[docs/technical_report.md](docs/technical_report.md)** — 架构、每条规则的
详解、集成演示、仪表板设计、结果和经验教训。
- **[docs/runbooks/](docs/runbooks/)** — 分析师操作手册:针对每个场景的分流、TheHive
调查、Cortex 解读、升级和补救措施。
- **[docs/mitre_mapping.md](docs/mitre_mapping.md)** — 规则到 ATT&CK 的映射。
- **[infrastructure/README-SETUP.md](infrastructure/README-SETUP.md)** — 如果您不想使用 `start.sh`,可参考此手动
分步启动指南。
## 销毁
```
cd infrastructure
docker compose down # stop containers, keep data volumes
docker compose down -v # also wipe all data (full reset)
```
标签:AMSI绕过, CIDR查询, CSV导出, Grafana, TheHive, Wazuh, 威胁检测, 安全教育, 安全运营中心, 密码管理, 插件系统, 版权保护, 网络映射, 请求拦截, 逆向工具, 速率限制