choshuoyaji/homelab-security-stack
GitHub: choshuoyaji/homelab-security-stack
一个生产级家庭实验室安全监控与响应技术栈,整合 SIEM、EDR、SOAR、云安全组件,提供 Sigma 检测规则、CACAO 自动化 Playbook 及完整的 CI/CD 验证流程。
Stars: 0 | Forks: 0
# 🔒 家庭实验室安全技术栈
一个完全在家庭实验室环境中构建的、生产级的安全监控与响应技术栈。本仓库包含我的 [Medium 文章](https://takahiro-oda.medium.com) 和 [dev.to 帖子](https://dev.to/t_o_jp) 中使用的所有配置、检测规则、自动化 playbook 以及基础设施即代码。

## 🏗️ 架构
```
┌─────────────────────────────────────────────────────┐
│ Home Lab Network │
├─────────────┬──────────────┬────────────────────────┤
│ Endpoints │ Cloud │ Infrastructure │
│ ───────── │ ───── │ ────────────── │
│ Wazuh Agent│ AWS │ EKS Cluster │
│ CrowdStrike│ CloudTrail │ EC2 Instances │
│ Falcon │ GuardDuty │ On-prem VMs │
└──────┬──────┴──────┬───────┴──────────┬─────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────┐
│ SIEM (Splunk) │
│ Sigma Rules → SPL Queries │
└──────────────────────┬──────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ SOAR (Shuffle + n8n) │
│ CACAO v2.0 Playbooks │
│ │
│ ┌───────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ Enrichment│ │ Decision │ │ Response Actions │ │
│ │ - AbuseIP │ │ - AI │ │ - Block IP (WAF) │ │
│ │ - VT │ │ Triage │ │ - Isolate Host │ │
│ │ - MITRE │ │ - Rules │ │ - Create Ticket │ │
│ └───────────┘ └──────────┘ │ - Slack Alert │ │
│ └──────────────────┘ │
└─────────────────────────────────────────────────────┘
```
## 📁 仓库结构
```
homelab-security-stack/
├── sigma-rules/ # Custom Sigma detection rules
│ ├── cloud/ # AWS CloudTrail, GuardDuty rules
│ ├── endpoint/ # EDR, process creation rules
│ ├── network/ # Network traffic rules
│ └── identity/ # IAM, authentication rules
├── playbooks/ # CACAO v2.0 SOAR playbooks
│ ├── incident-response/ # IR playbooks
│ ├── enrichment/ # Threat intel enrichment
│ └── remediation/ # Auto-remediation actions
├── enrichment/ # Threat intelligence scripts
│ ├── ip_reputation.py
│ ├── ai_triage.py
│ └── mitre_mapper.py
├── infrastructure/ # Infrastructure as Code
│ ├── docker-compose.yml # Local stack deployment
│ ├── terraform/ # AWS infrastructure
│ └── ansible/ # Configuration management
├── ci-cd/ # CI/CD pipeline configs
│ ├── sigma-validation.yml
│ └── playbook-ci.yml
└── docs/ # Documentation
├── setup-guide.md
└── troubleshooting.md
```
## 🛠️ 技术栈组件
| 组件 | 工具 | 用途 |
|-----------|------|---------|
| SIEM | Splunk (dev license) | 日志聚合与检测 |
| EDR | CrowdStrike Falcon + Wazuh | 端点监控 |
| SOAR | Shuffle + n8n | 编排与自动化 |
| Cloud | AWS (CloudTrail, GuardDuty) | 云安全监控 |
| CNAPP | Wiz | 云原生应用保护 |
| Ticketing | Jira | 事件跟踪 |
| Detection | Sigma Rules | 通用检测逻辑 |
| Playbooks | CACAO v2.0 | 标准化响应 |
## 📚 相关文章
### 检测工程系列
- **系列 1**: [构建 20+ Sigma Rules 实现多源威胁检测](https://takahiro-oda.medium.com/detection-engineering-in-my-home-lab-series-1-building-20-sigma-rules-for-multi-source-threat-614015b067e8) ([dev.to 镜像](https://dev.to/t_o_jp/detection-engineering-in-my-home-lab-series-1-building-20-sigma-rules-for-multi-source-threat-43el))
### SOAR 系列
- **系列 1**: 从零构建自动化事件响应 Pipeline (即将推出)
## 🚀 快速开始
```
# Clone 仓库
git clone https://github.com/choshuoyaji/homelab-security-stack.git
cd homelab-security-stack
# 部署本地 Stack
docker-compose up -d
# 验证 Sigma 规则
python3 ci-cd/validate_sigma.py sigma-rules/
# 测试 Playbooks
python3 -m pytest tests/playbook_tests/ -v
```
## 🎯 MITRE ATT&CK 覆盖范围
当前跨技术领域的检测覆盖:
- **Credential Access** — T1003, T1078, T1110
- **Lateral Movement** — T1021, T1570
- **Defense Evasion** — T1562, T1070
- **Initial Access** — T1190, T1133
- **Execution** — T1059, T1204
相关技术的覆盖率从约 15% 提升至约 45%。
## 📊 成果
| 指标 | 之前 | 之后 |
|--------|--------|-------|
| MITRE ATT&CK 覆盖率 | ~15% | ~45% |
| 平均检测时间 (MTTD) | 数小时 | 数分钟 |
| 告警分诊时间 | 15 分钟 | < 2 分钟 |
| 检测规则 | 5 | 20+ |
| 自动化 Playbook | 0 | 8 |
## 📄 许可证
MIT License — 详情请见 [LICENSE](LICENSE)。
## 👤 作者
**Takahiro Oda**
- Medium: [@takahiro-oda](https://takahiro-oda.medium.com)
- dev.to: [@t_o_jp](https://dev.to/t_o_jp)
- GitHub: [@choshuoyaji](https://github.com/choshuoyaji)
标签:AMSI绕过, AWS安全, CACAO剧本, DevSecOps, EDR, EKS, PB级数据处理, Sigma规则, SOAR, Wazuh, Web截图, 上游代理, 威胁检测, 安全运维, 家庭实验室, 容器安全, 漏洞利用检测, 目标导入, 端点防护, 系统提示词, 网络安全架构, 脆弱性评估, 自动化响应, 请求拦截, 逆向工具