Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud Security Engineer practice bank has 1,343 more like it. Try 10 free: instant score, no account.
An enterprise hosts a customer-facing application on Google Compute Engine virtual machines. During a penetration test, security analysts discover a Server-Side Request Forgery (SSRF) vulnerability that allows external actors to inject custom HTTP request headers and query the instance metadata server (http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token). The red team demonstrated that by stealing the default Compute Engine service account token, they could leverage overly broad IAM permissions to modify the instance startup-script metadata on other production virtual machines, achieving remote code execution and privilege escalation.
Which strategy should the security engineer implement to remediate this attack vector and detect subsequent exploitation attempts?
Cloud Storage Bucket Lock enforces immutable write-once-read-many (WORM) retention policies on storage buckets, and Binary Authorization enforces signature validation on container images before deployment to Google Kubernetes Engine or Cloud Run.
http://metadata.google.internal).compute.instances.setMetadata API calls to inject malicious code into VM startup scripts.The objective was to ensure compliance retention for audit logs in Cloud Storage and enforce container image signing policies within a GKE cluster.
169.254.169.254.A VPC firewall egress rule allows administrators to filter outbound traffic leaving Compute Engine VM instances based on protocol, port, and destination IP address blocks.
169.254.169.254 provides critical operational telemetry, internal DNS resolution, OS Login keys, activation licenses, and guest environment management. Completely blocking egress to this link-local address halts VM initialization and management agents.169.254.169.254 and metadata.google.internal) are required for the Compute Engine Guest Environment.The destination were an untrusted external public IP address or unauthorized internal RFC 1918 database subnet rather than the essential internal metadata endpoint.
Metadata-Flavor: Google header check on the metadata server and deploy Cloud IDS to block Layer 7 HTTP requests targeted at 169.254.169.254.The Metadata-Flavor: Google header is a built-in server-side validation check required by the Google Cloud metadata server (v1) to prevent blind SSRF attacks. Cloud IDS is a managed intrusion detection service that monitors mirrored VPC network traffic for Layer 7 threats.
Metadata-Flavor: Google, the metadata server will fulfill the request and release access tokens.The application were only vulnerable to simple blind SSRF without header manipulation, and the requirement asked only for traffic inspection rather than inline remediation and privilege restriction.
Compute Engine Admin Added Startup Script findings.This strategy combines least-privilege IAM identity governance with native threat detection via Security Command Center Event Threat Detection (ETD) to eliminate lateral privilege escalation and monitor unauthorized instance metadata modifications.
roles/editor) role by default. Replacing it with a custom service account containing only minimal data plane permissions ensures that any stolen access token cannot be used to modify other cloud resources or escalate privileges.compute.instances.setMetadata permission ensures compromised tokens cannot alter VM configuration attributes like startup-script or ssh-keys.Compute Engine Admin Added Startup Script when metadata changes occur on established instances.While technical safeguards such as the Metadata-Flavor: Google header mitigate basic SSRF, an attacker with full header injection can still query metadata endpoints. Restricting the underlying IAM role and auditing metadata updates via ETD provides robust, defense-in-depth protection against privilege escalation.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated