GCP - Serviceusage Privesc
Last updated
Last updated
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
The following permissions are useful to create and steal API keys, not this from the docs: An API key is a simple encrypted string that identifies an application without any principal. They are useful for accessing public data anonymously, and are used to associate API requests with your project for quota and billing.
Therefore, with an API key you can make that company pay for your use of the API, but you won't be able to escalate privileges.
To learn other permissions and ways to generate API keys check:
GCP - Apikeys Privescserviceusage.apiKeys.create
An undocumented API was found that can be used to create API keys:
serviceusage.apiKeys.list
Another undocumented API was found for listing API keys that have already been created (the API keys appears in the response):
serviceusage.services.enable
, serviceusage.services.use
With these permissions an attacker can enable and use new services in the project. This could allow an attacker to enable service like admin or cloudidentity to try to access Workspace information, or other services to access interesting data.