IAM PutGroupPolicy PrivEsc
Exploit iam:PutGroupPolicy to grant yourself (and your group) higher privileges with a custom and inline policy. Using your new privileges, gain access to a secret value stored in Secrets Manager that your IAM user should not have been able to access. Complete the lab by submitting the secret value as the flag.
- 9 guided tasks
- Capture the flag
- Terminal in the browser

Scenario
The prior lab showed how we can exploit custom and inline IAM policies to grant users elevated privileges (potentially even admin privileges), by uploading a JSON document. This lab is similar except it leverages iam:PutGroupPolicy to upload custom policy documents to entire groups.
This lab has been misconfigured, so exploit it with iam:PutGroupPolicy to grant your group Secrets Manager permissions.
You've successfully completed this lab once you've submitted the secret value as the flag!
What you will learn
- Configure the AWS CLI with the keys the lab gives you
- Enumerate your IAM user, groups, and their policies with the AWS CLI
- Find the group inline policy that allows iam:PutGroupPolicy
- Abuse iam:PutGroupPolicy to add a new policy to your group
- Read the flag from Secrets Manager and submit it