CCE-95469-3Platform: 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:
sudo can be configured to run only from a psuedo-pty
Rationale:
Attackers can run a malicious program using sudo which would fork a background process
that remains even when the main program has finished executing.
Audit:
Verify that sudo can only run other commands from a psuedo-pty
Run the following command:
# grep -Ei '^s*Defaultss+([^#]+,s*)?use_pty' /etc/sudoers
/etc/sudoers.d/*
Remediation:
edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo -f and add the following
line:
Defaults use_pty
Impact:
editing the sudo configuration incorrectly can cause sudo to stop functioning
Parameter:
[yes/No]
Technical Mechanism:
edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo -f and add the following
line:
Defaults use_pty
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:72915 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:84257 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:72809 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:72017 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:72383 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:68620 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:73020 |
SCAP Repo OVAL Definition | oval:org.secpod.oval:def:72706 |