Linux / OS Hardening Articles

Production-ready Linux hardening guides covering kernel parameters, systemd, SELinux, AppArmor, SSH, firewalls, Ansible automation, and more.

Linux Hardening Guides

Advanced 16 min read

Detecting Backdoors in Kernel Patch Submissions: Lessons from the xz-utils Attack

The xz-utils supply chain attack demonstrated that a sophisticated attacker can spend years building trust in an open-source project before inserting a backdoor through a carefully crafted commit. This guide covers how kernel maintainers and distributions can detect malicious patch submissions — at the diff level, build level, and behaviour level.

Advanced 14 min read

Real-Time CVE Exposure Assessment with eBPF: Is This Kernel Bug Actually Reachable?

LLM-assisted vulnerability research is accelerating CVE disclosure to the point where vendor advisories lag by days. eBPF probes placed at the vulnerable code path let defenders answer 'are we actually exposed?' within minutes of a CVE publication, before waiting for a patch or a scanner update.

Advanced 15 min read

Hardening Rust-Written Linux Kernel Drivers: Supply Chain Verification and Module Signing

Rust drivers are merging into Linux mainline from 6.8 onward. The Cargo dependency graph they pull in introduces supply-chain risks that traditional C-driver review never faced. This guide covers Cargo lockfile auditing, kernel-module signing for Rust objects, and runtime containment policies.

intermediate 12 min read

Hardening Against needrestart LPE and the /proc/environ Injection Pattern

CVE-2024-48990 through CVE-2024-48992 allow local privilege escalation via needrestart: the tool runs as root, reads /proc/PID/environ to detect interpreter restarts, and can be tricked into executing attacker-controlled interpreter paths — disable scanning or pin to a fixed interpreter map.

intermediate 13 min read

Reducing Your Applicable Linux Kernel CVE Count via Attack Surface Reduction

The Linux kernel receives 5,000+ CVEs per year; most are irrelevant to any given deployment because they affect drivers, subsystems, or syscalls not present or enabled on that host; auditing kernel config, disabling unused modules, and restricting syscalls directly reduces the number of CVEs you must patch.

intermediate 13 min read

Limiting NGINX Worker Process Blast Radius with OS-Level Controls

NGINX worker processes run as an unprivileged user after the master binds ports, but a CVE that achieves worker RCE inherits the worker's OS context; Seccomp, namespace isolation, and capability dropping contain the damage when a vulnerability is exploited before a patch is available.

advanced 13 min read

Hardening Linux AF_VSOCK Against VM-to-Host Escape

AF_VSOCK provides a fast VM-to-hypervisor communication channel that has produced multiple guest-to-host escape CVEs; restrict the socket family via Seccomp, limit hypervisor-side listeners, and audit which services bind VSOCK ports.

intermediate 13 min read

Using AI Tools to Audit Linux Kernel Configuration for Hardening Gaps

LLMs can reason about interactions between kernel configuration options that manual audit misses — integrate AI-assisted kernel config review into your hardening baseline workflow to catch contradictory settings, missing defences, and architecture-specific gaps.

advanced 14 min read

Hardening Linux Against Netlink Socket Privilege Escalation

Netlink sockets expose a large kernel attack surface across rtnetlink, NETLINK_AUDIT, NETLINK_XFRM, and Generic Netlink families; multiple CVEs exploit this path from unprivileged processes and containers — restrict access with Seccomp, network namespaces, and capability dropping.

advanced 14 min read

Hardening Linux Against Abstract Unix Socket Privilege Escalation

Abstract namespace Unix sockets bypass filesystem permissions and allow container processes to reach host daemons; restrict access via network namespaces, AppArmor socket rules, and explicit socket path auditing.

advanced 14 min read

Kernel Hardening for AI-Accelerated Exploit Development

AI tools compress the time from CVE disclosure to working kernel exploit from weeks to hours; update your kernel hardening priorities, patch-velocity targets, and compensating control playbook for the faster weaponization timeline.

advanced 14 min read

Hardening Linux Against n_gsm TTY GSM Multiplexer Privilege Escalation

The n_gsm line discipline enables LPE from unprivileged TTY access; disable the module or restrict line discipline attachment to close this recurring kernel attack path.

advanced 14 min read

Dirty Frag: Exploiting the xfrm ESP Page-Cache Write Primitive (CVE-2026-43284/43500)

Dirty Frag is a deterministic Linux kernel local privilege escalation affecting the xfrm IPsec subsystem. Unlike race-condition exploits, it requires no timing: unprivileged processes use splice(2) or sendfile(2) to retain references to page-cache pages that esp4/esp6 decryption then writes plaintext into, yielding a reliable write primitive to root in a single command. This article covers the vulnerability mechanics, affected distributions, module blacklisting mitigation, and detection.

