- OS Hardening refers to the process of securing an operating system by minimizing its attack surface. This involves:
- Removing unnecessary services, packages, and dependencies to reduce potential security risks.
- Closing unused ports to prevent unauthorized access.
- Using minimal base images to limit vulnerabilities and reduce exposure.
I’ve created a basic OS Hardening checklist that covers essential security practices for Windows 11 and RHEL/Ubuntu systems.
For now, I’ve focused on implementing and testing the hardening steps specifically on Ubuntu.
The checklist includes practical steps I’ve performed, verified, and documented. You can find the detailed breakdown in the sections below:
📥 You can download the OS Hardening checklists in Excel format:
- Preparation and Installation 🛡️
- Filesystem Configuration 📁
- Create a separate partition with the
nodev
,nosuid
, andnoexec
options set for/tmp
- Create separate partitions for
/var
,/var/log
,/var/log/audit
, and/home
- Bind mount /var/tmp to /tmp
- Set
nodev
option to /home - Set nodev, nosuid, and noexec options on
/dev/shm
- Set sticky bit on all world-writable directories
- Enable Hard/Soft Link Protection
- Disable Uncommon Filesystems
- Lock The Boot Directory
- Create a separate partition with the
- System Updates 🛡️
- Secure Boot Settings 🔒
- Process Hardening ⚙️
- OS Hardening
- User Account Management 👤
- Limit Administrator Privileges to only Necessary Accounts
- Setting Up SUDO for User with Only Certain Delegated Privileges
- Check User Home Directory is Accessible by other User or Not
- Enforcing Strong Password Criteria
- Check User Are Using Old Password As new Password or Not
- Set Auto Logout for Inactive Users
- Configure Account Lockout Policy 🔒
- Configure Password Expiry Date
- Configure Account Expiry Date Of Temporary Account 👤
- Monitor and Remove Inactive Users
- Disable Unused System Accounts
- Restrict Use of Empty Passwords
- Network Security 🛡️
- Restrict Service Access to Authorized Users via Firewalls & Controls
- Disable IP forwarding
- Disable Send Packet Redirects
- Disable Source Routed Packet Acceptance
- Disable ICMP Redirect Acceptance
- Enable Ignore Broadcast Requests
- Enable Bad Error Message Protection
- Enable TCP/SYN Cookies
- Close Unused Open Ports
- Log Suspicious Packets (
log_martians
)
- Remote Access and Secure Communication 🤖
- Logging and Monitoring
⚠️ - Kernel Hardening
- Security Awareness and Training 👨🏻💻