14 thẻ
PassRole leo thang
`iam:PassRole` trên `*` + tạo Lambda/EC2 → chạy code dưới role mạnh hơn; giới hạn ARN và `iam:PassedToService`
Quyền IAM nguy hiểm khác
`CreatePolicyVersion`, `Attach/PutRolePolicy` trên chính mình, `UpdateAssumeRolePolicy`, `lambda:UpdateFunctionCode`, `ssm:SendCommand`, `CreateAccessKey` cho user khác
Access Analyzer trong CI
`check-no-new-access` (PR có cấp thêm quyền?), `check-access-not-granted` (có cấp hành động nhạy cảm?)
PMapper
dựng đồ thị principal; `pmapper query "preset privesc *"` tìm principal leo được lên admin
Trust policy OIDC GitHub
`aud = sts.amazonaws.com` + `sub` theo repo và environment có reviewer; không wildcard `repo:org/*`
SCP vs RCP
SCP giới hạn principal của bạn; RCP (11/2024) giới hạn tài nguyên của bạn, áp cả principal ngoài organization
S3 chống lộ
Block Public Access cấp account, ACL tắt, không `Principal: "*"`, CloudFront + OAC, presigned URL ngắn hạn
Secret nơi hay lộ
biến môi trường Lambda, `environment` của ECS task definition, Terraform state, output CloudFormation, access key IAM user
Prowler
`prowler aws --profile <chỉ-đọc> --services s3 iam --severity critical high`; `--list-compliance` để chọn framework
Security Hub (GA 12/2025)
tương quan GuardDuty, Inspector, CSPM thành exposure findings; GuardDuty Extended Threat Detection gom attack sequence
Cấu hình xoá ranh giới container
`privileged`, `hostPath: /`, mount `docker.sock`, `hostPID`/`hostNetwork`, `SYS_ADMIN`
RBAC nguy hiểm
`create pods` (mount mọi secret, dùng SA khác), `list secrets`, `escalate`, `bind`, `impersonate`, `pods/exec`, `nodes/proxy`
Rà quyền SA
`kubectl auth can-i --list --as system:serviceaccount:<ns>:<sa>`; workload không cần API thì `automountServiceAccountToken: false`
EKS và IMDS
Pod Identity/IRSA cho workload; IMDSv2 hop limit 1 hoặc NetworkPolicy chặn `169.254.169.254/32`; access entries thay `aws-auth`