
Best Practice Auditd Configuration
___ ___ __ __
/ | __ ______/ (_) /_____/ /
/ /| |/ / / / __ / / __/ __ /
/ ___ / /_/ / /_/ / / /_/ /_/ /
/_/ |_\__,_/\__,_/_/\__/\__,_/
Best Practice Auditd Configuration
The idea of this auditd configuration is to provide a best-practice baseline that
The simplified ruleset intentionally keeps some high-value but potentially high-volume telemetry, especially process creation, socket creation, and file access failure events. Tune these sections to your environment if needed.
The current configuration focuses on the following coverage areas:
ptrace, memfd_create, bpf, namespaces, io_uring, and userfaultfdexecve, execveat, socket creation, file deletion, and 32-bit ABI usageThis ruleset is intended to stay agnostic of the downstream detection logic. It focuses on collecting broadly useful audit telemetry that can then be analyzed in different ways, for example with Sigma-based tooling or SIEM queries.
One open source project that can make use of this audit data is Aurora Linux, a lightweight and customizable Sigma-based agent for Linux that combines eBPF-based telemetry with user-space enrichment and Sigma rule matching.
This ruleset intentionally includes -i so that optional distro-specific paths
do not abort loading on systems where some binaries or directories are absent.
This keeps the default deployment simple, but it also means rule load errors are
ignored.
If you want a strict pre-deployment validation, test a temporary copy with the
-i line removed, for example:
grep -v '^-i$' audit.rules > /tmp/audit.rules.strict
auditctl -R /tmp/audit.rules.strict
The repository also includes GitHub Actions checks that lint the rules and validate that a portable CI copy and a strict copy can both be loaded on Ubuntu.
Several rules in audit.rules use auid>=1000 -F auid!=unset to focus on
interactive user activity and exclude unset login sessions.
1000 is the common UID_MIN on many Linux distributions, but it is not
universal. If your host uses a different UID_MIN, check /etc/login.defs
and replace 1000 in audit.rules before deployment:
awk '$1=="UID_MIN" { print $2 }' /etc/login.defs
On April 29, 2026, Xint published Copy Fail (CVE-2026-31431), a local
privilege-escalation technique that abuses the kernel crypto userspace
interface (AF_ALG) together with splice() to corrupt page-cache-backed
files in memory.
This ruleset includes a small af_alg block to collect the stable, low-noise
parts of that setup from attributable user sessions:
socket(AF_ALG, ...)bind() using the common fixed-size struct sockaddr_algsetsockopt(..., SOL_ALG, ...)This is intentionally more generic than a one-off signature for
authencesn(hmac(sha256),cbc(aes)) because audit syscall filters cannot match
string arguments. In practice, the algorithm name lives in the SOCKADDR
record emitted by bind(), so the recommended downstream detection is:
key=af_algSOCKADDR.saddr / SADDR={ saddr_fam=alg ... }salg_type=aead with salg_name containing authencesn(pid, exe, or auid emits many such binds in
a short windowThe proof-of-concept described by Xint also relies on repeated splice()
operations. Those syscalls are too noisy for the default ruleset on many
systems, so the repository ships only a commented-out splice_user overlay in
audit.rules. Enable it only if splice / vmsplice are uncommon in your
environment and correlate it with recent af_alg activity from the same
process or user session.
The configuration is based on the following sources and years of merged improvements to the default ruleset:
Gov.uk auditd rules https://github.com/gds-operations/puppet-auditd/pull/1
CentOS 7 hardening https://highon.coffee/blog/security-harden-centos-7/#auditd---audit-daemon
Linux audit repo https://github.com/linux-audit/audit-userspace/tree/master/rules
Auditd high performance linux auditing https://linux-audit.com/tuning-auditd-high-performance-linux-auditing/
Copy Fail: 732 Bytes to Root on Every Major Linux Distribution. https://xint.io/blog/copy-fail-linux-distributions
Linux kernel crypto userspace interface (AF_ALG) https://docs.kernel.org/crypto/userspace-if.html
Not all of these rules have been included.
For PCI DSS compliance see: https://github.com/linux-audit/audit-userspace/blob/master/rules/30-pci-dss-v31.rules
For NISPOM compliance see: https://github.com/linux-audit/audit-userspace/blob/master/rules/30-nispom.rules
IppSec captured a video that explains how to detect the exploitation of the
OMIGOD vulnerability using auditd. The core auditd concepts in that video are
still useful, but the ruleset in this repository has since been simplified
significantly. Treat the video as historical background and an introduction to
auditd-based detection ideas, not as line-by-line documentation of the current
audit.rules.
https://www.youtube.com/watch?v=lc1i9h1GyMA
Please contribute your changes as pull requests