Join our Newsletter — 33% off our NHI Course
Home› Guides› Linux auditd Record Types: SYSCALL, EXECVE, USER_LOGIN and…
Guide Endpoint Security

Linux auditd Record Types: SYSCALL, EXECVE, USER_LOGIN and the Ones Defenders Need

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 14 min read
On this page

Most Linux detection gaps are not missing logs but misread ones: an analyst sees a SYSCALL line, misses the EXECVE and PATH records that share its serial number, and loses the command line and the file that was touched. This reference explains how the Linux Audit system groups records into events, what the record types defenders rely on actually contain, field by field, and how to query them with ausearch and aureport. It covers the kernel records (SYSCALL, EXECVE, PATH, CWD, PROCTITLE, SOCKADDR, CONFIG_CHANGE), the PAM and login records written by user-space programs (USER_AUTH, USER_ACCT, USER_LOGIN, CRED_ACQ, USER_START and their pairs) and the account and anomaly records that flag persistence. It is for Linux defenders and detection engineers who already run auditd; rule sets, buffers, shipping and tamper protection are covered in the Linux Logging and auditd for Defenders Guide, which this page builds on.

Key takeaways

  • An event is a group of records, not a line. Every record from one syscall shares the same msg=audit(timestamp:serial) value; parse and correlate on that pair.
  • auid is the field that answers "who". The login user ID is set at login and survives su and sudo, so a root process still carries the original user's auid and ses.
  • EXECVE and PROCTITLE are not interchangeable. EXECVE holds every argument (split across records when long); PROCTITLE is capped at 128 bytes in the kernel and hex encoded.
  • Authentication has its own record family. USER_AUTH, USER_ACCT, CRED_ACQ, USER_LOGIN, USER_START, USER_END and CRED_DISP come from PAM-aware programs, carry res=success or res=failed, and tell the story of a session in order.
  • CONFIG_CHANGE and DAEMON records watch the watcher. Rule deletions, audit being disabled and auditd stopping are themselves audited and should be high-priority alerts.

How auditd records work

The kernel evaluates audit rules and emits records; auditd writes them to /var/log/audit/audit.log and passes them to dispatcher plugins. User-space programs such as sshd, login, sudo and PAM modules send their own records through the same channel. Each line starts with type=NAME and a msg=audit(1732612345.123:4821) stamp: seconds since the epoch, milliseconds, and an event serial. The ausearch man page describes the serial as the event ID: all records from one application's syscall share it, and the next syscall gets a different one.

Anatomy of a multi-record event

Red Hat's documentation walks through a failed read of /etc/ssh/sshd_config by an unprivileged user, triggered by a watch with key sshd_config. The event has four records:

  1. SYSCALL: arch=c000003e (x86_64), syscall=2 (open on that architecture), success=no, exit=-13 (EACCES), a0 to a3 (first four arguments in hex), items=1 (one PATH record follows), ppid, pid, auid, uid, gid, euid, suid, fsuid, egid, sgid, fsgid, tty, ses, comm, exe, subj (SELinux context) and key="sshd_config".
  2. CWD: the working directory, which turns relative names in PATH records into absolute paths.
  3. PATH: item=0, name, inode, dev, mode, ouid, ogid, rdev, obj, nametype and file capability fields (cap_fp, cap_fi, cap_fe, cap_fver).
  4. PROCTITLE: the full command line, hex encoded; ausearch -i decodes it to cat /etc/ssh/sshd_config.

An execve call adds an EXECVE record, a socket call adds SOCKADDR, and some syscalls add several PATH records (rename produces items for the source, target and parent directories). In the kernel's numbering, EOE (1320) marks the end of a multi-record event, and the auparse library also treats an event as complete once it is end_of_event_timeout seconds older than co-located events (default 2 seconds, set in auditd.conf). Any parser that treats one line as one event, or that does not wait for the full group, loses the command line and the target file. The upshot for SIEM ingestion is simple: reassemble by node, timestamp and serial before you write detections.

Identity fields that matter

