Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
The Linux audit subsystem records system calls, file access, and authentication at kernel level. Configured well it is the richest source on a Linux host; configured by default it records almost nothing useful.

What Are Linux Audit Logs?
The Linux kernel contains an auditing subsystem that can record system calls, file access, and authentication events as they happen. The userspace daemon auditd receives those records and writes them, usually to /var/log/audit/audit.log. The capability is present on every mainstream distribution, and on most systems it is configured to record very little, because the default rule set exists to satisfy minimal compliance rather than to support detection.
Rules live in /etc/audit/rules.d/ and are loaded by augenrules. Two forms matter. Syscall rules watch kernel calls; file watches monitor paths. A practical starting set looks like this:
-a always,exit -F arch=b64 -S execve -k exec
-w /etc/passwd -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/sudoers -p wa -k privilege
-w /root/.ssh/authorized_keys -p wa -k persistence
-a always,exit -F arch=b64 -S ptrace -k inject
The -k key is what makes the output usable: ausearch -k persistence retrieves everything tagged with it. Without keys, searching the raw log is unpleasant enough that people stop doing it.
The widely referenced rule set published by Florian Roth, and the Linux audit configurations aligned to CIS benchmarks, are reasonable starting points, but both need trimming. Deploying a comprehensive rule set unmodified on a busy server is the fastest way to have auditing disabled by an angry platform team.
Audit records are verbose and awkward. An execution produces several lines sharing a timestamp and event identifier: a SYSCALL record with the process, user, and result, an EXECVE record with the arguments, a CWD record with the working directory, and PATH records for the files involved. Arguments containing spaces or special characters are hex-encoded, which is why ausearch -i for interpretation is the tool to reach for rather than reading the file directly.
Two fields repay attention. auid, the audit user identity, survives privilege changes, so it tells you which human logged in before they became root, which the effective user identity does not. And ses, the session identifier, groups everything done within one login.
execve.ptrace for process injection.Auditing every execve on a build server or a container host generates enormous volume and measurable overhead, and under pressure the kernel backlog fills. What happens then is governed by failure_mode: records are silently dropped, the daemon logs the loss, or, if configured to panic, the host halts. Dropped records are the realistic risk, and they are invisible unless you monitor the counters reported by auditctl -s.
Mitigate by excluding high-frequency benign binaries explicitly, raising the backlog limit, and keeping rule counts modest. Where the overhead is unacceptable, the modern alternative is an eBPF-based collector, which filters in the kernel and attributes events to containers correctly, something auditd does poorly because it reports host-level process identifiers.
An attacker with root can edit /var/log/audit/audit.log. Forward records off the host in near real time, which is the only durable answer, and consider immutable mode by appending -e 2 to the rules, after which the configuration cannot be changed without a reboot. The reboot itself then becomes a detection.
For UK organisations, audit logs frequently carry obligations as well as value: PCI DSS requirement 10 expects this level of recording on in-scope systems, and the NCSC Cyber Assessment Framework principle C1.b expects logs to be secured against tampering. Both are easier to evidence when records leave the host immediately. At Privia Security, we review Linux audit configuration during our infrastructure and architecture review services, where the usual finding is a default rule set and no forwarding.
The daemon is usually installed and running on enterprise distributions, but the shipped rule set is minimal and aimed at basic compliance rather than detection. Without rules, the subsystem records almost nothing of security value. Check what is actually loaded with auditctl -l before assuming you have coverage, and treat an empty or default rule list as no auditing at all.
eBPF performs better, filters inside the kernel, and attributes events to containers correctly, which makes it the better default for modern estates. auditd remains relevant where a mature rule set is already in place, where a compliance requirement names it specifically, or on kernels too old for the useful eBPF hooks. Running both during a transition is common and acceptable if the volume can be handled.
Configure rotation and size limits in auditd.conf, choose a failure mode deliberately rather than leaving the default, exclude high-frequency benign activity in the rules, and forward records off the host so local storage is a buffer rather than the archive. Monitor the lost-record counters from auditctl -s, because silent drops under load are far more common than a full disk.
Locally, yes. The defences are to forward records off the host in near real time so a copy exists elsewhere within seconds, and to set the audit configuration to immutable mode so rules cannot be changed without rebooting. Neither prevents deletion of the local file, but both ensure the attempt leaves evidence somewhere the attacker does not control.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.