An XCCDF Group - A logical subset of the XCCDF Benchmark
avahi-daemon
$ sudo systemctl mask --now avahi-daemon.service
kdump
kexec
$ sudo systemctl mask --now kdump.service
crond
$ sudo systemctl enable crond.service
/etc/cron.d
$ sudo chgrp root /etc/cron.d
/etc/cron.daily
$ sudo chgrp root /etc/cron.daily
/etc/cron.deny
$ sudo chgrp root /etc/cron.deny
/etc/cron.hourly
$ sudo chgrp root /etc/cron.hourly
/etc/cron.monthly
$ sudo chgrp root /etc/cron.monthly
/etc/cron.weekly
$ sudo chgrp root /etc/cron.weekly
/etc/crontab
$ sudo chgrp root /etc/crontab
$ sudo chown root /etc/cron.d
$ sudo chown root /etc/cron.daily
$ sudo chown root /etc/cron.deny
$ sudo chown root /etc/cron.hourly
$ sudo chown root /etc/cron.monthly
$ sudo chown root /etc/cron.weekly
$ sudo chown root /etc/crontab
$ sudo chmod 0700 /etc/cron.d
$ sudo chmod 0700 /etc/cron.daily
$ sudo chmod 0700 /etc/cron.hourly
$ sudo chmod 0700 /etc/cron.monthly
$ sudo chmod 0700 /etc/cron.weekly
$ sudo chmod 0600 /etc/crontab
/etc/cron.allow
/etc/at.allow
cron
/etc/at.deny
at
cron.allow
cron.deny
$ sudo rm /etc/cron.deny
at.deny
$ sudo rm /etc/at.deny
root
$ sudo chgrp root /etc/at.allow
$ sudo chgrp root /etc/cron.allow
$ sudo chown root /etc/at.allow
$ sudo chown root /etc/cron.allow
0600
$ sudo chmod 0600 /etc/at.allow
$ sudo chmod 0600 /etc/cron.allow
/etc/sysconfig
dhcpd
dnsmasq
$ sudo dnf remove dnsmasq
named
bind
$ sudo dnf remove bind
fanotify
fapolicyd
$ sudo dnf install fapolicyd
$ sudo systemctl enable fapolicyd.service
ftp
$ sudo dnf remove ftp
vsftpd
$ sudo dnf remove vsftpd
httpd
$ sudo dnf remove httpd
nginx
$ sudo dnf remove nginx
cyrus-imapd
$ sudo dnf remove cyrus-imapd
dovecot
$ sudo dnf remove dovecot
/etc/krb5.keytab
system-config-authentication
openldap-clients
$ sudo dnf remove openldap-clients
$ sudo grep -i useldapauth /etc/sysconfig/authconfig
USELDAPAUTH=yes
USELDAPAUTH
yes
alternatives
s-nail
$ sudo dnf install s-nail
$ sudo echo "root: " >> /etc/aliases $ sudo newaliases
$ sudo grep "postmaster:\s*root$" /etc/aliases postmaster: root
/etc/postfix/main.cf
inet_interfaces
inet_interfaces =
$ sudo postconf -e 'smtpd_client_restrictions = permit_mynetworks,reject'
nfs-utils
$ sudo dnf remove nfs-utils
rpcbind
$ sudo systemctl mask --now rpcbind.service
nfs
rpcsvcgssd
nfs-server
$ sudo systemctl mask --now nfs-server.service
/etc/fstab
nfs4
,nodev,nosuid
,noexec
sec=krb5:krb5i:krb5p
nodev
noexec
nosuid
/etc/exports
ntpd
chronyd
ntp
chrony
Chronyd
Autokey
$ sudo dnf install chrony
# systemctl enable chronyd.service
$ sudo systemctl is-active chronyd
active
$ sudo systemctl is-active ntpd
Chrony
/etc/chrony.conf
server <remote-server>
nts
server
pool
port
0
cmdport
maxpoll
/etc/ntp.conf
/etc/chrony.d/
peer
server ntpserver
-u ...
OPTIONS
-u chrony
/etc/chrony.keys
$ sudo chgrp chrony /etc/chrony.keys
$ sudo chown root /etc/chrony.keys
$ sudo chmod 0640 /etc/chrony.keys
firewalld
rsync-daemon
$ sudo dnf remove rsync-daemon
rsyncd
$ sudo systemctl mask --now rsyncd.service
xinetd
$ sudo dnf remove xinetd
rexec
rsh-server
disable
/etc/xinetd.d/rexec
$ sudo systemctl mask --now rexec.socket
rlogin
/etc/xinetd.d/rlogin
$ sudo systemctl mask --now rlogin.socket
rsh
/etc/xinetd.d/rsh
$ sudo systemctl mask --now rsh.socket
shosts.equiv
$ sudo rm /[path]/[to]/[file]/shosts.equiv
/etc/hosts.equiv
~/.rhosts
$ sudo rm /etc/hosts.equiv
$ rm ~/.rhosts
~/.shosts
$ sudo find / -name '.shosts' -type f -delete
telnet-server
$ sudo dnf remove telnet-server
telnet
$ sudo systemctl mask --now telnet.socket
tftp-server
$ sudo dnf remove tftp-server
tftp
$ sudo systemctl show tftp | grep ExecStart= ExecStart={ path=/usr/sbin/in.tftpd ; argv[]=/usr/sbin/in.tftpd -s /var/lib/tftpboot ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }e
ExecStart
-s
ExecStart=/usr/sbin/in.tftpd -s
cups
$ sudo systemctl mask --now cups.service
squid
$ sudo dnf remove squid
$ sudo systemctl mask --now squid.service
quagga
$ sudo dnf remove quagga
samba-client
samba
$ sudo dnf remove samba
net-snmp
$ sudo dnf remove net-snmp
snmpd
$ sudo systemctl mask --now snmpd.service
snmpd.conf
/etc/snmp
/etc/snmp/snmpd.conf
rocommunity
rwcommunity
com2sec
$ sudo systemctl restart snmpd
sshd
openssh-server
openssh-clients
$ sudo dnf install openssh-clients
$ sudo dnf install openssh-server
$ sudo systemctl enable sshd.service
/etc/ssh/sshd_config
$ sudo chgrp root /etc/ssh/sshd_config
/etc/ssh/*_key
/etc/ssh/*.pub
$ sudo chown root /etc/ssh/sshd_config
$ sudo chmod 0600 /etc/ssh/sshd_config
$ sudo chmod 0644 /etc/ssh/*.pub
~/.ssh
RekeyLimit
/etc/ssh/ssh_config.d/02-rekey-limit.conf
include
/etc/ssh/ssh_config
/etc/ssh/ssh_config.d
02-rekey-limit.conf
$ sudo ssh-keygen -n [passphrase]
sshd_config(5)
ClientAliveCountMax
ClientAliveInterval
/etc/ssh/sshd_config.d/00-complianceascode-hardening.conf
ClientAliveInterval * ClientAliveCountMax
.rhosts
HostbasedAuthentication
HostbasedAuthentication no
ssh
firewall-cmd --permanent --add-service=ssh
firewall-cmd --reload
Compression
PermitEmptyPasswords
PermitEmptyPasswords no
GSSAPIAuthentication
GSSAPIAuthentication no
KerberosAuthentication
KerberosAuthentication no
IgnoreRhosts
IgnoreRhosts yes
RhostsRSAAuthentication no
PermitRootLogin no
AllowTcpForwarding
AllowTcpForwarding no
IgnoreUserKnownHosts yes
X11Forwarding
X11Forwarding no
PermitUserEnvironment
PermitUserEnvironment no
UsePAM yes
PubkeyAuthentication
PubkeyAuthentication yes
StrictModes
.ssh
StrictModes yes
Banner /etc/issue
Banner /etc/issue.net
PrintLastLog
PrintLastLog yes
LoginGraceTime
LogLevel
LogLevel INFO
VERBOSE
LogLevel VERBOSE
MaxAuthTries
MaxSessions
MaxStartups
Include /etc/ssh/sshd_config.d/*.conf
/etc/ssh/sshd_config.d
UsePrivilegeSeparation
KexAlgorithms
MACs
X11UseLocalhost
X11UseLocalhost yes
sssd
$ sudo dnf install sssd
$ sudo systemctl enable sssd.service
certificate_verification
ocsp_dgst=
certmap/testing.test/rule_name
/etc/sssd/sssd.conf
[certmap/testing.test/rule_name] matchrule =<SAN>.*EDIPI@mil maprule = (userCertificate;binary={cert!bin}) domains = testing.test
pam_cert_auth
True
[pam]
[pam] pam_cert_auth = True
offline_credentials_expiration
1
[pam] offline_credentials_expiration = 1
usbguard
$ sudo dnf install usbguard
$ sudo systemctl enable usbguard.service
AuditBackend
/etc/usbguard/usbguard-daemon.conf
LinuxAudit
graphical.target
$ sudo dnf groupremove "X Window System"
$ sudo dnf remove xorg-x11-server-common
xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-server-utils xorg-x11-server-Xwayland
sudo dnf remove xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-server-utils xorg-x11-server-Xwayland
multi-user.target
$ systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target. Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.