Mitiga discovers potential hidden dangers in Google Cloud Platform’s (GCP) cloud control plane
Mitiga has uncovered potential hidden dangers in the Cloud Control Plane, with the company saying that there may be significant risk in cloud development caused by not recognising the differences between cloud and traditional definitions of common architecture terms.
In a recently published blog, the company says there is a potentially dangerous vulnerability in Google Cloud Platform's (GCP) cloud control plane, with new techniques being used by attackers to create sophisticated cloud compromises.
Research was conducted on the state of Google Cloud Platform's Compute virtual machine (VM) service. When examining the application programming interface (API) exposed by GCP for the Compute VM service, the research found discrepancies with the getSerialPortOutput() configuration.
Findings also revealed that the cloud control plane would allow researchers to read data from serial ports, but from the VM's perspective, writing to a serial port was a local action in that it did not require connectivity to a foreign system.
After a further set of tests involving internal traffic and enablement, it was discovered that GCP Compute VMs enabled users with appropriate permissions to modify machine metadata at runtime using the setMetadata API method. The data reflected that many scenarios could lead to a series of possible entry points for attackers, with low permission availability of certain points sparking serious cause for concern.
After discovering the concerns around API methods, Mitiga reached out to Google's Vulnerability Research Program (VRP) to inform them of the findings, suggesting the following actions be taken:
- Validate that getSerialPortOutput couldn't be used to bypass Google's metering for external network communication.
- Restrict getSerialPortOutput to only higher-tiered roles and/or enable users to disable the API for a specific instance or project-wide.
- Enable users to disable the addition or alteration of Compute VM metadata at runtime, either for a specific instance or project-wide.
- Alter documentation to make it more clear that firewalls and other network controls do not entirely restrict access to VMs, and make it clear that GCP credentials with appropriate permissions enable command and control of systems without access to the subnet in which the VM resides.
Google Cloud acknowledged that certain portions of their documentation could be made clearer, and agreed to make changes to documentation indicating that the control plane can access VMs regardless of firewall settings.
They also worked closely with the security researchers on improving the documentation in case other customers, like them, had understood that firewalls would prevent access from Google.
It was also confirmed by the company that access described in the report is allowed. They say an attack from this vector requires privileged access, and if someone already had privileged access then it's unlikely that they would pick the metadata server as their attack method.
Mitiga recommended users gain a clear understanding of the risks involved in these types of systems, and suggests a number of tips to help carefully analyse and prepare a GCP environment. This includes not using built-in roles, considering adding an IAM deny policy for Compute users, and evaluating whether dangerous functionality is necessary.
They also recommend all customers enable VPC-SC where possible to prevent unauthorised access, and to run applications or services using low-privileged users.
Additionally, Google Cloud says customers can use VPC-SC to protect against ingress access via cloud console to GCP resources it protects (e.g. the GCE VM and its serial output).