IAM Pri-escalation

Pacu

run iam__enum_permissions

whoami

run iam__enum_permissions

Vulnerable Lamda

1. The Vulnerability

The vulnerability lies in misconfigured permissions, specifically in the Trust Policy or the permissions granted to the user or principal. Here’s a detailed breakdown of the potential vulnerabilities:

1. Misconfigured Trust Policy of the Role

The trust policy of the role cg-lambda-invoker-vulnerable_lambda_cgidbdmusq6y4k could allow unauthorized or overly broad access. Trust policies determine which principals (users, roles, or services) can assume a specific IAM role.

Potential Misconfigurations:

Overly Broad Principal Permissions:

"Principal": {
"AWS": "*"
}