Files
nix-config-ryan4yin/hardening
2025-07-15 10:12:52 +08:00
..
2025-07-15 10:12:52 +08:00
2025-07-12 16:49:45 +08:00
2025-07-12 16:49:45 +08:00

Linux Hardening

Work in progress.

Goal

  • System Level: Protect critical files from being accessed by untrusted applications.
    1. Such as browser cookies, SSH keys, etc.
  • Per-App Level: Prevent untrusted applications(such as closed-source apps) from:
    1. Accessing files they shouldn't.
      • Such as a malicious application accessing your browser's cookies, SSH Keys, etc.
    2. Accessing the network when they don't need to.
    3. Accessing hardware devices they don't need.

Current Status

  1. System Level:
    • AppArmor
    • Kernel & System Hardening
  2. Per-App Level:
    • Nixpak (Bubblewrap, running at user-level)
    • Firejail (a SUID program, meaning it's running as root)

Kernel Hardening

System Hardening

Application Sandboxing

NOTE

Running untrusted code is never safe, kernel hardening & sandboxing cannot change this.

If you want to run untrusted code, please use a VM & an isolated network environment, which will provide a much higher level of security.

References