FieldMeaningWhy defenders care
auidLogin user ID (loginuid), set at login and inherited by every child processIdentifies the human or service login behind a root action; unset appears as 4294967295 (-1)
sesLogin session IDGroups everything done in one login; search with ausearch --session
uid, euid, suid, fsuidReal, effective, saved and filesystem user IDseuid=0 with auid of a normal user shows privilege use; uid differing from euid flags setuid execution
gid, egid, sgid, fsgidMatching group IDsGroup-based access to sensitive files
tty, terminalTerminal (pts/0, ssh, cron, or none)Interactive versus scheduled or daemon activity
comm, exeCommand name from the task structure, and the executable pathcomm can be changed by the process; prefer exe for allowlists
keyFree text from the rule that firedYour own label; the main way to select meaningful events

Service accounts and daemons started at boot usually have auid unset, which is why upstream guidance writes user rules with -F auid>=1000 -F auid!=unset (adjust 1000 to UID_MIN in /etc/login.defs). A process with an unset auid that suddenly runs interactive tools is worth a look; so is a service account whose auid is set, which means someone logged in as it. For managing those accounts, see the How to Find ssh authorized keys across a server fleet guide.

Core record types

Numeric IDs below are from the kernel header include/uapi/linux/audit.h and the audit-userspace record definitions. ausearch -m accepts either the name or the number, and a comma-separated list without spaces.

Type (ID)SourceKey fieldsDefender use
SYSCALL (1300)Kernel, on a matching syscall rule or watcharch, syscall, success, exit, a0 to a3, items, pid, ppid, auid, uid, euid, ses, tty, comm, exe, keyThe anchor record of an event: who did what, whether it worked
EXECVE (1309)Kernel, on execve and execveatargc, a0, a1 ... (hex when the value contains spaces or special characters); a1_len and a1[0], a1[1] chunks when an argument is longFull command line for process execution detections (T1059.004 Unix Shell)
PATH (1302)Kernel, one per path the syscall toucheditem, name, inode, dev, mode, ouid, ogid, nametypeThe file read, written, created or deleted; nametype shows the role (for example NORMAL, PARENT, CREATE, DELETE)
CWD (1307)KernelcwdResolve relative paths; spot execution from /tmp or /dev/shm
PROCTITLE (1327)Kernelproctitle (hex, truncated at 128 bytes)Quick view of the command line; use EXECVE when completeness matters
SOCKADDR (1306)Kernel, for connect, bind, accept and similarsaddr (hex sockaddr; decoded by ausearch -i or log_format=ENRICHED)Outbound connections from unexpected binaries, reverse shells
CONFIG_CHANGE (1305)Kernel, on audit rule or setting changesauid, ses, op (for example add_rule, remove_rule), key, list, res, audit_enabledRule removal or audit disabled: T1685.004 Disable or Modify Linux Audit System Log
KERN_MODULE (1330)Kernel, on module loadnameRootkit and driver loading (T1547.006 Kernel Modules and Extensions)
BPF (1334)Kernel, on BPF program load and unloadBPF program ID and operationUnexpected eBPF programs on hosts where none are expected
NETFILTER_CFG (1325)Kernel, on netfilter table changesTable, address family and operationHost firewall rules changed outside change control
AVC (1400)SELinuxdenied or granted, scontext, tcontext, tclassConfinement violations; aureport -a summarises them
ANOM_PROMISCUOUS (1700), ANOM_ABEND (1701)Kerneldev, prom; sig, comm, exeSniffing and crashing processes (exploitation attempts); aureport -n
DAEMON_START (1200), DAEMON_END (1201), DAEMON_ABORT (1202)auditdauid, pid, resAudit service stops and failures; a gap between END and the next START is a blind window

Authentication and session records

These come from PAM and login-aware programs and occupy the 1100 to 1199 range reserved for user-space messages. They carry op (the operation), acct (account name), exe, hostname, addr (remote address), terminal and res. PAM records also list grantors, the PAM modules that approved the action.

