hubertwojcik/elk-siem-lab

GitHub: hubertwojcik/elk-siem-lab

一个通过 Vagrant 和 Ansible 一键部署的自动化 ELK SIEM 家庭实验室,集成多平台日志采集与入侵检测能力,用于安全监控和检测工程实践。

Stars: 0 | Forks: 0

# ELK SIEM 实验环境 用于安全监控和检测工程的自动化家庭实验室环境。整个技术栈——从 VM 配置到日志收集 pipeline——均以代码形式定义,并可通过单条命令进行部署。 ## 架构 ``` ┌─────────────────────────────────────────────────────────┐ │ Host Machine │ │ Vagrant + VirtualBox │ │ │ │ ┌──────────────────────┐ ┌────────────────────────┐ │ │ │ siem-node │ │ linux-target │ │ │ │ 192.168.56.10 │ │ 192.168.56.20 │ │ │ │ │ │ │ │ │ │ Elasticsearch │ │ nginx (web server) │ │ │ │ Logstash │ │ auditd │ │ │ │ Kibana │ │ syslog │ │ │ │ Elastic SIEM │ │ Suricata IDS │ │ │ │ │ │ Filebeat agent │ │ │ └──────────────────────┘ └────────────────────────┘ │ │ │ │ ┌────────────────────────┐ │ │ │ windows-target │ │ │ │ 192.168.56.30 │ │ │ │ │ │ │ │ Windows Event Logs │ │ │ │ Sysmon │ │ │ │ Winlogbeat agent │ │ │ └────────────────────────┘ │ └─────────────────────────────────────────────────────────┘ ``` ## 技术栈 | 组件 | 角色 | |-----------|------| | Vagrant | VM 生命周期管理 | | Ansible | 配置管理与自动化配置 | | Elasticsearch | 日志存储与索引 | | Logstash | 日志接入 pipeline | | Kibana | 可视化与 Elastic SIEM UI | | Filebeat | 日志转发器(Linux agent) | | Winlogbeat | 日志转发器(Windows agent) | | Suricata | 网络 IDS — 生成并转发 alert 至 ELK | | Sysmon | Windows 系统活动监控 | ## 日志源 - **syslog** — 系统级事件、身份验证 - **auditd** — Linux 内核审计(文件访问、syscalls、权限提升) - **nginx** — Web 访问和错误日志 - **Suricata** — 网络入侵检测 alert(EVE JSON) - **Windows Event Logs** — 安全、系统、应用程序通道 - **Sysmon** — 进程创建、网络连接、注册表更改 ## 前置条件 - VirtualBox >= 7.0 - Vagrant >= 2.4 - Ansible >= 2.15 - 16 GB RAM(Elasticsearch 极其消耗内存) ## 快速开始 ``` git clone https://github.com/hubertwojcik/elk-siem-lab.git cd elk-siem-lab vagrant up ``` 部署完成(约 15 分钟)后,即可通过 `http://192.168.56.10:5601` 访问 Kibana。 ## 项目结构 ``` elk-siem-lab/ ├── Vagrantfile # VM definitions ├── ansible/ │ ├── inventory/ │ │ └── hosts.ini │ ├── group_vars/ │ │ ├── all.yml │ │ └── elk.yml │ ├── roles/ │ │ ├── elasticsearch/ │ │ ├── logstash/ │ │ ├── kibana/ │ │ ├── filebeat/ │ │ ├── winlogbeat/ │ │ ├── suricata/ │ │ └── sysmon/ │ └── site.yml # Master playbook ├── logstash/ │ └── pipelines/ # Logstash pipeline configs ├── kibana/ │ └── dashboards/ # Exported Kibana dashboards ├── detection/ │ └── rules/ # Elastic SIEM detection rules (TOML/YAML) └── docs/ └── attack-simulations/ # Attack scenarios and expected alerts ``` ## 检测规则 自定义的 Elastic SIEM 规则涵盖: - SSH 暴力破解(失败的认证阈值) - 通过滥用 `sudo` 进行权限提升 - Web shell 检测(nginx + auditd 关联分析) - 可疑进程执行(通过 auditd/Sysmon) - 横向移动指标 ## 攻击模拟 `docs/attack-simulations/` 中的每个模拟文档均包含: 1. 攻击技术(MITRE ATT&CK ID) 2. 用于触发该技术的命令 3. 预期日志条目 4. 对应的检测规则 5. Kibana 中的 alert 截图 ## 路线图 有关完整的任务拆解,请参阅 [Issues](https://github.com/hubertwojcik/elk-siem-lab/issues)。 ## 相关项目 - [redteam-vs-blueteam-lab](https://github.com/hubertwojcik/redteam-vs-blueteam-lab) — 使用 Wazuh + Ansible 加固的对抗模拟 - [aws-network-traffic-analysis](https://github.com/hubertwojcik/aws-network-traffic-analysis) — AWS 上的 VPC Flow Logs + GuardDuty
标签:ELK Stack, Metaprompt, 内容过滤, 安全运营, 扫描框架, 系统提示词, 自动化运维, 越狱测试