Skip to content

New attack technique: Overwrite a Cloud Function with Malicious Code (gcp.persistence.overwrite-cloud-function)#809

Open
Minosity-VR wants to merge 3 commits into
simon.marechal/gcp-persistence-create-workload-identity-federationfrom
simon.marechal/gcp-persistence-overwrite-cloud-function
Open

New attack technique: Overwrite a Cloud Function with Malicious Code (gcp.persistence.overwrite-cloud-function)#809
Minosity-VR wants to merge 3 commits into
simon.marechal/gcp-persistence-create-workload-identity-federationfrom
simon.marechal/gcp-persistence-overwrite-cloud-function

Conversation

@Minosity-VR
Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds a new GCP attack technique gcp.persistence.overwrite-cloud-function that replaces the source code of a Cloud Functions v2 function with code that exfiltrates runtime environment variables, simulating a supply-chain or insider attack.

Motivation

GCP parity effort with existing AWS techniques (analogous to aws.persistence.lambda-overwrite-code).

Checklist

  • The attack technique emulates a single attack step, not a full attack chain
  • We have factual evidence & references that the attack technique was used by real malware, pentesters, or attackers
  • The attack technique makes no assumption about the state of the environment prior to warming it up

Test results

  • Technique detonates successfully
  • Detection log identified (google.cloud.functions.v2.CloudFunctionsService.UpdateFunction)

@Minosity-VR Minosity-VR force-pushed the simon.marechal/gcp-persistence-create-workload-identity-federation branch from 95b153e to ce99272 Compare March 30, 2026 14:54
@Minosity-VR Minosity-VR force-pushed the simon.marechal/gcp-persistence-overwrite-cloud-function branch from bb682c1 to d552117 Compare March 30, 2026 14:54
@Minosity-VR Minosity-VR marked this pull request as ready for review April 1, 2026 07:26
@Minosity-VR Minosity-VR requested review from a team as code owners April 1, 2026 07:26
@Minosity-VR Minosity-VR force-pushed the simon.marechal/gcp-persistence-create-workload-identity-federation branch from ce99272 to 4322496 Compare April 1, 2026 08:29
@Minosity-VR Minosity-VR force-pushed the simon.marechal/gcp-persistence-overwrite-cloud-function branch from d552117 to d0d5122 Compare April 1, 2026 08:29
@Minosity-VR Minosity-VR force-pushed the simon.marechal/gcp-persistence-create-workload-identity-federation branch from 4322496 to 2496e57 Compare April 1, 2026 08:54
@Minosity-VR Minosity-VR force-pushed the simon.marechal/gcp-persistence-overwrite-cloud-function branch from d0d5122 to c8802ae Compare April 1, 2026 08:54
@Minosity-VR Minosity-VR force-pushed the simon.marechal/gcp-persistence-create-workload-identity-federation branch from 2496e57 to 363422b Compare April 1, 2026 09:04
@Minosity-VR Minosity-VR force-pushed the simon.marechal/gcp-persistence-overwrite-cloud-function branch from c8802ae to fb8f494 Compare April 1, 2026 09:04
Minosity-VR and others added 3 commits April 9, 2026 10:26
…(gcp.persistence.overwrite-cloud-function)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Minosity-VR Minosity-VR force-pushed the simon.marechal/gcp-persistence-create-workload-identity-federation branch from 363422b to 7b7c5db Compare April 9, 2026 08:28
@Minosity-VR Minosity-VR force-pushed the simon.marechal/gcp-persistence-overwrite-cloud-function branch from fb8f494 to 6998c92 Compare April 9, 2026 08:28
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.

1 participant