Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Are Linux Audit Logs?

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.

Illustration for the cybersecurity term Linux Audit Logs
Home / Blog / Cybersecurity Terms / What Are Linux Audit Logs?
17 November 2026

What Are Linux Audit Logs?

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.

How Rules Are Written

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.

Reading What Comes Out

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.

The Detections It Supports

The Performance Problem

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.

Protecting the Log

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.

FAQ – Frequently Asked Questions

Is auditd Enabled by Default on Linux?

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.

Should We Use auditd or an eBPF Agent?

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.

How Do You Stop Audit Logs Filling the Disk?

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.

Can an Attacker With Root Delete Audit Logs?

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.

Related Terms

You May Be Interested In These

What Are IaaS, PaaS and SaaS?

Cybersecurity Terms

17 November 2026

What Are IaaS, PaaS and SaaS?

Read More
What Is Steganography Detection?

Cybersecurity Terms

17 November 2026

What Is Steganography Detection?

Read More
What Is Chaos Engineering in Security?

Cybersecurity Terms

17 November 2026

What Is Chaos Engineering in Security?

Read More