Type (ID)Written whenWhat to look for
USER_AUTH (1100)Authentication step (password, key, MFA module)res=failed bursts from one addr (T1110 Brute Force); successes for accounts that should never log in interactively
USER_ACCT (1101)Account authorisation (expiry, access rules)Failures for locked or expired accounts still being tried
CRED_ACQ (1103), CRED_REFR (1110), CRED_DISP (1104)Credentials established, refreshed and disposed (for example by su, sudo, sshd, cron)Pairs that bracket a privileged action
USER_LOGIN (1112), USER_LOGOUT (1113)Interactive login completed or endedNew source addresses, logins at odd hours, root logins over SSH (T1021.004 SSH)
LOGIN (1006)Kernel, when loginuid is set (via pam_loginuid)old-auid and auid: the moment a session gets its identity
USER_START (1105), USER_END (1106)PAM session opened and closedSession duration; sessions with no matching end
USER_CMD (1123)sudo runs a commandcmd (hex), cwd, terminal, res: privileged commands by user (T1548.003 Sudo and Sudo Caching)
USER_CHAUTHTOK (1108)Password or token changedPassword changes on service accounts
ADD_USER (1114), DEL_USER (1115), ADD_GROUP (1116), USER_MGMT (1102), GRP_MGMT (1132)Account and group changes by shadow-utils toolsNew local accounts (T1136.001 Local Account) and additions to wheel or sudo groups
ANOM_LOGIN_FAILURES (2100), ANOM_ROOT_TRANS (2117)Failure limit reached; user became rootHigh-signal anomalies; check which programs emit them on your distribution
SOFTWARE_UPDATE (1138)Package installs and removals where the package manager plugin is present (rpm-plugin-audit on RHEL)Tooling installed on servers outside patch windows

On a typical PAM-based system, an SSH password login produces records along the lines of USER_AUTH, USER_ACCT, CRED_ACQ, LOGIN, USER_START and USER_LOGIN, then USER_END, CRED_DISP and USER_LOGOUT at the end. Each uses its own serial, so correlate the session with ses, pid and addr rather than the serial. Keys are not the whole story: these records do not show which authorised key was used, which is why many baselines raise sshd LogLevel to VERBOSE and keep journald alongside audit records.

Rules that generate useful records

Kernel records only exist when a rule matches; the user-space authentication records above appear whenever auditd is running. Write rules with keys so every SYSCALL carries a meaningful label, and give related rules a common key, as the audit.rules man page advises.

GoalRule pattern (illustrative)Records produced
Process execution by logged-in users-a always,exit -F arch=b64 -S execve -F auid>=1000 -F auid!=unset -k execSYSCALL, EXECVE, CWD, PATH (binary and interpreter), PROCTITLE
Credential file access-w /etc/shadow -p rwa -k identitySYSCALL, CWD, PATH, PROCTITLE (T1003.008)
SSH key persistenceWatch on /root/.ssh and authorised key paths -p wa -k sshkeysSYSCALL, PATH with nametype CREATE or NORMAL (T1098.004 SSH Authorized Keys)
Scheduled tasks-w /etc/cron.d -p wa -k cronSYSCALL, PATH (T1053.003 Cron)
Kernel modules-a always,exit -F arch=b64 -S init_module,finit_module,delete_module -k modulesSYSCALL, KERN_MODULE
Failed access attempts-a always,exit -F arch=b64 -S open,openat,openat2 -F exit=-EPERM -k accessSYSCALL (success=no), PATH
Audit configuration-w /etc/audit/ -p wa -k auditconfigSYSCALL, PATH, plus CONFIG_CHANGE when rules load

Add matching -F arch=b32 rules on 64-bit hosts that can run 32-bit binaries, or a process can avoid the b64 rule by using the 32-bit syscall table. Test each rule in a lab, confirm with auditctl -l, trigger it and check the record set with ausearch -k. Upstream sample rule files and the performance side are covered in the Linux Logging and auditd for Defenders Guide.

Parsing and forwarding

ausearch

  • By type: ausearch -m USER_LOGIN -sv no -ts today returns today's failed logins; -m accepts lists such as -m USER_AUTH,USER_ACCT.
  • By key: ausearch -k identity -i -ts recent (recent is the last ten minutes).
  • By event: ausearch -a 4821 returns every record with that serial; add -ts if serials repeat across reboots.
  • By session or user: ausearch --session 12 or ausearch -ua 1001 (any of uid, euid or auid).
  • Output: -i interprets numeric fields and hex; --format csv or text produces normalised output; --raw keeps original records for piping into aureport.

