aws-security-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAWS Security Review
AWS 安全审查
A structured audit of an AWS account or organization.
对 AWS 账户或组织进行结构化审计。
1. IAM Deep Dive
1. IAM 深入分析
- Enumerate users, roles, policies (identity + resource + permission boundaries)
- Hunt privilege escalation paths: ,
iam:CreatePolicyVersion+iam:PassRole/lambda creation,ec2:RunInstanceschains,sts:AssumeRoleiam:SetDefaultPolicyVersion - Wildcard actions/resources on trust boundaries; with
NotActiontrapsEffect: Allow - Unused credentials, access keys older than 90 days, no rotation
- Check trust policies: roles assumable by or by external account IDs
*
- 枚举用户、角色、策略(identity + resource + permission boundary)
- 排查权限提升路径:、
iam:CreatePolicyVersion+iam:PassRole/Lambda 创建、ec2:RunInstances链、sts:AssumeRoleiam:SetDefaultPolicyVersion - 信任边界上的通配符 action/resource;使用 的
Effect: Allow陷阱NotAction - 未使用的凭据、超过 90 天未轮换的 access key
- 检查 trust policy:可由 或外部账户 ID 扮演的角色
*
Tools
工具
- ,
scoutSuite,prowler(privilege escalation graph),pmapper(least-privilege diffs)cloudsplaining
- 、
scoutSuite、prowler(权限提升图谱)、pmapper(最小权限差异分析)cloudsplaining
2. Exposure Review
2. 暴露面审查
- S3: public buckets/block public access at account level; ACLs vs bucket policy conflicts
- EBS/RDS/redshift snapshots: shared or public
- Load balancers/security groups: on management ports (22/3389), database ports exposed
0.0.0.0/0 - API Gateway, Lambda function URLs, Elasticsearch/OpenSearch domains with open access policies
- S3:公共 bucket/账户级 block public access;ACL 与 bucket policy 冲突
- EBS/RDS/Redshift 快照:共享或公开
- Load Balancer/security group:管理端口(22/3389)允许 ,数据库端口暴露
0.0.0.0/0 - API Gateway、Lambda function URL、Elasticsearch/OpenSearch domain 配置了开放访问策略
3. Encryption and Data
3. 加密与数据
- Default encryption on S3/EBS/RDS; KMS key policies scoped correctly
- Secrets Manager vs hardcoded values in env vars committed to IaC
- CloudTrail: multi-region, log file validation, no public bucket; GuardDuty enabled
- S3/EBS/RDS 启用 default encryption;KMS key policy 的作用域配置正确
- Secrets Manager 与提交至 IaC 的环境变量中硬编码值的对比检查
- CloudTrail:多区域、日志文件验证、无公共 bucket;启用 GuardDuty
4. Network
4. 网络
- VPC flow logs on; NAT gateway vs IGW placement for private subnets
- Peering/transit gateway routes leaking ranges
- Public subnets hosting workloads that should be private
- 启用 VPC flow log;检查 private subnet 中 NAT gateway 与 IGW 的部署位置
- Peering/transit gateway 路由泄露地址范围
- Public subnet 承载本应为 private 的 workload
5. Workload Identity
5. Workload Identity
- EC2 instance profiles over long-lived keys; EKS IRSA / pod identity
- Tasks/containers without privileged modes; metadata service v2 enforced
- 使用 EC2 instance profile 代替长期有效的 key;EKS IRSA/pod identity
- 未以 privileged mode 运行的 task/container;强制使用 metadata service v2
Output
输出
Ranked findings: exposure (public data/ports), privilege escalation chains (with -style path evidence), logging gaps, and remediation mapped to specific policy/resource ARNs.
pmapper按风险排序的发现:暴露面(公共数据/端口)、权限提升链(附带 风格的路径证据)、日志记录缺口,以及映射到具体 policy/resource ARN 的修复建议。
pmapper