feat(iam): add ECS privilege escalation patterns to IAM checks (#8541)

This commit is contained in:
Andoni Alonso
2025-08-20 09:23:30 +02:00
committed by GitHub
parent f77897f813
commit 3c599a75cc
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -11,6 +11,8 @@ All notable changes to the **Prowler SDK** are documented in this file.
- Bedrock AgentCore privilege escalation combination for AWS provider [(#8526)](https://github.com/prowler-cloud/prowler/pull/8526)
- Remove standalone iam:PassRole from privesc detection and add missing patterns [(#8530)](https://github.com/prowler-cloud/prowler/pull/8530)
- `eks_cluster_deletion_protection_enabled` check for AWS provider [(#8536)](https://github.com/prowler-cloud/prowler/pull/8536)
- ECS privilege escalation patterns (StartTask and RunTask) for AWS provider [(#8541)](https://github.com/prowler-cloud/prowler/pull/8541)
### Changed
- Refine kisa isms-p compliance mapping [(#8479)](https://github.com/prowler-cloud/prowler/pull/8479)
@@ -106,6 +106,18 @@ privilege_escalation_policies_combination = {
"bedrock-agentcore:CreateCodeInterpreter",
"bedrock-agentcore:InvokeCodeInterpreter",
},
# ECS-based privilege escalation patterns
# Reference: https://labs.reversec.com/posts/2025/08/another-ecs-privilege-escalation-path
"PassRole+ECS+StartTask": {
"iam:PassRole",
"ecs:StartTask",
"ecs:RegisterContainerInstance",
"ecs:DeregisterContainerInstance",
},
"PassRole+ECS+RunTask": {
"iam:PassRole",
"ecs:RunTask",
},
# TO-DO: We have to handle AssumeRole just if the resource is * and without conditions
# "sts:AssumeRole": {"sts:AssumeRole"},
}