Skip to content
Misconfiguration Write-up Intermediate

Apps Script project impersonation / Google Apps Script persistence

An attacker with permission to create GCP projects can create a project that mimics the naming convention of Google Apps Script projects and place it in the hidden apps-script folder, making it invisible in the GCP console. This hidden project can then be used to host malicious resources such as cryptomining instances or to create service accounts for stealthy persistence.

hackingthe.cloud

Published on hackingthe.cloud

Ghost in the Script: Impersonating Google App Script projects for stealthy persistence by Bleon Proko and Jakub Pavlik.

The author, on hackingthe.cloud

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the lack of restrictions on project naming and folder placement allows users to create projects that mimic the hidden Apps Script projects, which are not shown in the console.

Impact

An attacker could host malicious resources such as cryptomining instances undetected and establish long-term persistence via a privileged service account, though this requires specific permissions and may be limited by billing requirements for compute resources.

What the attacker needed

Resourcemanager.projects.create permission; billing account for cryptomining

The fix

Implement a custom organization policy that denies the creation of projects with an ID matching the Apps Script format, though this will also block legitimate Apps Script projects.

How it was found

  1. Create a project with an ID that matches the Apps Script format and place it in the apps-script folder.
  2. Link the project to a billing account (for cryptomining).
  3. Create a large compute instance for cryptomining.
  4. Create a service account inside the hidden project.
  5. Bind the service account to a privileged role at the organization level.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Google Apps Script is a tool for automating Google apps. When you use it, Google automatically creates a hidden cloud project for you. The report shows that someone with the right permissions can create their own project that looks just like these hidden ones, so it stays out of sight. They can then use it to run hidden computers or keep secret access.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.