Advanced 14 min read

API Gateway Hardening at the OS Layer: Rate Limiting with nftables and eBPF

Application-layer rate limiting breaks when the attack volume saturates the API gateway process before a single request is evaluated. nftables meters and eBPF XDP programs enforce per-IP, per-endpoint, and per-token rate limits in the Linux kernel — before traffic reaches the application. This article implements kernel-level API gateway protection that holds up under volumetric attack.

intermediate 12 min read

ContainerSSH as a Bastion Host Replacement: Ephemeral Containers per SSH Session

Traditional bastion hosts accumulate persistent user accounts, shared credentials, and lateral movement risk over time. ContainerSSH replaces this model by launching a fresh isolated container for every SSH connection — no persistent system users, no shared state between sessions, automatic cleanup on disconnect. This article covers the architecture comparison, ContainerSSH deployment, and the defence-in-depth properties of ephemeral-container-per-session access.

intermediate 12 min read

Patching Distroless and Minimal Container Images with Copa

Distroless and scratch-based container images have no shell, no package manager, and often no OS metadata — making traditional vulnerability patching impossible. Copa (Copacetic) solves this by parsing a Trivy vulnerability report and applying package-level fix layers directly via BuildKit, without access to the original Dockerfile or source. This article covers Copa's layer-patching mechanics, patching Alpine, Debian, and distroless images, and verifying patch success.

advanced 14 min read

copy_from_user Failure Exploitation: Kernel Copy Fault Handling Vulnerabilities

When copy_from_user faults midway through a kernel operation, partially initialised kernel objects can be left in inconsistent state — a primitive that privilege escalation exploits use to corrupt allocator metadata or forge pointers. This article covers the vulnerability class, SMAP as a mitigation, fault-injection hardening, and slab object lifecycle protections that close the window.

Advanced 14 min read

Linux Kernel Crypto API Security: algif_aead Attack Surface and Safe Primitive Selection

The Linux kernel crypto API exposes symmetric ciphers, hash functions, and AEAD constructions to userspace via AF_ALG sockets. CVE-2021-3543 (algif_aead null pointer dereference) and CVE-2019-8912 (AF_ALG use-after-free) both escalated from unprivileged userspace to kernel code execution via the crypto socket interface. This article maps the attack surface, safe usage patterns, and how to restrict AF_ALG access in container environments.

advanced 13 min read

Malicious Dependency Runtime Detection: Using eBPF to Catch Compromised Libraries

Static SBOM scanning and registry controls stop known malicious packages, but a zero-day supply chain compromise (an attacker-modified npm/pip package that passes scanning) requires runtime behavioural detection. This article covers using eBPF (Falco, Tetragon) to detect anomalous behaviour from compromised dependencies: unexpected network calls from npm postinstall, file writes outside expected paths, privilege escalation from a library's execution context.

Advanced 15 min read

From Pod Breakout to Kubelet Credential Theft: The Node Compromise Attack Chain

Once a container escapes to the Kubernetes node, the attacker finds kubelet TLS client certificates at /var/lib/kubelet/pki/, calls the Kubernetes API server as the node identity, lists every pod on the node, reads their secrets from /proc/<pid>/environ, and accesses cloud IMDS for IAM credentials. This article maps every step of the post-escape attack chain and the detection signals that identify each phase.

advanced 13 min read

Reproducible Builds: Eliminating Build Environment as a Supply Chain Attack Surface

A reproducible build produces bit-for-bit identical output from identical source — meaning any independent rebuilder can verify no malicious modification occurred between source and artifact. This article covers the techniques that break reproducibility (timestamps, nondeterministic linking, build paths), Debian and Nix reproducible build infrastructure, SOURCE_DATE_EPOCH, and using diffoscope to diagnose unreproducible outputs.

Advanced 14 min read

HashiCorp Vault Architecture and Hardening: Seal Configuration, Audit Logging, and Root Token Elimination

An unprotected Vault instance — running with a manually managed unseal key, no audit log, and a persistent root token — is a single point of total secret compromise. Vault's auto-unseal with cloud KMS eliminates the manual unseal process and the humans who knew the keys. Audit log shipping to an immutable store creates a forensic trail. Root token revocation after bootstrap removes the master credential from existence.

Intermediate 13 min read

AI-Generated System Code vs. the Linux Kernel's 30-Year Audit Trail

