Lalith012/aws-detection-lab

GitHub: Lalith012/aws-detection-lab

这是一个基于AWS原生服务的检测工程与威胁狩猎实验室,用于构建和测试云安全检测规则。

Stars: 0 | Forks: 0

# AWS 检测工程与威胁狩猎实验室 ![状态](https://img.shields.io/badge/Status-Active%20Development-brightgreen) ![AWS](https://img.shields.io/badge/AWS-CloudTrail%20%7C%20GuardDuty%20%7C%20Security%20Hub-orange) ![Python](https://img.shields.io/badge/Python-3.14-blue) ![框架](https://img.shields.io/badge/Framework-MITRE%20ATT%26CK-red) ![许可证](https://img.shields.io/badge/License-MIT-lightgrey) ## 项目展示内容 - 构建从原始AWS日志到可操作发现结果的检测管道 - 在受控的AWS环境中模拟真实攻击者的战术、技术和程序(TTP) - 编写映射到MITRE ATT&CK技术的自定义检测规则 - 使用Python自动化和Splunk SPL查询进行威胁狩猎 - 整合AWS原生服务的安全发现 ## 架构 ![架构图](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/69b1823638133323.png) 本实验室实现了一个完整的检测管道: **攻击层** — 在自有基础设施上模拟真实的MITRE ATT&CK技术 **收集层** — AWS CloudTrail捕获所有API活动,存储于S3 **检测层** — GuardDuty托管检测 + 带有风险评分的自定义Python检测引擎 **分析层** — Sigma规则转换为SPL,带有实时发现结果的Splunk仪表板 **框架** — 所有检测均映射到MITRE ATT&CK技术 ``` --- ## MITRE ATT&CK 覆盖范围 | Technique ID | Technique Name | Tactic | Detection Status | |-----------|--------------------------------|----------------|----------------------| | T1078.004 | Valid Accounts: Cloud Accounts | Initial Access | ✅ Detected + Splunk | | T1087.004 | Account Discovery: Cloud Account | Discovery | ✅ Detected + Splunk | | T1530 | Data from Cloud Storage | Collection | ✅ Detected + Splunk | | T1562.008 | Impair Defenses: Disable Cloud Logs | Defense Evasion | ✅ Detected + Splunk | | T1548 | Abuse Elevation Control | Privilege Escalation | ✅ Simulated + Splunk | --- ## 仓库结构 **src/detection_engine/** — Core detection logic (CloudTrail analyzer, rule engine, timeline builder) **src/threat_hunting/** — Threat hunting scripts and notebooks **rules/sigma/** — Sigma detection rules mapped to MITRE ATT&CK **simulations/attack_scenarios/** — Documented attack simulations (IAM recon, S3 exfiltration, CloudTrail disable) **findings/reports/** — Detection findings and JSON evidence files **findings/screenshots/** — Evidence screenshots including Splunk dashboard **diagrams/** — Architecture diagrams **docs/** — Full documentation (setup guide, architecture decisions, attack scenarios, MITRE mapping) **tests/** — Unit tests **.env.example** — Environment variable template **requirements.txt** — Python dependencies **DISCLAIMER.md** — Legal disclaimer --- ## 技术栈 | Category | Technology | |---|---| | Cloud Platform | AWS (CloudTrail, GuardDuty, Security Hub, S3, IAM) | | Detection Engine | Python 3.14, boto3 | | Detection Rules | Sigma Rules | | SIEM | Splunk (Free Tier) | | Infrastructure as Code | Terraform | | Frameworks | MITRE ATT&CK | | Version Control | Git, GitHub | --- ## 跨云等效项 | AWS Service | Azure Equivalent | GCP Equivalent | |---|---|---| | CloudTrail | Azure Monitor / Activity Logs | Cloud Audit Logs | | GuardDuty | Microsoft Defender for Cloud | Security Command Center | | Security Hub | Microsoft Sentinel | Chronicle SIEM | | IAM | Azure AD / Entra ID | Cloud IAM | | S3 | Azure Blob Storage | Cloud Storage | --- ## 设置 ### 先决条件 - AWS Account (Free Tier) - Python 3.10+ - AWS CLI configured - Docker (for local services) ### 安装 ```bash # 克隆仓库 git clone https://github.com/Lalith012/aws-detection-lab.git cd aws-detection-lab # 创建虚拟环境 python -m venv venv venv\Scripts\activate # Windows source venv/bin/activate # Linux/Mac # 安装依赖项 pip install -r requirements.txt # 配置环境 copy .env.example .env # 使用 AWS 凭证编辑 .env 文件 ``` ## 项目状态 | 阶段 | 描述 | 状态 | |---|---|---| | 阶段1 | 仓库设置与文档编写 | ✅ 已完成 | | 阶段2 | CloudTrail、安全中心、检测引擎 | ✅ 已完成 | | 阶段3 | 攻击模拟 — IAM侦察、S3数据泄露、CloudTrail禁用 | ✅ 已完成 | | 阶段4 | 高级Python检测引擎 | ✅ 已完成 | | 阶段5 | Sigma规则、Splunk集成、检测仪表板 | ✅ 已完成 | | 阶段6 | 完整文档与图表 | ✅ 已完成 | ## 免责声明 本仓库中展示的所有技术均在作者拥有的基础设施上执行。完整详情请参阅[免责声明.md](DISCLAIMER.md)。 ## 作者 **Lalith** [GitHub](https://github.com/Lalith012)
标签:AMSI绕过, AWS 原生安全, Cloudflare, CloudTrail, CSV导出, GuardDuty, MITRE ATT&CK, Python, Security Hub, Sigma 规则, TTP 模拟, 中央化安全监控, 云威胁检测, 域名分析, 威胁检测, 安全实验室, 安全工程, 安全日志分析, 攻击模拟, 无后门, 检测管道, 漏洞利用检测, 结构化查询, 自动化安全, 逆向工具, 风险评分, 驱动签名利用