Filesystem Kernel Modules
Ensure cramfs kernel module is not available
Disable the cramfs kernel module to prevent mounting of cramfs filesystems
File: /etc/modprobe.d/cramfs.conf
Manual Setup: Create file with content: install cramfs /bin/true
Filesystem Kernel Modules
Ensure freevxfs kernel module is not available
Disable the freevxfs kernel module to prevent mounting of freevxfs filesystems
File: /etc/modprobe.d/freevxfs.conf
Manual Setup: Create file with content: install freevxfs /bin/true
Filesystem Kernel Modules
Ensure hfs kernel module is not available
Disable the hfs kernel module to prevent mounting of hfs filesystems
File: /etc/modprobe.d/hfs.conf
Manual Setup: Create file with content: install hfs /bin/true
Filesystem Kernel Modules
Ensure hfsplus kernel module is not available
Disable the hfsplus kernel module to prevent mounting of hfsplus filesystems
File: /etc/modprobe.d/hfsplus.conf
Manual Setup: Create file with content: install hfsplus /bin/true
Filesystem Kernel Modules
Ensure jffs2 kernel module is not available
Disable the jffs2 kernel module to prevent mounting of jffs2 filesystems
File: /etc/modprobe.d/jffs2.conf
Manual Setup: Create file with content: install jffs2 /bin/true
Filesystem Kernel Modules
Ensure overlayfs kernel module is not available
Disable the overlayfs kernel module to prevent mounting of overlayfs filesystems
File: /etc/modprobe.d/overlayfs.conf
Manual Setup: Create file with content: install overlayfs /bin/true
Filesystem Kernel Modules
Ensure squashfs kernel module is not available
Disable the squashfs kernel module to prevent mounting of squashfs filesystems
File: /etc/modprobe.d/squashfs.conf
Manual Setup: Create file with content: install squashfs /bin/true
Filesystem Kernel Modules
Ensure udf kernel module is not available
Disable the udf kernel module to prevent mounting of udf filesystems
File: /etc/modprobe.d/udf.conf
Manual Setup: Create file with content: install udf /bin/true
Filesystem Kernel Modules
Ensure usb-storage kernel module is not available
Disable the usb-storage kernel module to prevent mounting of USB storage devices
File: /etc/modprobe.d/usb-storage.conf
Manual Setup: Create file with content: install usb-storage /bin/true
Filesystem Partitions
Configure /tmp partition
Ensure /tmp is configured as a separate partition with appropriate mount options
File: /etc/fstab
Manual Setup: Add entry: /tmp /tmp ext4 defaults,rw,nosuid,nodev,noexec,relatime 0 0
Filesystem Partitions
Configure /dev/shm partition
Ensure /dev/shm is configured with appropriate mount options
File: /etc/fstab
Manual Setup: Add entry: tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0
Filesystem Partitions
Configure /home partition
Ensure /home is configured as a separate partition
File: /etc/fstab
Manual Setup: Add entry: /home /home ext4 defaults,rw,nodev,relatime 0 2
Filesystem Partitions
Configure /var partition
Ensure /var is configured as a separate partition
File: /etc/fstab
Manual Setup: Add entry: /var /var ext4 defaults,rw,nodev,nosuid,relatime 0 2
Filesystem Partitions
Configure /var/tmp partition
Ensure /var/tmp is configured with appropriate mount options
File: /etc/fstab
Manual Setup: Add entry: /var/tmp /var/tmp ext4 defaults,rw,nosuid,nodev,noexec,relatime 0 0
Filesystem Partitions
Configure /var/log partition
Ensure /var/log is configured as a separate partition
File: /etc/fstab
Manual Setup: Add entry: /var/log /var/log ext4 defaults,rw,nodev,nosuid,noexec,relatime 0 2
Filesystem Partitions
Configure /var/log/audit partition
Ensure /var/log/audit is configured as a separate partition
File: /etc/fstab
Manual Setup: Add entry: /var/log/audit /var/log/audit ext4 defaults,rw,nodev,nosuid,noexec,relatime 0 2
Bootloader Configuration
Ensure bootloader password is set
Set a password for the bootloader to prevent unauthorized access
File: /etc/grub.d/40_custom
Manual Setup: Add password configuration and run update-grub
Bootloader Configuration
Ensure access to bootloader config is configured
Restrict access to bootloader configuration files
File: /etc/grub.d/
Manual Setup: Set permissions: chmod 600 /etc/grub.d/*
Process Hardening
Ensure address space layout randomization is enabled
Enable ASLR to randomize memory layout and prevent buffer overflow attacks
File: /proc/sys/kernel/randomize_va_space
Manual Setup: Set value to 2: echo 2 > /proc/sys/kernel/randomize_va_space
Process Hardening
Ensure ptrace_scope is restricted
Restrict ptrace to prevent debugging of processes by non-privileged users
File: /proc/sys/kernel/yama/ptrace_scope
Manual Setup: Set value to 1: echo 1 > /proc/sys/kernel/yama/ptrace_scope
Process Hardening
Ensure core dumps are restricted
Restrict core dumps to prevent sensitive information leakage
File: /etc/security/limits.conf
Manual Setup: Add line: * hard core 0
Process Hardening
Ensure prelink is not installed
Remove prelink package to prevent security bypasses
Package: prelink
Manual Setup: Remove package: apt remove prelink
Process Hardening
Ensure Automatic Error Reporting is not enabled
Disable automatic error reporting to prevent information leakage
File: /etc/default/apport
Manual Setup: Set enabled=0: echo 'enabled=0' > /etc/default/apport
Server Services
Ensure autofs services are not in use
Disable autofs service to prevent automatic mounting of filesystems
Service: autofs
Manual Setup: Disable service: systemctl disable autofs
Server Services
Ensure avahi daemon services are not in use
Disable avahi daemon to prevent service discovery
Service: avahi-daemon
Manual Setup: Disable service: systemctl disable avahi-daemon
Server Services
Ensure dhcp server services are not in use
Disable DHCP server services to prevent unauthorized network configuration
Service: isc-dhcp-server
Manual Setup: Disable service: systemctl disable isc-dhcp-server
Server Services
Ensure dns server services are not in use
Disable DNS server services to prevent DNS attacks
Service: bind9
Manual Setup: Disable service: systemctl disable bind9
Server Services
Ensure ftp server services are not in use
Disable FTP server services to prevent insecure file transfers
Service: vsftpd
Manual Setup: Disable service: systemctl disable vsftpd
Server Services
Ensure ldap server services are not in use
Disable LDAP server services to prevent directory service attacks
Service: slapd
Manual Setup: Disable service: systemctl disable slapd
Network Parameters
Ensure IPv6 status is identified
Identify IPv6 configuration status and disable if not needed
File: /etc/sysctl.conf
Manual Setup: Add IPv6 disable entries to sysctl.conf
Network Parameters
Ensure wireless interfaces are disabled
Disable wireless interfaces to prevent unauthorized network access
File: /etc/modprobe.d/blacklist.conf
Manual Setup: Add blacklist entries for wireless modules
Network Parameters
Ensure bluetooth services are not in use
Disable Bluetooth services to prevent unauthorized device connections
Service: bluetooth
Manual Setup: Disable service: systemctl disable bluetooth
Network Parameters
Ensure ip forwarding is disabled
Disable IP forwarding to prevent routing attacks
File: /proc/sys/net/ipv4/ip_forward
Manual Setup: Set value to 0: echo 0 > /proc/sys/net/ipv4/ip_forward
Network Parameters
Ensure packet redirect sending is disabled
Disable packet redirect sending to prevent ICMP redirect attacks
File: /proc/sys/net/ipv4/conf/all/send_redirects
Manual Setup: Set value to 0: echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects
Network Parameters
Ensure source routed packets are not accepted
Disable source routed packets to prevent routing attacks
File: /proc/sys/net/ipv4/conf/all/accept_source_route
Manual Setup: Set value to 0: echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route
Network Parameters
Ensure tcp syn cookies is enabled
Enable TCP SYN cookies to prevent SYN flood attacks
File: /proc/sys/net/ipv4/tcp_syncookies
Manual Setup: Set value to 1: echo 1 > /proc/sys/net/ipv4/tcp_syncookies
Firewall Configuration
Ensure ufw is installed
Install UFW firewall to provide network security
Package: ufw
Manual Setup: Install package: apt install ufw
Firewall Configuration
Ensure ufw service is enabled
Enable UFW firewall service
Service: ufw
Manual Setup: Enable service: systemctl enable ufw
Firewall Configuration
Ensure ufw loopback traffic is configured
Configure UFW to allow loopback traffic
UFW Rules
Manual Setup: Add rule: ufw allow in on lo
Firewall Configuration
Ensure ufw default deny firewall policy
Set UFW default policy to deny all traffic
UFW Policy
Manual Setup: Set policy: ufw default deny incoming
Firewall Configuration
Ensure ufw firewall rules exist for all open ports
Configure UFW rules for all necessary open ports
UFW Rules
Manual Setup: Add specific rules for required services
SSH Configuration
Ensure permissions on /etc/ssh/sshd_config are configured
Set proper permissions on SSH configuration file
File: /etc/ssh/sshd_config
Manual Setup: Set permissions: chmod 600 /etc/ssh/sshd_config
SSH Configuration
Ensure SSH private/public host key files permissions are configured
Set proper permissions on SSH host key files
Directory: /etc/ssh/
Manual Setup: Set permissions: chmod 600 /etc/ssh/ssh_host_*_key
SSH Configuration
Ensure sshd Ciphers are configured securely
Configure secure SSH ciphers in sshd_config
File: /etc/ssh/sshd_config
Manual Setup: Add line: Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com
SSH Configuration
Ensure sshd PermitRootLogin is disabled
Disable root login via SSH
File: /etc/ssh/sshd_config
Manual Setup: Set: PermitRootLogin no
SSH Configuration
Ensure sshd MaxAuthTries is configured
Limit SSH authentication attempts
File: /etc/ssh/sshd_config
Manual Setup: Set: MaxAuthTries 3
SSH Configuration
Ensure sshd PermitEmptyPasswords is disabled
Disable empty password authentication
File: /etc/ssh/sshd_config
Manual Setup: Set: PermitEmptyPasswords no
PAM Configuration
Ensure password quality requirements are configured
Configure password quality requirements using libpam-pwquality
File: /etc/security/pwquality.conf
Manual Setup: Configure password complexity requirements
PAM Configuration
Ensure password hashing algorithm is SHA-512
Configure system to use SHA-512 for password hashing
File: /etc/pam.d/common-password
Manual Setup: Configure: password [success=1 default=ignore] pam_unix.so sha512
PAM Configuration
Ensure password reuse is limited
Configure password reuse restrictions
File: /etc/pam.d/common-password
Manual Setup: Add: password required pam_pwhistory.so remember=5
PAM Configuration
Ensure password expiration is configured
Configure password expiration policies
File: /etc/login.defs
Manual Setup: Set: PASS_MAX_DAYS 90
and PASS_MIN_DAYS 7
PAM Configuration
Ensure failed password attempts are logged
Configure logging of failed password attempts
File: /etc/pam.d/common-auth
Manual Setup: Add: auth required pam_tally2.so deny=5 onerr=fail unlock_time=1800
User Account Controls
Ensure root is the only UID 0 account
Verify that only root has UID 0
File: /etc/passwd
Manual Setup: Check: awk -F: '($3 == 0) { print $1 }' /etc/passwd
User Account Controls
Ensure system accounts are non-login
Ensure system accounts cannot be used for login
File: /etc/passwd
Manual Setup: Set shell to /usr/sbin/nologin for system accounts
User Account Controls
Ensure default user shell timeout is configured
Configure shell timeout for inactive sessions
File: /etc/bash.bashrc
Manual Setup: Add: TMOUT=600
User Account Controls
Ensure default user umask is configured
Configure default umask for file permissions
File: /etc/bash.bashrc
Manual Setup: Add: umask 027
User Account Controls
Ensure sudo is configured properly
Configure sudo with proper security settings
File: /etc/sudoers
Manual Setup: Configure sudo timeout and logging
System Hardening
Ensure systemd-timesyncd is configured with authorized timeserver
Configure time synchronization with authorized NTP servers
File: /etc/systemd/timesyncd.conf
Manual Setup: Configure NTP servers: NTP=time.nist.gov
System Hardening
Ensure chrony is configured with authorized timeserver
Configure chrony with authorized NTP servers
File: /etc/chrony/chrony.conf
Manual Setup: Configure server entries with trusted NTP servers
System Hardening
Ensure time synchronization is in use
Enable time synchronization service
Service: systemd-timesyncd
Manual Setup: Enable service: systemctl enable systemd-timesyncd