An LLM can generate a kernel module, device driver, or eBPF program in seconds. The Linux kernel's security model — CVE disclosure process, stable API guarantees, security response team, and decades of adversarial testing — cannot be replicated by a prompt. This article maps the specific failure modes of AI-generated system code against what upstream open source provides.

Advanced 14 min read

Dirty Pipe (CVE-2022-0847): Writing to Read-Only Files Inside Containers

CVE-2022-0847 let any unprivileged process splice data into read-only file-backed pages via the pipe buffer's PIPE_BUF_FLAG_CAN_MERGE flag. Inside a container, this means overwriting the host's read-only binaries and /etc/passwd without any special capabilities.

Advanced 14 min read

AI-Discovered Linux LPE Chains: Patch Prioritisation and Kernel Hardening for the Fuzzer Era

Google's Big Sleep (Project Naptime), Atlas, and Microsoft Security Copilot fuzzers discovered multiple Linux local privilege escalation chains in 2025-2026 that human researchers missed for years. The attack class is real, the CVE velocity is increasing, and defenders need a systematic response beyond reactive patching.

advanced 14 min read

Linux BPF Token: Delegated Unprivileged eBPF Without CAP_BPF on the Host

Linux 6.10+ ships BPF token, a delegation mechanism that lets unprivileged user namespaces load and attach a curated subset of eBPF programs without CAP_BPF on the host. Production hardening guide for runtimes, observability agents, and developer workstations.

advanced 14 min read

Linux kexec Hardening: Signed Kernel Loading and Lockdown Integration

Restrict and authenticate kexec on production Linux: signed kexec_file_load, lockdown mode interactions, kdump isolation, and detection of kexec abuse.

Advanced 14 min read

Residential Proxy Networks and Kernel-Level Bot Mitigation: nftables Rate-Limiting at the Host Edge

Residential proxy networks (BrightData, Oxylabs-style) and IoT-compromised botnets route attack traffic through millions of real consumer IP addresses, defeating IP reputation systems. Linux kernel nftables, tc/eBPF, and XDP provide per-connection rate-limiting, connection-table fingerprinting, and flow-state analysis that work even when every request comes from a unique legitimate-looking IP.

Advanced 13 min read

MCP Server Hardening on Linux: Filesystem Scoping and Process Isolation

MCP (Model Context Protocol) servers run as local processes that give AI agents access to filesystems, shells, databases, and APIs. A compromised or prompt-injected MCP server can read arbitrary files, execute commands, and exfiltrate data with the permissions of the process that hosts it. Linux namespaces, seccomp, and capability dropping contain the blast radius before it reaches the host.

Intermediate 13 min read

Open Source Security Release Process: CVE Assignment, Coordinated Disclosure, and Patching Linux Tools

Maintaining an open source Linux tool means handling security vulnerabilities responsibly — assigning CVEs, coordinating disclosure with downstream distributions, building patched releases, and communicating clearly to users. Poorly handled security disclosures damage trust and leave users exposed. This guide covers the end-to-end security release process for Linux daemon and tool maintainers.

Intermediate 13 min read

Post-Quantum SSH: Hybrid ML-KEM Key Exchange and ML-DSA Host Keys with OpenSSH 9.0+

OpenSSH 9.0 shipped sntrup761x25519 hybrid key exchange, and OpenSSH 9.9 adds ML-KEM-768 support. Harvest-now-decrypt-later attacks make upgrading SSH key exchange urgent for long-lived sensitive sessions. This guide migrates SSH infrastructure to hybrid PQC key exchange, updates host key algorithms, and deploys client configuration for organisations managing hundreds of servers.

Intermediate 12 min read

Securing the Code Scanning Environment: Preventing Scan Bypass and Result Tampering on Linux

SAST and SCA tools are only as trustworthy as the environment that runs them. A developer who can modify the scan configuration, suppress findings before they're recorded, or tamper with result files defeats the security gate entirely. This guide hardens the Linux environments where code scanning runs — covering file integrity for scanner binaries, result chain-of-custody, isolated scan execution, and detecting bypass attempts.

Advanced 13 min read

User Namespace Privilege Escalation: CVE-2023-32233 and the Netlink Attack Chain

CVE-2023-32233 (use-after-free in nf_tables set handling) was exploited without root on unpatched Ubuntu 22.04 in under five minutes using only unprivileged user namespaces — enabled by default on most desktop Linux distributions. The kernel.unprivileged_userns_clone sysctl closes it; the reason distros resist enabling it reveals a deeper design tension.

Advanced 12 min read

Linux Kernel ASLR, PIE, and Exploit Mitigation Hardening Beyond the Defaults

