IAM Privilege Escalation in GCP
Table of Contents
- The
PrivEscScanner
Folder- Contains a permissions enumerator for all members in a GCP account and an associated privilege escalation scanner that reviews the permissions in search of privilege escalation vulnerabilities.
- First run enumerate_member_permissions.py to enumerate all members and permissions and then run check_for_privesc.py to check for privilege escalation in the environment.
- The
ExploitScripts
Folder- Contains exploit scripts for each of the privilege escalation methods outlined in the blog post, as well as a Cloud Function and Docker image for some of the methods that require them.
For more information on these privilege escalation methods, how to exploit them, the permissions they require, and more, see the blog posts on our website: Part 1 and Part 2
Current List of GCP IAM Privilege Escalation Methods
cloudbuilds.builds.create
: Script / Blog Postdeploymentmanager.deployments.create
: Script / Blog Postiam.roles.update
: Script / Blog Postiam.serviceAccounts.getAccessToken
: Script / Blog Postiam.serviceAccountKeys.create
: Script / Blog Postiam.serviceAccounts.implicitDelegation
: Script / Blog Postiam.serviceAccounts.signBlob
: Script / Blog Postiam.serviceAccounts.signJwt
: Script / Blog Postcloudfunctions.functions.create
: Script / Blog Postcloudfunctions.functions.update
: Script / Blog Postcompute.instances.create
: Script / Blog Postrun.services.create
: Script / Blog Postcloudscheduler.jobs.create
: Blog Postorgpolicy.policy.set
: Script / Blog Poststorage.hmacKeys.create
: Script / Blog Postserviceusage.apiKeys.create
: Script / Blog Postserviceusage.apiKeys.list
: Script / Blog Post