Ensure that "Enable connecting to serial ports" configuration setting is disabled for all your production Google Compute Engine instances.
This rule resolution is part of the Conformity Security & Compliance tool for GCP.
A Google Cloud virtual machine (VM) instance has 4 virtual serial ports. On your VM instances, the operating system (OS), BIOS, and other system-level entities write often output data to the serial ports and can accept input, such as commands or answers, to prompts. Usually, these system-level entities use the first serial port (Port 1) and Serial Port 1 is often referred to as the interactive serial console. This interactive serial console does not support IP-based access restrictions such as IP address whitelists. If you enable the interactive serial console on your VM instance, clients can attempt to connect to your instance from any IP address and this allows anybody to access the instance if they know the user name, the SSH key, the project ID, and the instance name and zone. To adhere to cloud security best practices and reduce the risk of unauthorized access, interactive serial console support should be disabled for all instances used in production.
Audit
To determine if interactive serial console support is enabled for your Google Cloud virtual machine (VM) instances, perform the following operations:
Remediation / Resolution
To disable interactive serial console support for your production Google Compute Engine instances, perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- Compute Engine
- Interacting with the serial console
- CIS Security Documentation
- Securing Google Cloud Computing Platform
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud compute instances list
- gcloud compute instances describe
- gcloud compute instances add-metadata