Distro defaults leave significant exploit mitigation headroom on the table. This guide covers ASLR levels, PIE binaries, RELRO, stack canaries, SMEP/SMAP, CET shadow stacks, heap hardening, and how to verify every layer is actually active.

Advanced 13 min read

Container Runtime Security: gVisor, Kata Containers, and crun Beyond runc

runc's seccomp filters help, but a single unfiltered syscall can still hand an attacker the host kernel. This article explains when and how to deploy gVisor, Kata Containers, and crun to enforce stronger isolation boundaries for high-risk workloads.

Intermediate 11 min read

Linux Core Dump Security Hardening

Core dumps write a full copy of process memory to disk — including TLS private keys, passwords, session tokens, and cryptographic material. This guide covers disabling core dumps globally and per-service, locking down systemd-coredump, hardening kernel core_pattern, using PR_SET_DUMPABLE, controlling fs.suid_dumpable, and auditing core dump creation with auditd.

Intermediate 11 min read

Linux Cron and at Job Security Hardening

Cron and at are persistent attack surfaces on every Linux system. Writable crontab files, PATH hijacking in root jobs, and world-writable scripts executed on a schedule are among the most reliable privilege escalation and persistence techniques in an attacker's playbook. This guide covers file permission hardening, access control, root job hygiene, auditd monitoring, and when to replace cron entirely with systemd timers.

Advanced 13 min read

Linux D-Bus Security Hardening

D-Bus as a privilege escalation surface: auditing exposed services with busctl and gdbus, hardening policy files, writing restrictive polkit rules, confining services with AppArmor/SELinux, and monitoring for suspicious IPC activity.

Intermediate 11 min read

Linux Disk Quota Security: Preventing Storage-Based Denial of Service

A full /var/log stops syslog cold, a full /tmp crashes services that assume writes succeed, and a full /home triggers cascading auth failures. Disk quotas are the enforcement layer that prevents these outcomes.

Advanced 12 min read

Linux Entropy and RNG Security: Hardening Randomness from Boot to Application

Weak entropy means predictable secrets. This guide covers Linux RNG architecture, boot-time starvation in VMs, RDRAND/TPM seeding, LRNG, and auditing entropy health for production systems.

Advanced 13 min read

Linux fanotify for Real-Time Filesystem Security Monitoring

fanotify gives your security daemon filesystem-wide visibility and the ability to block file operations before they complete. This article covers permission events, FAN_MARK_FILESYSTEM, path resolution with FAN_REPORT_DFID_NAME, and how fanotify fits alongside auditd and eBPF.

Intermediate 11 min read

Linux File Immutability with chattr: Protecting Critical System Files Against Root Compromise

chattr +i sets a filesystem-level immutable flag that blocks writes, deletes, renames, and hard links — even for root. Learn how to protect /etc/passwd, SSH config, and log files, automate attribute enforcement at boot, and integrate with auditd and IMA/EVM.

Intermediate 12 min read

GnuPG Key Management: Package Signing, File Integrity, and Git Commit Signing

Hardened GnuPG setup for production: offline primary keys, subkey architecture, APT/DNF package verification, Git commit signing, YubiKey offload, key rotation, and WKD autodiscovery.

Advanced 13 min read

Linux HSM and PKCS#11 Integration: Hardware-Protected Cryptographic Keys

HSMs and PKCS#11 tokens move private keys off disk and out of memory. This guide covers network HSMs, YubiHSM 2, TPM 2.0, OpenSSL engine and provider configuration, OpenSSH, TLS daemons, and the performance trade-offs engineers actually hit.

Advanced 12 min read

Linux Kernel Module Signing and Verification

Unsigned kernel modules are a primary rootkit vector. This guide covers the full module signing infrastructure: CONFIG_MODULE_SIG_FORCE, sign-file, DKMS auto-signing, MOK enrollment, and detecting unsigned modules at runtime.

Advanced 13 min read

Linux Network Namespace Security: Service Isolation Without a Firewall Per Rule

Network namespaces give each service its own TCP/IP stack, routing table, and firewall rules. Lateral movement between services requires an explicit veth bridge — it cannot happen by accident.

Intermediate 12 min read

Linux NFS Security Hardening: Kerberos, Exports, and Protecting Network Filesystems

NFSv3 has no authentication model — any host that can reach port 2049 can mount your exports and spoof UIDs. This guide covers NFSv4 with Kerberos, export hardening, ID mapping, firewall rules, kernel TLS, and NFS in Kubernetes.

Intermediate 12 min read

