-
Notifications
You must be signed in to change notification settings - Fork 16
/
data.yaml
95 lines (79 loc) · 3.71 KB
/
data.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
metadata:
id: d63a2fd8-7ba2-5589-9899-23f99fd8c846
name: Ensure ‘Enable Connecting to Serial Ports’ Is Not Enabled for VM Instance
profile_applicability: '* Level 1'
description: |-
Interacting with a serial port is often referred to as the serial console, which is similar to using a terminal window, in that input and output is entirely in text mode and there is no graphical interface or mouse support.
If you enable the interactive serial console on an instance, clients can attempt to connect to that instance from any IP address.
Therefore interactive serial console support should be disabled.
rationale: |-
A virtual machine instance has four virtual serial ports.
Interacting with a serial port is similar to using a terminal window, in that input and output is entirely in text mode and there is no graphical interface or mouse support.
The instance's operating system, BIOS, and other system-level entities often write output to the serial ports, and can accept input such as commands or answers to prompts.
Typically, these system-level entities use the first serial port (port 1) and serial port 1 is often referred to as the serial console.
The interactive serial console does not support IP-based access restrictions such as IP whitelists.
If you enable the interactive serial console on an instance, clients can attempt to connect to that instance from any IP address.
This allows anybody to connect to that instance if they know the correct SSH key, username, project ID, zone, and instance name.
Therefore interactive serial console support should be disabled.
audit: |-
**From Google Cloud CLI**
1. Login to Google Cloud console
2. Go to Computer Engine
3. Go to VM instances
4. Click on the Specific VM
5. Ensure `Enable connecting to serial ports` below `Remote access` block is unselected.
**From Google Cloud Console**
Ensure the below command's output shows `null`:
```
gcloud compute instances describe <vmName> --zone=<region> --format="json(metadata.items[].key,metadata.items[].value)"
```
or `key` and `value` properties from below command's json response are equal to `serial-port-enable` and `0` or `false` respectively.
```
{
"metadata": {
"items": [
{
"key": "serial-port-enable",
"value": "0"
}
]
}
}
```
remediation: |-
**From Google Cloud CLI**
1. Login to Google Cloud console
2. Go to Computer Engine
3. Go to VM instances
4. Click on the Specific VM
5. Click `EDIT`
6. Unselect `Enable connecting to serial ports` below `Remote access` block.
7. Click `Save`
**From Google Cloud Console**
Use the below command to disable
```
gcloud compute instances add-metadata <INSTANCE_NAME> --zone=<ZONE> --metadata=serial-port-enable=false
```
or
```
gcloud compute instances add-metadata <INSTANCE_NAME> --zone=<ZONE> --metadata=serial-port-enable=0
```
**Prevention:**
You can prevent VMs from having serial port access enable by `Disable VM serial port access` organization policy:
[https://console.cloud.google.com/iam-admin/orgpolicies/compute-disableSerialPortAccess](https://console.cloud.google.com/iam-admin/orgpolicies/compute-disableSerialPortAccess).
impact: ''
default_value: ''
references: 1. https://cloud.google.com/compute/docs/instances/interacting-with-serial-console
section: Virtual Machines
version: '1.0'
tags:
- CIS
- GCP
- CIS 4.5
- Virtual Machines
benchmark:
name: CIS Google Cloud Platform Foundation
version: v2.0.0
id: cis_gcp
rule_number: '4.5'
posture_type: cspm