New attack technique: Execute Commands on GCE Instances via OS Config Agent (gcp.execution.os-config-run-command) - #799
Open
Minosity-VR wants to merge 4 commits into
Conversation
Minosity-VR
force-pushed
the
simon.marechal/gcp-execution-modify-vertex-notebook-startup
branch
from
March 30, 2026 14:54
e311a77 to
525c891
Compare
Minosity-VR
force-pushed
the
simon.marechal/gcp-execution-os-config-run-command
branch
from
March 30, 2026 14:54
9824956 to
746d4d7
Compare
Minosity-VR
marked this pull request as ready for review
April 1, 2026 07:25
Minosity-VR
force-pushed
the
simon.marechal/gcp-execution-modify-vertex-notebook-startup
branch
from
April 1, 2026 08:28
525c891 to
8a37147
Compare
Minosity-VR
force-pushed
the
simon.marechal/gcp-execution-os-config-run-command
branch
from
April 1, 2026 08:28
746d4d7 to
14615f6
Compare
Minosity-VR
force-pushed
the
simon.marechal/gcp-execution-modify-vertex-notebook-startup
branch
from
April 1, 2026 08:53
8a37147 to
ccaf620
Compare
Minosity-VR
force-pushed
the
simon.marechal/gcp-execution-os-config-run-command
branch
from
April 1, 2026 08:53
14615f6 to
cfe3832
Compare
Minosity-VR
force-pushed
the
simon.marechal/gcp-execution-modify-vertex-notebook-startup
branch
from
April 1, 2026 09:04
ccaf620 to
626c9c0
Compare
Minosity-VR
force-pushed
the
simon.marechal/gcp-execution-os-config-run-command
branch
from
April 1, 2026 09:04
cfe3832 to
713bbd1
Compare
Minosity-VR
force-pushed
the
simon.marechal/gcp-execution-os-config-run-command
branch
from
April 9, 2026 08:28
713bbd1 to
586918f
Compare
Minosity-VR
force-pushed
the
simon.marechal/gcp-execution-modify-vertex-notebook-startup
branch
from
April 9, 2026 08:28
626c9c0 to
2889bcd
Compare
Base automatically changed from
simon.marechal/gcp-execution-modify-vertex-notebook-startup
to
simon.marechal/gcp-execution-modify-gce-startup-script
April 30, 2026 12:28
| log.Printf("Creating OSPolicyAssignment %s in %s to run a shell command on targeted instances\n", | ||
| assignmentId, parent) | ||
|
|
||
| _, err = svc.Projects.Locations.OsPolicyAssignments.Create( |
Contributor
There was a problem hiding this comment.
This yields:
2026/04/30 15:03:04 Error while detonating attack technique gcp.execution.os-config-run-command: failed to create OSPolicyAssignment: googleapi: Error 400: OS configuration management has been disabled in this project. To use this feature, enable full VM Manager functionality. See https://cloud.google.com/compute/docs/manage-os#enable-full-vmm for instructions., failedPrecondition
Minosity-VR
changed the base branch from
simon.marechal/gcp-execution-modify-gce-startup-script
to
main
April 30, 2026 13:25
Minosity-VR
changed the base branch from
main
to
simon.marechal/gcp-execution-modify-gce-startup-script
April 30, 2026 13:26
christophetd
force-pushed
the
simon.marechal/gcp-execution-os-config-run-command
branch
from
April 30, 2026 13:37
0ea7a99 to
0a07d72
Compare
… Agent (gcp.execution.os-config-run-command) 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>
Address PR feedback: detonation fails with failedPrecondition when OS Configuration Management is not enabled at the project level. Note this in the description and clarify that the API call still produces the CreateOSPolicyAssignment audit event, so the attempt remains detectable even when execution does not succeed.
christophetd
force-pushed
the
simon.marechal/gcp-execution-os-config-run-command
branch
from
April 30, 2026 13:49
0a07d72 to
2e65f9f
Compare
christophetd
changed the base branch from
simon.marechal/gcp-execution-modify-gce-startup-script
to
main
April 30, 2026 13:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
New attack technique:
gcp.execution.os-config-run-commandMotivation
GCP parity with existing AWS attack techniques.
Test results
stratus detonate gcp.execution.os-config-run-commandgoogle.cloud.osconfig.v1.OsConfigZonalService.CreateOSPolicyAssignmentappears in GCP audit logs (requires non-default DATA_WRITE audit logging forosconfig.googleapis.com)Checklist