Linux PAM Multi-Factor Authentication: TOTP and YubiKey

Password-only PAM is not enough. Add TOTP via libpam-google-authenticator and hardware-bound OTP or U2F via pam_yubico / pam_u2f to SSH and sudo. Stack ordering, break-glass access, and how to test without locking yourself out.

Intermediate 13 min read

Linux Hardening for PCI DSS Cardholder Data Environments

Cardholder data environments require Linux hardening that maps directly to PCI DSS Requirements 2, 6, 8, and 10. Generic OS hardening isn't enough — this guide maps specific sysctl settings, filesystem controls, service minimisation, and audit configuration to the PCI DSS v4.0 requirements that assessors actually check.

Intermediate 11 min read

Linux POSIX ACLs: Fine-Grained File Permission Security

POSIX Access Control Lists extend Unix permissions with named user and group ACEs, ACL masks, and inheritable default ACLs. Essential for shared directories, service isolation, and least-privilege access without group sprawl.

Advanced 12 min read

Linux ptrace Security and YAMA LSM Hardening

ptrace is a privilege-escalation primitive hiding in plain sight. YAMA LSM, PR_SET_DUMPABLE, seccomp, and eBPF auditing close the attack surface in production and container environments.

Advanced 12 min read

Linux Shared Library Security: LD_PRELOAD Attacks, Library Hijacking, and Hardened Linking

LD_PRELOAD lets any unprivileged user inject arbitrary code into every dynamically linked process they spawn. This article covers the full attack surface — PRELOAD hooks, library path hijacking, /etc/ld.so.preload persistence — and the structural defenses: AT_SECURE clearing, IMA/EVM measurement, dm-verity on /usr, and auditd detection rules.

Advanced 12 min read

Linux Network Socket Hardening: Port Binding Controls, SO_REUSEPORT Security, and Reducing the Socket Attack Surface

Restrict which processes can bind to ports, secure socket reuse, lock down Unix domain sockets, and detect unexpected listeners — a practical hardening guide for production Linux hosts.

Intermediate 11 min read

Linux Encrypted Swap: Protecting In-Memory Secrets from Disk Exposure

Unencrypted swap exposes cryptographic keys, session tokens, and database results to cold-boot attacks and forensic analysis. This guide covers volatile random-key swap, persistent LUKS swap for hibernation, zram as a swap alternative, and verification tooling for production systems.

Advanced 12 min read

Hardening Linux Kernel Information Exposure Through sysfs, debugfs, and procfs

Linux virtual filesystems expose kernel memory addresses, hardware state, and process details by default. Harden /proc, /sys, and debugfs to eliminate information leakage that attackers exploit for KASLR bypass, process enumeration, and side-channel attacks.

Intermediate 12 min read

Linux TCP/IP Stack Hardening via sysctl Parameters

A defence-in-depth guide to hardening the Linux network stack with sysctl: SYN flood protection, ICMP filtering, reverse path filtering, TCP timestamps, IPv6 RA hardening, and full verified drop-in configuration for production systems.

Intermediate 11 min read

Linux tmpfs and POSIX Shared Memory Security Hardening

tmpfs filesystems — /tmp, /dev/shm, /run — are writable in-memory surfaces used daily for payload staging and IPC abuse. This article covers mount hardening, systemd PrivateTmp isolation, size limits, abstract UNIX sockets, and managing application exceptions.

Advanced 13 min read

UEFI Secure Boot Deep Dive: DB/DBX, Shim, MOK, and Custom Key Enrolment

Master the UEFI Secure Boot trust chain from firmware key databases through shim and MOK to the kernel. Learn to inspect DB/DBX, enrol custom keys, remove Microsoft CA, detect bypasses, and understand BootGuard and firmware update signing.

Advanced 12 min read

Restricting Unprivileged User Namespaces: Closing the 3.4x Kernel Attack Surface

Edera's research shows unprivileged user namespace creation expands reachable kernel attack surface by 3.4x and enabled 40+ CVEs in 2020–2025. Disable unprivileged namespace creation on servers, understand the trade-offs, and apply per-service exceptions where rootless containers are required.

Advanced 11 min read

systemd-tmpfiles and snap-confine Race Condition: CVE-2026-3888 on Ubuntu

CVE-2026-3888 exploits a race between snap-confine and systemd-tmpfiles to escalate privileges to root on Ubuntu LTS. Understand the timing window, patch snapd, and harden /tmp handling to close this class of tmpfiles race vulnerabilities.

Intermediate 11 min read

Linux Developer Workstation Hardening: Closing the Axios Supply Chain Vector

