Lateral movement

Service Account Privilege Escalation – Service Creation (Resource Scope)

Risk Level

Hazardous (3)

Platform(s)
Compliance Frameworks

Description

The Service account '{GcpIamServiceAccount}' has an IAM policy containing permissions that allow privilege escalation, at the resource level ({GcpIamServiceAccount.PolicyBindings.Policy.Scope}). One or more of the existing permissions allow the service account to create new services with higher permissions than their own. The service account can then utilize these services to perform API calls that the service account may not be authorized to perform. The role containing these permissions is '{GcpIamServiceAccount.PolicyBindings.Role}'
  • Recommended Mitigation

    Evaluate the Service Account's permissions and consider removing the binding to {GcpIamServiceAccount.PolicyBindings.Role} or the following permissions: cloudbuild.builds.create, deploymentmanager.deployments.create, cloudfunctions.functions.create, compute.instances.create, run.services.create, cloudscheduler.jobs.create