Skip to content

Security rule catalog

This page summarizes which ANSSI rules are activated, according to the level and category of a host. It is the reference to consult before hardening a machine.

darkone.system.security = {
enable = true;
level = "intermediary"; # minimal | intermediary | reinforced | high
category = "server"; # base | client | server
};

Levels are cumulative: intermediary adds its rules to those of minimal, and so on. The category adds the rules specific to a workstation (client) or a server (server).

ProfileRecommended categoryWhy
minimal, portablebaseUniversal base
desktop, laptopclientScreen, USB, interactive session
server, gateway, hcs, vmserverExposed services, network

Each column shows the rule’s state at that level (levels being cumulative). Legend:

IconMeaning
✅Active at this level
⚠️Partial (see note)
❌Not yet active at this level
CodeRuleMinInterReinHigh
R3UEFI Secure Boot (if supported)❌⚠️⚠️⚠️
R5Bootloader password❌⚠️⚠️⚠️
C6LUKS2 disk encryption❌⚠️⚠️⚠️
R7IOMMU enabled❌❌✅✅
R29/boot restricted❌❌✅✅
R6cmdline and initramfs protection❌❌❌✅
CodeRuleMinInterReinforcedElevated
R8Memory options on the command line❌✅✅✅
R9Hardening sysctls❌✅✅✅
R11Yama: restricted ptrace❌✅✅✅
R10Module loading disabled❌❌✅✅
R60linux_hardened kernel❌❌✅✅
C1linux-hardened patches❌❌❌✅
C2LSM Lockdown❌❌❌✅
R15–R27Compile-time hardening❌❌❌✅
CodeRuleMinInterReinforcedElevated
R30Unused accounts disabled✅✅✅✅
R31Strong passwords✅✅✅✅
R68Password storage in yescrypt✅✅✅✅
R32Idle session lockout❌✅✅✅
R33Admin action audit trail❌✅✅✅
R34Service accounts without shell❌✅✅✅
R35Unique service accounts❌✅✅✅
R67Secure remote PAM❌⚠️⚠️⚠️
R69User databases over TLS❌⚠️⚠️⚠️
R70System accounts ≠ directory❌⚠️⚠️⚠️
C10Session limits (nproc, nofile)❌✅✅✅
CodeRuleMinInterReinforcedElevated
R39Hardened sudo directives❌✅✅✅
R40Non-root sudo targets❌✅✅✅
R42Deny list prohibition❌✅✅✅
R44sudoedit for editing❌✅✅✅
R38Dedicated sudo group❌❌✅✅
R41NOEXEC override restrictions❌❌✅✅
CodeRuleMinInterReinforcedElevated
R53Detection of unowned files✅✅✅✅
R54Sticky bit on /tmp and /var/tmp✅✅✅✅
R56Detection of setuid outside allowlist✅✅✅✅
R14Filesystem sysctls❌✅✅✅
R28Partitioning and mount options❌✅✅✅
R50Sensitive file restrictions❌✅✅✅
R52Socket and named pipe permissions❌⚠️⚠️⚠️
R55Per-user temporary directories❌⚠️⚠️⚠️
R36UMASK 0077❌❌✅✅
R57Minimal root setuid (capabilities)❌❌✅✅
CodeRuleMinInterReinHigh
R62Obsolete services disabled✅✅✅✅
R63Reduced service capabilities❌⚠️⚠️⚠️
R37Mandatory access control (MAC)❌❌✅✅
R45AppArmor profiles❌❌✅✅
R64Restricted service privileges❌❌✅✅
R65Service isolation (namespaces)❌❌✅✅
R66Container hardening❌❌❌✅
CodeRuleMinInterReinforcedHigh
R80Listening ports monitoring✅✅✅✅
C4Firewall default-deny⚠️⚠️✅✅
R12IPv4 network sysctls❌✅✅✅
R13Disabling IPv6 (on request)❌⚠️⚠️⚠️
C5OpenSSH hardening❌✅✅✅
C7NTS time synchronization❌✅✅✅
C8Secure DNS resolver (DNSSEC, DoT)❌✅✅✅
R79Hardened exposed services (server)❌✅✅✅
R78Network service isolation (server)❌❌✅✅
CodeRuleMinInterRenfHigh
R71Persisting sealed logging❌❌✅✅
R72Dedicated logs per service❌❌✅✅
R73auditd with ANSSI rules❌❌✅✅
C9Core dumps disabled❌❌✅✅
R76Sealing and integrity verification❌❌❌✅
R77Sealed base protection❌❌❌✅
CodeRuleMinInterHardHigh
C11Legal access banners✅✅✅✅
C12cron / at restricted✅✅✅✅
R61Regular updates⚠️⚠️⚠️⚠️
R74Hardened local mail❌✅✅✅
R75Mail alias (root → admin)❌✅✅✅
R51Installation secret rotation❌❌✅✅
C3USBGuard (workstation)❌❌✅✅

Three levers allow fine-tuning a specific protection without lowering the global level.

  • Tags (excludes): disable a group of incompatible rules (e.g. needs-jit, needs-binfmt).
  • Exceptions (exceptions): bypass a single rule, with mandatory justification.
  • Activation options: enable a rule too destructive to be active by default (disableIpv6, restrictUserns).

The details of these levers are in Security Concepts.