The Axios attacker compromised a maintainer's PC to steal an npm token. Harden Linux developer workstations with credential isolation, application allowlisting, and malware detection so a compromised machine cannot pivot to npm publish.

Advanced 12 min read

Linux LPE Defence in Depth: Raising the Bar Against Kernel Privilege Escalation

2026's wave of kernel LPEs shows patches alone aren't enough. Build layered mitigations — seccomp-BPF blocking dangerous socket families, user namespace restrictions, kernel pointer hardening, and Landlock — that raise the exploitation bar regardless of which bug comes next.

Intermediate 10 min read

Python Cryptography DNS Name Constraint Bypass: CVE-2026-34073 on Linux Services

CVE-2026-34073 allows X.509 certificates violating excluded-subtree DNS name constraints to pass validation in Python's cryptography library. Audit Python services doing TLS on Linux — SSSD, httpx, requests, custom PKI validators — and upgrade to 46.0.6.

Advanced 12 min read

Linux algif_aead Privilege Escalation: Hardening Against CVE-2026-31431

CVE-2026-31431 Copy Fail lets an unprivileged user gain root via AEAD page-cache corruption. Understand the silent-patch pattern and how to close the gap with kernel settings, LSM policy, and live patching.

advanced 16 min read

Linux Bluetooth L2CAP Security Hardening

Harden Linux Bluetooth against CVE-2026-31512 L2CAP kernel memory disclosure, OOB read vulnerabilities, and the recurring pattern of Bluetooth subsystem fixes landing before distro advisories.

Intermediate 11 min read

Linux SCADA/HMI Workstation Hardening: Operator Stations in OT Zero Trust

CISA's OT Zero Trust guidance targets Living Off The Land attacks on HMI workstations. Harden Linux SCADA displays with kiosk lockdown, application allowlisting around vendor software, and EDR without disrupting control system I/O.

Intermediate 11 min read

Linux OT Jump Host Hardening: Zero Trust at the IT/OT Boundary

CISA's OT Zero Trust guidance places Linux jump hosts as the primary enforcement point between IT and OT networks. Learn how to harden them with MFA, application allowlisting, LOTL defences, and session recording.

advanced 15 min read

Linux USB Audio and ALSA Driver Security

Harden Linux systems against CVE-2026-23208 USB audio URB buffer overflow from malicious USB devices, and the recurring pattern of ALSA/USB driver fixes landing without CVE assignment.

Advanced 12 min read

Detecting Malicious npm postinstall Scripts at the Kernel Level

The Axios supply chain compromise delivered a cross-platform RAT via a postinstall hook. Learn how auditd rules and eBPF-based runtime monitoring catch the process spawning and C2 connections that betray malicious npm install scripts on Linux.

advanced 17 min read

eBPF Verifier Security Hardening

Harden Linux systems against eBPF verifier bypass vulnerabilities—like GHSA-hfqc-63c7-rj9f's register tracking bug—by restricting BPF access, monitoring silent kernel fixes, and validating verifier behaviour.

advanced 16 min read

Linux Kernel Keyring Security and TPM2-Backed Keyrings

Harden the Linux kernel keyring subsystem with TPM2-backed key storage, IMA appraisal keyrings, keyctl ACL hardening, and monitoring for open source keyring CVE patch gaps.

advanced 17 min read

Linux netfilter and nf_tables Security Hardening

Harden Linux netfilter and nf_tables against CVE-2026-31414-class connection tracking bugs, privilege escalation via nf_tables, and the recurring pattern of silent kernel netfilter fixes.

advanced 17 min read

Linux Page-Cache and splice() Security

Harden Linux systems against page-cache write primitives exploited by CVE-2026-31431 (Copy Fail) and related AF_ALG/splice attack chains, with kernel config controls and patch-gap monitoring.

advanced 17 min read

runc Container Runtime Security and CVE Hardening

Harden runc-based container runtimes against escape CVEs, mount namespace attacks, and process injection—with guidance on tracking silent security fixes in runc's public git history.

intermediate 14 min read

systemd Encrypted Service Credentials

Replace cleartext environment variable secrets with systemd-credentials: TPM2-sealed or password-encrypted service credentials for systemd units on Linux.

intermediate 13 min read

Linux Binary Hardening: ASLR, PIE, RELRO, and FORTIFY_SOURCE

Modern Linux exploit mitigations — ASLR, PIE, stack canaries, RELRO, and FORTIFY_SOURCE — significantly raise the cost of memory corruption exploits. Understanding which mitigations are active on a system, how to verify them, and how to build software with all of them enabled is essential for hardening.

