CCE-95458-6Platform: cpe:/o:amazon:linux:2, cpe:/o:centos:centos:7, cpe:/o:oracle:linux:7, cpe:/o:oracle:linux:8, cpe:/o:redhat:enterprise_linux:7, cpe:/o:redhat:enterprise_linux:8, cpe:/o:redhat:enterprise_linux:9 | Date: (C)2021-03-05 (M)2023-07-04 |
Description:
An SSH public key is one of two files used in SSH public key authentication. In this
authentication method, a public key is a key that can be used for verifying digital signatures
generated using a corresponding private key. Only a public key that corresponds to a
private key will be able to authenticate successfully.
Rationale:
If a public host key file is modified by an unauthorized user, the SSH service may be
compromised
Audit:
Run the following command and verify Access does not grant write or execute permissions
to group or other for all returned files
# find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec stat {} ;
File: /etc/ssh/ssh_host_rsa_key.pub
Size: 382 Blocks: 8 IO Block: 4096 regular file
Device: ca01h/51713d Inode: 8631758 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2018-10-22 18:24:56.861750616 +0000
Modify: 2018-10-22 18:24:56.861750616 +0000
Change: 2018-10-22 18:24:56.881750616 +0000
Birth: -
File: /etc/ssh/ssh_host_ecdsa_key.pub
Size: 162 Blocks: 8 IO Block: 4096 regular file
Device: ca01h/51713d Inode: 8631761 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2018-10-22 18:24:56.897750616 +0000
Modify: 2018-10-22 18:24:56.897750616 +0000
Change: 2018-10-22 18:24:56.917750616 +0000
Birth: -
File: /etc/ssh/ssh_host_ed25519_key.pub
Size: 82 Blocks: 8 IO Block: 4096 regular file
Device: ca01h/51713d Inode: 8631763 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2018-10-22 18:24:56.945750616 +0000
Modify: 2018-10-22 18:24:56.945750616 +0000
Change: 2018-10-22 18:24:56.961750616 +0000
Birth: -
Remediation:
Run the following commands to set permissions and ownership on the SSH host public key
files
# find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chmod 0644 {}
;
#find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chown root:root
{} ;
Parameter:
[110100100, root, root]
Technical Mechanism:
Run the following commands to set permissions and ownership on the SSH host public key
files
# find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chmod 0644 {}
;
#find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chown root:root
{} ;
CCSS Severity: | CCSS Metrics: |
CCSS Score : 9.3 | Attack Vector: LOCAL |
Exploit Score: 2.5 | Attack Complexity: LOW |
Impact Score: 6.0 | Privileges Required: NONE |
Severity: CRITICAL | User Interaction: NONE |
Vector: AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H | Scope: CHANGED |
| Confidentiality: HIGH |
| Integrity: HIGH |
| Availability: HIGH |
| |
References: Resource Id | Reference |
---|
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:72695 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:71947 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:72904 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:84187 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:72798 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:68609 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:72313 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:73009 |