THIS IS STILL A WORK-IN-PROGRESS...
Part 3 of a 3 part series. In this part we will take a look at the individual findings from the DISA STIG based OpenSCAP Evaluation Report we generated in the previous article, and see what needs to be done to correct these rule violations.
☐ To streamline the iterative process of fixing and re-scanning the system to verify our corrections we will temporarily enable a web server on the RHEL 9.x server we are working on. Follow the commands below in bold.
Updating Subscription Management repositories.
Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs) 9.7 kB/s | 4.5 kB 00:00
Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs) 12 kB/s | 4.1 kB 00:00
Red Hat CodeReady Linux Builder for RHEL 9 x86_64 (RPMs) 14 kB/s | 4.5 kB 00:00
Dependencies resolved.
====================================================================================================
Package Arch Version Repository Size
====================================================================================================
Installing:
httpd x86_64 2.4.62-13.el9 rhel-9-for-x86_64-appstream-rpms 54 k
Installing dependencies:
apr x86_64 1.7.0-12.el9_3 rhel-9-for-x86_64-appstream-rpms 126 k
apr-util x86_64 1.6.1-23.el9 rhel-9-for-x86_64-appstream-rpms 97 k
apr-util-bdb x86_64 1.6.1-23.el9 rhel-9-for-x86_64-appstream-rpms 14 k
httpd-core x86_64 2.4.62-13.el9 rhel-9-for-x86_64-appstream-rpms 1.5 M
httpd-filesystem noarch 2.4.62-13.el9 rhel-9-for-x86_64-appstream-rpms 18 k
httpd-tools x86_64 2.4.62-13.el9 rhel-9-for-x86_64-appstream-rpms 88 k
redhat-logos-httpd noarch 90.6-1.el9 rhel-9-for-x86_64-appstream-rpms 15 k
Installing weak dependencies:
apr-util-openssl x86_64 1.6.1-23.el9 rhel-9-for-x86_64-appstream-rpms 17 k
mod_http2 x86_64 2.0.26-5.el9 rhel-9-for-x86_64-appstream-rpms 163 k
mod_lua x86_64 2.4.62-13.el9 rhel-9-for-x86_64-appstream-rpms 65 k
Transaction Summary
====================================================================================================
Install 11 Packages
Total download size: 2.2 M
Installed size: 6.0 M
Is this ok [y/N]: y
...
Installed:
apr-1.7.0-12.el9_3.x86_64 apr-util-1.6.1-23.el9.x86_64
apr-util-bdb-1.6.1-23.el9.x86_64 apr-util-openssl-1.6.1-23.el9.x86_64
httpd-2.4.62-13.el9.x86_64 httpd-core-2.4.62-13.el9.x86_64
httpd-filesystem-2.4.62-13.el9.noarch httpd-tools-2.4.62-13.el9.x86_64
mod_http2-2.0.26-5.el9.x86_64 mod_lua-2.4.62-13.el9.x86_64
redhat-logos-httpd-90.6-1.el9.noarch
Complete!
success
# systemctl reload firewalld
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
total 0
drwx------. 2 root root 6 May 25 10:43 openscap
total 0
drwxr-xr-x. 2 root root 6 May 25 10:43 openscap
# oscap xccdf eval --report /var/www/html/openscap/rhel98.html --profile stig /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
# vi /etc/grub.d/01_users
#!/bin/sh -e
cat << EOF
if [ -f \${prefix}/user.cfg ]; then
source \${prefix}/user.cfg
if [ -n "\${GRUB2_PASSWORD}" ]; then
set superusers="csadm"
export superusers
password_pbkdf2 root \${GRUB2_PASSWORD}
fi
fi
EOF
:wq
# grub2-setpassword
Enter password: **********
Confirm password: **********
# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
No comments:
Post a Comment