intermediate 12 min read

Linux Package Manager Security: APT/DNF Signature Verification, Mirror Pinning, and Supply Chain Hardening

Package managers are the primary software supply chain for Linux systems. Weak GPG key configuration, unauthenticated mirrors, and unpinned package versions allow an attacker who controls a mirror or the network path to install arbitrary packages as root.

intermediate 13 min read

Linux Rootkit Detection: rkhunter, Kernel Module Auditing, and Integrity Verification

Rootkits hide attacker presence by modifying kernel structures, replacing system binaries, and intercepting syscalls. Detecting them requires integrity baselines taken before compromise, kernel module auditing, and tools that operate below the rootkit's hook level.

intermediate 13 min read

SSH Certificate Authority: Short-Lived User Certificates and Host Verification

SSH key sprawl — hundreds of authorized_keys entries, no revocation — is eliminated by an SSH CA. The CA signs short-lived user certificates and host certificates, centralising trust and enabling instant revocation without touching individual servers.

intermediate 12 min read

Sudo Hardening: Least Privilege, sudoers Configuration, and Privilege Escalation Prevention

Misconfigured sudo is one of the most common local privilege escalation paths on Linux. Locking down sudoers to command-specific grants, auditing NOPASSWD rules, restricting environment inheritance, and monitoring sudo usage closes a persistent attack surface.

advanced 17 min read

Unified Kernel Image and Measured Boot Hardening

Harden Linux boot integrity with Unified Kernel Images, systemd-boot, and TPM2 PCR policy binding to replace legacy GRUB+LUKS measured-boot flows.

intermediate 12 min read

Linux Kernel Live Patching: kpatch and livepatch for Zero-Day Response

Kernel live patching applies security fixes to a running kernel without a reboot. kpatch on RHEL and livepatch on Ubuntu eliminate the window between CVE disclosure and the next maintenance window.

advanced 13 min read

Linux User Namespace Security: Attack Surface Reduction and Safe Delegation

Unprivileged user namespaces underpin rootless containers but have enabled dozens of kernel privilege escalation CVEs. Knowing when to restrict them, how to delegate safely, and how to monitor their use is essential.

advanced 14 min read

LUKS Disk Encryption with TPM2 Sealing: Measured Boot and Network-Bound Unlock

Sealing LUKS keys to TPM2 PCRs means the disk only unlocks on hardware in the expected boot state. Clevis and tang add network-bound decryption for server fleets without manual passphrase entry.

advanced 14 min read

Seccomp-BPF for Non-Container Workloads: Syscall Filtering for System Services

Seccomp-BPF restricts which syscalls a process can make. Applied to system daemons and services outside containers, it reduces the kernel attack surface exploitable from a compromised service.

advanced 14 min read

dm-verity and dm-integrity: Tamper-Evident Block-Level Roots for Production Linux

dm-verity gives you a read-only root that fails to mount if a single block is tampered with. dm-integrity adds runtime checksumming. Together: immutable, evidence-bearing systems.

advanced 14 min read

eBPF-LSM (lsm_bpf): Kernel Security Policy as Hot-Loadable BPF Programs

lsm_bpf attaches eBPF programs to LSM hooks. Define security policy in code, push without reboot, audit at the syscall boundary. AppArmor for cloud-native systems.

intermediate 14 min read

Linux Capability Hardening: Dropping Privileges from Daemons and Services

Ambient capabilities, CapDrop in systemd units, auditing capability use with auditd and bpftrace. Least-privilege for services that run as root by legacy necessity.

advanced 14 min read

Linux IMA/EVM: Kernel-Level File Integrity Measurement and Appraisal

IMA measures every executed file and mmap'd library at the kernel level. EVM protects extended attributes from tampering. Together they detect supply chain compromise before code runs.

intermediate 13 min read

USBGuard: USB Device Authorization on Production Linux Hosts

USB devices are a peripheral attack surface most servers ignore. USBGuard provides allowlist-based authorization, blocking BadUSB and malicious-cable threats.

intermediate 13 min read

FIDO2 SSH with sk-* Keys: Hardware-Backed Authentication for Production Hosts

ed25519-sk and ecdsa-sk bind SSH keys to a hardware token. Phishing-resistant, exfiltration-proof, increasingly the default. Two short commands to switch.

intermediate 14 min read

Kernel Lockdown Mode: Blocking Root from Modifying the Running Kernel

Lockdown mode separates root from kernel. integrity blocks code modification; confidentiality also blocks reads. Cheap, broad, underused.

advanced 16 min read

Landlock LSM: Unprivileged Kernel Sandboxing for Production Linux Applications

