A Practical Guide to Securing Linux from Kernel to Cloud
Introduction: Why Linux Security Is Not a Given
Chapter 1: The State of Linux Security
- Why Linux Security Matters
- The Linux Threat Landscape in Modern Environments
- Principles of Risk-Based Hardening
- Defense in Depth and Zero Trust for Linux
- The Hardening Lifecycle: Assess, Implement, Verify, Maintain
Chapter 2: The Linux Security Model
- Kernel Architecture and Privilege Levels
- Processes, User IDs, and Isolation
- Users, Groups, and Authorization Basics
- File Permissions, ACLs, and Special Modes
- Capabilities and Privilege Separation
- Namespaces and Cgroups: The Foundation of Isolation
- System Calls, Procfs, Sysfs, and the Attack Surface
Chapter 3: Boot, Initialization, and Runtime Environment
- Firmware, UEFI, and Secure Boot
- The Boot Loader: GRUB Security
- Kernel Parameters and Boot-Time Security
- Systemd and Service Security
- Shared Libraries and Dynamic Linking
- Package Management and Software Supply Chain
- Configuration Drift and System Integrity
Chapter 4: Identity, Authentication, and Access Control
- User and Group Administration for Security
- Password Policy and Credential Security
- Pluggable Authentication Modules (PAM)
- SSH: Secure Remote Administration
- Sudo and Privilege Escalation Control
- Multi-Factor Authentication Integration
- Service Accounts and Privilege Separation
Chapter 5: Filesystem Security and Data Protection
- Filesystem Security and Mount Options
- Access Control Lists and Extended Attributes
- Disk Encryption with LUKS
- Secrets and Configuration File Protection
- Temporary Files and Sensitive Data Handling
- Removable Media Security
- Secure Backup and Recovery
Chapter 6: Network Security Hardening
- TCP/IP Stack Security and Sysctl Controls
- Network Interfaces, Routing, and Segmentation
- Firewalls: nftables and iptables
- Firewalld and Policy Management
- TLS, Certificates, and Encryption in Transit
- DNS Security and Configuration
- IPv6 Security Considerations
- VPNs and Secure Remote Access
Chapter 7: Kernel Security Mechanisms
- Address Space Layout Randomization (ASLR)
- Non-Executable Stacks and Memory Protections
- Control-Flow Integrity and Stack Protection
- Seccomp and System Call Filtering
- Linux Capabilities in Practice
- Kernel Lockdown and Module Signing
- Kernel Exploit Mitigations and Patch Strategies
Chapter 8: Mandatory Access Control: SELinux and AppArmor
- Mandatory Access Control Fundamentals
- SELinux Architecture and Policy Models
- SELinux Configuration and Administration
- SELinux Policy Writing and Customization
- AppArmor Architecture and Profiles
- AppArmor Configuration and Administration
- Choosing Between SELinux and AppArmor
Chapter 9: Auditing, Logging, and Security Monitoring
- System Logging with Journald and Rsyslog
- Linux Audit Framework and Auditd
- Security Event Collection and Centralization
- File Integrity Monitoring
- Intrusion Detection and Malware Scanning
- Vulnerability and Compliance Scanning
- SIEM Integration and Alerting
Chapter 10: Secure Service and Workload Configuration
- SSH Server Hardening
- Web Servers and Reverse Proxies
- Database Server Security
- DNS and Mail Service Hardening
- Cloud Instances and Bastion Hosts
- CI/CD Systems and Build Infrastructure
- Distribution-Specific Considerations
Chapter 11: Container and Virtualization Security
- Container Security Architecture
- Docker and Containerd Hardening
- Kubernetes Node Security
- Container Image and Registry Security
- Virtualization Host Hardening
- Container Escapes and Privilege Boundaries
Chapter 12: Common Attack Paths and Defensive Strategies
- Local Privilege Escalation Vectors
- Sudo Misconfiguration and Abuse
- Insecure File Permissions and Paths
- Malicious Services and Scheduled Tasks
- Kernel Vulnerabilities and Local Exploits
- Container Escapes and Namespace Abuse
- Persistence Mechanisms and Lateral Movement
Chapter 13: Enterprise Hardening at Scale
- Secure Baselines and Reference Architectures
- Configuration Management with Ansible
- Immutable Infrastructure Patterns
- Patch and Vulnerability Management
- Configuration Drift Detection
- Centralized Security Orchestration
- Large Fleet Operations and Governance
Chapter 14: Compliance, Benchmarks, and Security Standards
- CIS Benchmarks for Linux
- DISA STIGs and Government Standards
- NIST Cybersecurity Framework and Linux
- ISO/IEC 27001 and Linux Controls
- PCI DSS and Payment Card Environments
- Adapting Benchmarks to Your Environment
Chapter 15: Incident Response, Troubleshooting, and Continuous Improvement
- Linux Incident Response Fundamentals
- Forensic Preservation and Evidence Collection
- Troubleshooting Security Controls
- Rollback and Recovery Procedures
- Post-Incident Hardening and Lessons Learned
- Measuring Security Posture Over Time
- The Continuous Improvement Cycle