The ausearch man page warns that interpreting unenriched logs on another machine uses that machine's account database and can mislead. Set log_format = ENRICHED in auditd.conf, which resolves uid, gid, syscall, architecture and socket address information before the record is written or forwarded.

aureport

  • Start broad: aureport with no options gives the summary of logins, authentications, anomalies and AVCs; the audit.rules man page suggests starting any investigation here.
  • Targeted reports: -au authentication attempts, -l logins, -m account modifications, -n anomalies, -k keys, -x executables, -tm terminals; add --failed, --success or --summary.
  • Chain with ausearch: ausearch --start this-week -k access --raw | aureport --file --summary lists the files with denied access; every aureport line carries an event number you can open with ausearch -a.

Forwarding to a SIEM

Ship records with the audisp syslog plugin, a log agent that reads audit.log, or a collector that understands multi-record events. Whatever the path, the pipeline should group records by node, timestamp and serial, decode hex fields (proctitle, EXECVE arguments, cmd, saddr), keep raw values for evidence, and alert on DAEMON_END or DAEMON_ABORT without a following DAEMON_START. Retention and integrity are covered in the CIS Control 8 Audit Log Management Guide; detection design in the Detection Engineering Guide.

Measuring coverage

  • Share of Linux hosts sending SYSCALL, EXECVE and USER_LOGIN records to the SIEM in the last 24 hours.
  • Share of events correctly reassembled (SYSCALL with items=N has N PATH records attached).
  • Lost record count from auditctl -s, trending to zero.
  • Time from a CONFIG_CHANGE or DAEMON_END on a production host to an analyst acknowledging it.
  • Number of detections that use auid rather than uid for attribution.

Framework mapping

FrameworkReferenceRecords that provide evidence
NIST SP 800-53 Rev. 5AU-2 Event Logging, AU-3 Content of Audit Records, AU-12 Audit Record GenerationSYSCALL identity and outcome fields, keyed rules
NIST SP 800-53 Rev. 5AU-6 Audit Record Review, AU-9 Protection of Audit Informationaureport reviews; CONFIG_CHANGE and DAEMON records
NIST CSF 2.0DE.CM-09Execution, file and module records on hosts
MITRE ATT&CKT1059.004, T1548.003, T1136.001, T1098.004, T1685.004EXECVE, USER_CMD, ADD_USER, PATH on key files, CONFIG_CHANGE

Common failure patterns

  • Line-by-line parsing: detections on SYSCALL alone fire without the command line, and EXECVE records arrive without the user.
  • Trusting PROCTITLE for full commands: long arguments are cut at 128 bytes; attackers can push the interesting part past the limit.
  • Attributing by uid: every sudo action looks like root; auid and ses show who it really was.
  • No b32 rules: 64-bit-only execve rules miss 32-bit binaries on the same host.
  • Raw logs read elsewhere: interpreting RAW logs on an analysis host maps UIDs to the wrong names.
  • Ignoring the watcher: no alert on CONFIG_CHANGE with remove_rule or on auditd stopping, so tampering goes unseen.

Practitioner checklist

  • Reassemble events by node, timestamp and serial before any detection runs.
  • Set log_format = ENRICHED on hosts whose logs are analysed centrally.
  • Attribute actions with auid and ses, and treat auid unset on interactive tools as suspicious.
  • Use EXECVE for command-line detections and decode hex arguments, including split a1[0] style chunks.
  • Alert on USER_AUTH failure bursts, new USER_LOGIN sources, ADD_USER and group changes.
  • Alert on CONFIG_CHANGE, DAEMON_END and DAEMON_ABORT, and on gaps in a host's records.
  • Add b32 counterparts to execve and key syscall rules on 64-bit systems.
  • Keep keyed rules for credential files, SSH keys, cron, modules and the audit configuration, and test each one.

Standards and references

Related NHI Mgmt Group resources: Linux Logging and auditd for Defenders Guide · Detection Engineering Guide · CIS Control 8 Audit Log Management Guide · How to check a Linux server for signs of compromise

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.