Landlock lets an unprivileged process restrict its own filesystem and network access at the kernel level. AppArmor without root, seccomp with semantics.

advanced 16 min read

io_uring Security and Hardening: Disabling, Restricting, and Auditing a Bypass-Prone Syscall Interface

io_uring gives userspace a submission queue that sidesteps the normal syscall path. It has produced a steady stream of kernel CVEs and routinely bypasses seccomp.

intermediate 24 min read

Secure Cloud VM Access: SSH Key Authentication, Two-Factor Login, VPN, and Audit Logging

Cloud VMs exposed to the internet with password-only SSH are compromised within hours. This article covers the complete secure access stack: SSH key authentication, TOTP two-factor login, WireGuard VPN as a network-layer gate, and audit logging to track who did what and when.

intermediate 20 min read

SSH Hardening Beyond the Basics: Certificate Authentication, Jump Hosts, and Logging

Every SSH hardening guide starts and ends with the same three changes: disable root login, require key-based authentication, change the default port.

intermediate 15 min read

Hardening DNS Resolution on Linux: systemd-resolved, Unbound, and DNS-over-TLS

Most Linux hosts resolve DNS in plaintext over UDP port 53. On a stock Ubuntu 24.04 or RHEL 9 system:

intermediate 18 min read

Hardening the Linux Kernel Attack Surface with sysctl and Boot Parameters

Linux kernels ship with defaults optimised for compatibility, not security. On a stock Ubuntu 24.04 or RHEL 9 installation.

advanced 14 min read

Hardening GRUB and the Boot Process: Secure Boot, Boot Passwords, and Tamper Detection

Without boot security, an attacker with physical access or console access (BMC, IPMI, cloud serial console) to a Linux system can.

intermediate 13 min read

Hardening /proc and /sys: Restricting Kernel Information Disclosure

/proc and /sys are virtual filesystems that expose kernel internals, hardware details, and process information to userspace.

intermediate 16 min read

Linux Audit Framework Deep Dive: auditd Rules, auditctl, and ausearch for Security Monitoring

auditd is the kernel-level audit system on Linux, it captures syscalls, file access, user commands, and privilege changes that no userspace tool can...

intermediate 16 min read

Linux Firewall Hardening with nftables: Replacing iptables in Production

iptables is deprecated. nftables is the replacement in every modern Linux kernel (5.0+).

intermediate 15 min read

Cgroup v2 Resource Isolation: Preventing Resource Exhaustion Attacks on Shared Systems

Without resource limits, a single service, container, or compromised process can consume all available CPU, memory, I/O bandwidth, or PIDs on a host.

advanced 18 min read

SELinux in Production: Writing Custom Policies Without Losing Your Mind

SELinux is the most powerful mandatory access control system on Linux, and the most disabled. The result: services have no MAC confinement.

intermediate 14 min read

Time Synchronization Security: Hardening NTP and Chrony Against Manipulation

Accurate time is a silent dependency of almost every security control on a Linux system.

intermediate 22 min read

Automated OS Hardening with Ansible: A Production-Ready Playbook Collection

Manual OS hardening does not scale. The sysctl settings from Hardening the Linux Kernel Attack Surface with sysctl and Boot...

intermediate 14 min read

PAM Configuration Hardening: Password Policies, Login Controls, and MFA Integration

PAM (Pluggable Authentication Modules) is the authentication foundation on Linux.

intermediate 13 min read

Kernel Module Hardening: Blacklisting, Signing, and Preventing Runtime Loading

The Linux kernel loads modules on demand. When a process requests a capability that is not built into the running kernel (a filesystem type, a...

intermediate 16 min read

Hardening Container Base Images: From ubuntu:latest to a Minimal, Signed, Scannable Image

ubuntu:latest ships with over 200 packages. At any given point, a vulnerability scan with Trivy will report 50 or more CVEs, most of which are in...

intermediate 14 min read

AppArmor Profiles for Custom Applications: From Complain Mode to Enforce

AppArmor is the default mandatory access control system on Ubuntu and Debian. It restricts applications to specific file paths, capabilities, and...

intermediate 20 min read

systemd Unit Hardening: ProtectSystem, PrivateTmp, and the Full Sandbox Toolkit

systemd provides over 30 security-relevant directives for sandboxing services, yet the vast majority of unit files (including those shipped by...

intermediate 14 min read

Filesystem Mount Options That Matter: noexec, nosuid, nodev, and Beyond

Default Linux installations mount most filesystems with permissive options. On a stock Ubuntu 24.04 or RHEL 9 system: