All hands-on labs

Premium Hands-on labintermediatered teamAWS

IAM PutUserPolicy PrivEsc

Exploit iam:PutUserPolicy to grant yourself 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.

  • 7 guided tasks
  • Capture the flag
  • Terminal in the browser

Scenario

This lab has been misconfigured, so exploit it with iam:PutUserPolicy to grant yourself Secrets Manager permissions.

You've successfully completed this lab once you've submitted the secret value!

What you will learn

  • Configure the AWS CLI with the keys the lab gives you
  • Enumerate your IAM user and read the one action its policy allows
  • Use iam:PutUserPolicy to attach a new inline policy to your own user
  • Reach a Secrets Manager secret that you could not read before
  • Submit the secret value to capture the flag
Hands-on lab

IAM PutUserPolicy PrivEsc

Included in Cybr Premium.