Linux Hardening Checklist
A Linux hardening checklist on GitHub by trimstray provides a comprehensive guide for securing GNU/Linux systems. It includes topics such as partitioning, bootloader security, user management, SELinux configurations, and network hardening. The checklist offers rules, priorities, and checkboxes for each section to aid users in enhancing Linux system security.
Read original articleThe URL contains a Linux hardening checklist by trimstray on GitHub, offering a detailed guide on securing GNU/Linux systems. It covers topics like partitioning, bootloader security, user management, SELinux configurations, and network hardening. The checklist includes rules, priorities, and checkboxes for each section to assist users in enhancing the security of their Linux systems.
Related
Guest Users Module for Linux
The "Guest Users Module for Linux" on GitHub supports guest user creation on Linux using PAM and GNU nss. It ensures user separation, offers installation guidance, configuration options, and development support.
CVE-2021-4440: A Linux CNA Case Study
The Linux CNA mishandled CVE-2021-4440 in the 5.10 LTS kernel, causing information leakage and KASLR defeats. The issue affected Debian Bullseye and SUSE's 5.3.18 kernel, resolved in version 5.10.218.
Booting Linux Off of Google Drive
A programmer's competitiveness leads to booting Linux from Google Drive, facing challenges like networking setup and mounting an Arch Linux root from an S3 bucket. Despite setbacks, Linux boots successfully, integrating Google Drive but facing performance issues and complexities.
Lennart Poettering: Fitting Everything Together
The blog post explores integrating systemd components for Linux OS development, emphasizing hermetic /usr/ design, image-based OS with security features, self-updating systems, and community-driven desktop OS with advanced security measures.
Syd the perhaps most sophisticated sandbox for Linux
A course covers security topics like Chrome vulnerabilities, Amazon's "Stuffer Concept," Rust language safety. Tools include GCC 14, BOLT, Google Closure Compiler. Emphasizes firewalls, Seccomp, eBPF, Syd sandbox, F*, CompCert, TCC compilers.
[0] https://privsec.dev/posts/linux/desktop-linux-hardening/
> Restrict /usr partition mount options. Example: UUID=<...> /usr ext4 defaults,nodev,ro 0 2
Mounting /usr read-only will break system updates, and it's worthless from a security perspective, since nothing in /usr is writable by anyone but root, and root is capable of remounting it read-write. Ditto for the same advice about /boot. Also, nodev is only useful on things unprivileged users can mount, like external media, since on internal partitions like /usr, once again, only root can do mknod, and root can remove the nodev mount option too.
> Restrict /proc partition mount options. Example: proc /proc proc defaults,hidepid=2 0 0
Setting hidepid=2 is a really, really breaking change. I'd never even consider doing that on a production system without extensively testing every piece of it with that on first. And since it's only security-through-obscurity and not real security, it's approximately never worth doing so.
> Polyinstantiated directories
A really common use case of /tmp and /var/tmp is to transfer files between local user accounts, when your home directory is something like a Kerberized NFS mount where you can't give each other direct access. Polyinstantiating those directories breaks that.
> Protect Single User Mode with root password. Example: # Edit /etc/sysconfig/init. SINGLE=/sbin/sulogin
This is actively harmful for security, because now you need to give the root account a password and leave it unlocked, instead of having it locked out and only allowing root access via sudo. And the protection it does offer is trivially bypassable by, e.g., a LiveUSB boot.
> chmod og-rwx /etc/grub.conf chmod -R og-rwx /etc/grub.d
Seems like security through obscurity. Nothing sensitive belongs in either of those places.
> ExecShield protection. Example: echo "kernel.exec-shield = 2" > /etc/sysctl.d/50-exec-shield.conf
ExecShield tries to emulate the NX bit on x86 CPUs that don't have it. All such CPUs are now so old that unless you're doing something like https://yeokhengmeng.com/2018/01/make-the-486-great-again/, any system where it makes sense to use this is so old that the software you'll be running on it will be full of unpatched critical security holes.
> Update password policy (PAM). Secure /etc/login.defs password policy.
This is exactly the kind of password advice that NIST has now has been admitting is harmful for years. You shouldn't require special characters, and you shouldn't require 60-day password changes.
> Set auto logout inactive users. Example:
> echo "readonly TMOUT=900" >> /etc/profile.d/idle-users.sh
> echo "readonly HISTFILE" >> /etc/profile.d/idle-users.sh
> chmod +x /etc/profile.d/idle-users.sh
This fundamentally misunderstands what logout means. If you're logged in to a graphical session and have a bunch of terminal windows open, you don't want each one closing after 15 minutes of idle in itself. And it doesn't even work; if you're idle in a text editor or something, that won't do anything. And it has nothing to do with HISTFILE, so I'm not sure why that's included at all.> unlock_time=never
This neglects the availability component of the CIA triad. Now it's trivial for an attacker to DoS your system by locking out all of your accounts at once.
> Disable uncommon filesystems.
All EFI hosts need an EFI System Partition that uses vfat, so it's definitely not uncommon. This error is so obvious that it makes me doubt the rest of this list.
Related
Guest Users Module for Linux
The "Guest Users Module for Linux" on GitHub supports guest user creation on Linux using PAM and GNU nss. It ensures user separation, offers installation guidance, configuration options, and development support.
CVE-2021-4440: A Linux CNA Case Study
The Linux CNA mishandled CVE-2021-4440 in the 5.10 LTS kernel, causing information leakage and KASLR defeats. The issue affected Debian Bullseye and SUSE's 5.3.18 kernel, resolved in version 5.10.218.
Booting Linux Off of Google Drive
A programmer's competitiveness leads to booting Linux from Google Drive, facing challenges like networking setup and mounting an Arch Linux root from an S3 bucket. Despite setbacks, Linux boots successfully, integrating Google Drive but facing performance issues and complexities.
Lennart Poettering: Fitting Everything Together
The blog post explores integrating systemd components for Linux OS development, emphasizing hermetic /usr/ design, image-based OS with security features, self-updating systems, and community-driven desktop OS with advanced security measures.
Syd the perhaps most sophisticated sandbox for Linux
A course covers security topics like Chrome vulnerabilities, Amazon's "Stuffer Concept," Rust language safety. Tools include GCC 14, BOLT, Google Closure Compiler. Emphasizes firewalls, Seccomp, eBPF, Syd sandbox, F*, CompCert, TCC compilers.