reggied2758/aws-cloud-security-monitoring-platform

GitHub: reggied2758/aws-cloud-security-monitoring-platform

一个基于 AWS 原生安全服务并通过 Terraform 和 Serverless 架构实现威胁检测、安全发现集中管理与事件驱动自动化处理的云安全监控平台。

Stars: 0 | Forks: 0

# AWS 云安全监控平台 ## 概述 本项目展示了如何使用基础设施即代码(Terraform)和 Serverless 自动化,来设计和部署一个 AWS 原生的云安全监控平台。 该平台可持续监控 AWS 资源,检测安全威胁,汇总安全发现,并使用 AWS 托管安全服务自动处理安全事件。 当生成安全发现时,Amazon EventBridge 会自动调用 AWS Lambda 函数,该函数会从发现中提取关键信息,并将其存储在 Amazon DynamoDB 中,以实现集中化的安全监控和未来的事件分析。 本项目展示了使用 AWS 的实用云安全工程、安全运营、基础设施即代码 以及事件驱动的安全自动化实践。 # 项目目标 本项目的构建旨在: - 持续监控 AWS 资源的安全威胁 - 检测恶意活动和可疑行为 - 汇总来自 AWS 安全服务的发现 - 自动化处理安全发现 - 集中管理安全事件数据 - 提升云基础设施的可见性 - 展示使用 Terraform 的基础设施即代码 - 展示实用的云安全工程技术 # 架构 ``` flowchart TD A[AWS Account] A --> B[AWS CloudTrail] B --> C[Amazon GuardDuty] C --> D[AWS Security Hub] D --> E[Amazon EventBridge] E --> F[AWS Lambda] F --> G[Amazon DynamoDB] F --> H[Amazon CloudWatch Logs] ``` # 事件流 1. AWS CloudTrail 记录整个 AWS 账户内的活动。 2. Amazon GuardDuty 持续分析 CloudTrail 日志并检测可疑活动。 3. GuardDuty 将发现发送到 AWS Security Hub。 4. Amazon EventBridge 捕获 Security Hub 的发现。 5. EventBridge 自动调用 AWS Lambda 函数。 6. Lambda 从发现中提取重要信息。 7. 将事件存储在 Amazon DynamoDB 中。 8. CloudWatch Logs 记录 Lambda 的执行情况,以便进行审计和故障排查。 # 功能 - 完全使用 Terraform 部署的基础设施 - AWS CloudTrail 日志记录 - Amazon GuardDuty 威胁检测 - AWS Security Hub 安全汇总 - Amazon EventBridge 事件驱动自动化 - AWS Lambda Serverless 处理 - Amazon DynamoDB 事件存储 - CloudWatch 日志记录 - GitHub Actions CI/CD 部署 - 自动处理并存储安全发现 # 使用的 AWS 服务 | 服务 | 用途 | |----------|---------| | Terraform | 基础设施即代码 | | GitHub Actions | 持续部署 | | AWS CloudTrail | AWS API 活动日志记录 | | Amazon GuardDuty | 威胁检测 | | AWS Security Hub | 集中化安全发现 | | Amazon EventBridge | 事件路由 | | AWS Lambda | 自动化事件处理 | | Amazon DynamoDB | 安全事件存储 | | Amazon CloudWatch | 日志记录与监控 | | AWS IAM | 身份与访问管理 | | Amazon S3 | Terraform 远程状态 | # 仓库结构 ``` aws-cloud-security-monitoring-platform/ ├── .github/ │ └── workflows/ │ └── terraform.yml │ ├── lambda/ │ ├── lambda_function.py │ └── lambda_function.zip │ ├── backend.tf ├── cloudtrail.tf ├── config.tf ├── dynamodb.tf ├── eventbridge.tf ├── guardduty.tf ├── iam.tf ├── lambda.tf ├── main.tf ├── s3.tf ├── securityhub.tf ├── sns.tf │ ├── README.md └── .gitignore ``` # 部署说明 克隆仓库: ``` GitHub: https://github.com/reggied2758/aws-cloud-security-monitoring-platform ``` 初始化 Terraform: ``` terraform init ``` 验证配置: ``` terraform validate ``` 预览部署: ``` terraform plan ``` 部署基础设施: ``` terraform apply ``` # 测试 生成一个 GuardDuty 样本发现。 预期的工作流程如下: ``` GuardDuty ↓ Security Hub ↓ EventBridge ↓ Lambda ↓ DynamoDB ``` 验证: - Security Hub 接收到该发现 - EventBridge 触发了 Lambda - Lambda 成功执行 - CloudWatch 日志包含执行记录 - DynamoDB 存储了该事件 # DynamoDB 记录示例 | 属性 | 示例 | |------------|---------| | FindingId | arn:aws:securityhub:... | | Title | Recon:EC2/PortProbeUnprotectedPort | | Severity | HIGH | | Region | eu-west-2 | | Status | Open | | CreatedAt | 2025-07-25T12:00:00Z | # 展示技能 - AWS 云安全 - 云安全监控 - 基础设施即代码 - Serverless 计算 - 事件驱动架构 - 安全运营 - AWS IAM - 威胁检测 - 云日志记录 - GitHub Actions CI/CD - 安全自动化 # 未来增强功能 计划的改进包括: - 自动化事件响应 - 针对严重发现的 EC2 隔离 - 基于严重程度的工作流 - Slack 通知 - 使用 API Gateway 的 REST API - React 安全仪表板 - 事件管理工作流 - CloudWatch 警报 - AWS X-Ray 追踪 # 截图 该仓库包含以下演示截图: - GuardDuty 发现 - Security Hub 发现 - EventBridge 规则 - Lambda 执行 - CloudWatch 日志 - DynamoDB 事件存储 # 作者 **Reginald Quarshie** AWS 云安全工程作品集项目
标签:AMSI绕过, AWS, DPI, ECS, Terraform, 威胁检测, 安全运营, 扫描框架, 自动化响应, 逆向工具, 速率限制