Skip to content

Conversation

@shamo0
Copy link

@shamo0 shamo0 commented Jan 23, 2025

This PR adds two new files documenting enumeration and privilege escalation techniques for GCP Dataproc:

gcp_dataproc_enum.md: Covers techniques to enumerate Dataproc clusters, jobs, service accounts, and metadata tokens for gathering sensitive information.
gcp_dataproc_privesc.md: Explains how roles like dataproc.editor and dataproc.admin can be exploited for privilege escalation, including token leakage and job-based attacks.
image

@shamo0
Copy link
Author

shamo0 commented Jan 24, 2025

The specific permission that is being used in privesc is dataproc.jobs.create

@carlospolop
Copy link
Collaborator

carlospolop commented Jan 26, 2025

Hi @shamo0 !

Could you add on each privilege escalation technique in the PR all the granular permissions needed instead of the roles?

@shamo0
Copy link
Author

shamo0 commented Jan 26, 2025

In order to steal the metadata token, the SA needs to have permissions to copy the file to a GCP bucket and create a dataproc job.
The following permissions were give to the SA for the PoC

  • dataproc.clusters.get
  • dataproc.clusters.use
  • dataproc.jobs.create
  • dataproc.jobs.get
  • dataproc.jobs.list
  • storage.objects.create
  • storage.objects.get
  • storage.objects.list

@carlospolop
Copy link
Collaborator

Thanks!

@carlospolop carlospolop merged commit e9f3cb5 into HackTricks-wiki:master Jan 26, 2025
@shamo0
Copy link
Author

shamo0 commented Jan 27, 2025

@carlospolop does this qualify as extra points PR? 👀

github-actions bot pushed a commit that referenced this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants