All hands-on labs

Premium Hands-on labintermediatered teamAWS

IAM AttachGroupPolicy PrivEsc

Exploit iam:AttachGroupPolicy to grant yourself (and your group) higher privileges with AWS managed policies. 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.

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

Scenario

This lab has been misconfigured, so exploit it with iam:AttachGroupPolicy to grant yourself Secrets Manager permissions. With this permission, you can assign managed policies to entire groups instead of just individual users.

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, its permission boundary, and your group with the AWS CLI
  • Find the inline policy that allows iam:AttachGroupPolicy
  • Abuse iam:AttachGroupPolicy to attach a managed policy to your group
  • Read the flag from Secrets Manager and submit it
Hands-on lab

IAM AttachGroupPolicy PrivEsc

Included in Cybr Premium.