Lateral movement

Service Account Privilege Escalation – Authentication Key Management (Resource Scope)

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 authentication keys, or provide access to existing ones. The service account can then utilize these keys 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: serviceusage.apiKeys.create, iam.serviceAccountKeys.create, storage.hmacKeys.create, iam.serviceAccounts.getAccessToken, iam.serviceAccounts.implicitDelegation, iam.serviceAccounts.signBlob, iam.serviceAccounts.signJwt, serviceusage.apiKeys.list