Intermediate Lab red team icon   GCP

Illuminate GCP by Fuzzing IAM Permissions

Leverage the testIAMPermission method to identify IAM permissions and gain situational awareness!

Description

The challenge revolves around leveraging the testIAMPermission method to identify IAM permissions and situational awareness. Increase access by exfiltrating data from Artifact Registry and identify additional resources!

Scenario

Your team is tasked with conducting a penetration test of Gigantic Retail Company. During the assessment, one of the penetration testers successfully identified an accidentally leaked GCP service account key and gained a foothold in the client's cloud environment. Your objective is to explore GCP and expand our access further.

Lab prerequisites
  • Proficiency in basic Linux command-line operations
  • Familiarity with fundamental GCP IAM concepts
  • Basic knowledge of scripting in Python and Bash
  • Familiarity with basic Docker usage
Learning outcomes
  • IAM permissions enumeration using testIamPermissions
  • Enumerate Artifact Registry
  • Enumerate Docker images
  • Leverage cloud storage naming conventions to access more resources
  • Understand how this could have been avoided
Real-world context

In real-world scenarios, you may lack permissions to list IAM policy permissions. In such situations, understanding alternative methods for enumerating permissions in GCP becomes crucial. Here, we leverage the testIAMPermission to brute-force potential permissions, allowing us to move laterally to other GCP services.

platform mock(1)

Cloud Security Training To Protect Your Business

Pwned Labs for Business gives your team access to dedicated business content, including labs and cyber ranges.

We also offer in-person or remote workshops, and our cloud penetration services are helping businesses become more secure!