Endpoint ✓ fields verified against sample logs

Linux Audit Log (auditd) Fields: type, auid, res and More, Explained

Published

One line per audit record, several records per event: a type (USER_LOGIN, SYSCALL, EXECVE…), a msg=audit(time:serial) stamp that ties the records of one event together, and name=value fields — who (auid, uid), which program (exe), from where (addr) and the result (res).

Official documentation: Linux Audit: field dictionary · Red Hat: Auditing the system (RHEL 9 security hardening) · ausearch(8) manual

Sample record

type=USER_ACCT msg=audit(1705309200.000:18801): pid=3301 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix acct="admin" exe="/usr/sbin/sshd" hostname=10.0.0.50 addr=10.0.0.50 terminal=ssh res=success'
type=CRED_ACQ msg=audit(1705309200.100:18802): pid=3301 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="admin" exe="/usr/sbin/sshd" hostname=10.0.0.50 addr=10.0.0.50 terminal=ssh res=success'

From the LogTriage parser test corpus — synthetic data, no real hosts or users.

Explain this record field by field →

Field reference

Field Type Meaning Why it matters for security
typee.g. USER_LOGIN string Linux Audit: "the audit record's type." USER_* records come from user-space programs (PAM, sshd, sudo); SYSCALL, EXECVE, CWD and PROCTITLE from kernel rules; CONFIG_CHANGE when audit rules change. USER_LOGIN and USER_AUTH with res=failed are login failures; EXECVE shows the arguments of what ran; CONFIG_CHANGE with op=remove_rule is someone turning auditing off.
msge.g. audit(1705329092.800:41243) string Linux Audit: "the payload of the audit record." The first msg=audit(seconds.millis:serial) is the event stamp; user-space records carry a second msg='…' with the program's own fields. Records with the same stamp are one event — a SYSCALL, its EXECVE, CWD and PROCTITLE belong together.
auide.g. 1000 number Linux Audit: "login user ID." The user who logged in, kept through su and sudo. 4294967295 (-1 unsigned) means not set. The field that survives privilege changes — a root command with auid=1000 was run by that user; auid=0 means someone logged in as root directly.
uide.g. 0 number Linux Audit: "user ID" of the process; euid is the effective user ID. uid=0 with an ordinary auid is sudo or su; compare with auid to see who really acted.
sese.g. 3 number Linux Audit: "login session ID." 4294967295 when the process does not belong to a login session. Follow one ses value to see everything a login session did, from the login to the last command.
pide.g. 3301 number Linux Audit: "process ID"; ppid is the parent process ID. The parent tells you what started a command — sshd, a web server or cron.
exee.g. /usr/sbin/sshd string Linux Audit: "executable name" — the full path of the program that wrote or triggered the record. A shell or curl run by a web server or database user is a sign of a compromised service.
comme.g. dnf string Linux Audit: "command line program name" — the short process name, which a program can change. Compare with exe; a comm that does not match the binary can be an attempt to look harmless.
accte.g. admin string Linux Audit: "a user's account name" in PAM records; "(unknown)" or "?" when the name was not a valid account. Many failures with acct="(unknown)" are guesses at user names that do not exist.
addre.g. 203.0.113.45 string Linux Audit: "the remote address that the user is connecting from." "?" for local actions. The source of an SSH login or guess; count failures per address.
hostnamee.g. 10.0.0.50 string Linux Audit: "the hostname that the user is connecting from" — often the address again, or "?". Do not rely on it; addr is the field to group on.
terminale.g. ssh string Linux Audit: "terminal name the user is running programs on" — ssh, a pts device, or cron. terminal=ssh on failures points to remote guessing; pts/N to an interactive session.
ope.g. PAM:authentication string Linux Audit: "the operation being performed that is audited" — the PAM stage (PAM:authentication, PAM:accounting, PAM:setcred), login, adding user, remove_rule. op=adding user and op=remove_rule after a successful login are persistence and cover-up.
rese.g. failed string Linux Audit: "result of the audited operation(success/fail)." Written as success/failed in user-space records and 1/0 in some kernel records. A run of res=failed from one addr followed by res=success is a guess that worked.
keye.g. software-installer string Linux Audit: "key assigned from triggered audit rule" — the label set with -k in the rule. Rules are easier to hunt by key than by syscall; removal of keyed rules shows in CONFIG_CHANGE records.
syscalle.g. 59 number Linux Audit: "syscall number in effect when the event occurred." Numbers depend on the architecture in arch; 59 is execve on x86_64 (arch=c000003e). Use ausearch -i to translate numbers to names before reading.
successe.g. yes string Linux Audit: "whether the syscall was successful or not." exit gives the return code. Failed opens of sensitive files (success=no) are access attempts worth seeing.
argce.g. 3 number Number of arguments in an EXECVE record; a0, a1, … hold each argument. EXECVE arguments are the command line that ran — often hex-encoded, as the sample's curl | bash and reverse shell are.

Have one of your own records? Paste it into the log line explainer and each field is explained from this table, with times, codes and addresses decoded — in your browser.

What it records

The Linux audit system writes to /var/log/audit/audit.log. Every line is one record: type= names what kind, msg=audit(1705309200.000:18801): stamps it with the time in seconds and a serial number, and the rest are name=value fields defined in the Linux Audit field dictionary. Records with the same stamp form one event: a command run under an audit rule produces a SYSCALL record, its EXECVE with the arguments, a CWD and a PROCTITLE.

User-space programs add their own records — PAM writes USER_AUTH, USER_ACCT, CRED_ACQ, USER_START; sshd writes USER_LOGIN; sudo writes USER_CMD — with a second msg='…' holding op, acct, exe, addr, terminal and res. The malicious sample shows a full intrusion: ten failed SSH logins from one address, then a success, then a download piped to bash and a reverse shell (both hex-encoded in EXECVE), a new user added, the audit rules deleted with auditctl -D and the audit daemon stopped.

Where to get it

  • On the host. /var/log/audit/audit.log, rotated as audit.log.1, audit.log.2… according to /etc/audit/auditd.conf. Root is needed to read it.
  • ausearch and aureport. ausearch -i interprets numbers and hex into names and text; aureport summarises logins, executables and failures. See ausearch(8).
  • Rules decide what is logged. Without rules only user-space records (logins, sudo, PAM) appear. Red Hat’s auditing guide shows how to add rules for command execution and sensitive files.
  • Forwarding. The audisp syslog plugin or a log shipper sends records off the host, where an attacker with root cannot delete them.
# Failed logins with names decoded, then a per-address count of failed SSH logins
ausearch -m USER_LOGIN --success no -i
grep 'type=USER_LOGIN' /var/log/audit/audit.log | grep 'res=failed' | grep -o 'addr=[^ ]*' | sort | uniq -c | sort -rn

Parsing pitfalls

  • Events span records. Group by the audit(time:serial) stamp before analysing; a single SYSCALL line lacks the command line that its EXECVE holds.
  • Hex-encoded values. Encoded fields are quoted when plain and hexadecimal when they contain spaces or special characters — cmd, proctitle and EXECVE arguments especially. proctitle separates arguments with NUL bytes.
  • Two msg fields. User-space records have msg=audit(…) and then msg='op=… res=…'; a naive key=value parser keeps only one.
  • Unset IDs. 4294967295 in auid or ses means “not set”, not a real user.
  • Raw vs interpreted. Logs written with log_format = ENRICHED add interpreted names after a separator byte (0x1D); ausearch -i output prints names instead of numbers. Read all three forms.
  • Architecture-specific numbers. syscall numbers differ between architectures; read them with arch.

Detection ideas

  • SSH brute force: many USER_LOGIN or USER_AUTH failures from one addr, then a success — the auditd SSH brute force rule.
  • Command execution after login: EXECVE records with curl or wget piped to a shell, /dev/tcp/ reverse shells, or base64 decoding, after a remote login.
  • Persistence: ADD_USER, changes to authorized_keys, sudoers or cron, and new services.
  • Audit tampering: CONFIG_CHANGE with op=remove_rule or auditctl -D, and SERVICE_STOP for unit=auditd.
  • Privilege use: USER_CMD from sudo and commands whose uid is 0 while auid is an ordinary user.

The free browser analyzer reads audit.log (raw, enriched and ausearch -i output), decodes hex values and runs these checks locally.

Sending Linux audit log (auditd) to an LLM

One megabyte of this format is about 578,022 tokens on current Claude models and 396,692 on GPT models, measured with the models' own tokenizers — so a gigabyte sent raw to Claude Sonnet 5.5 costs about $1,156 in input tokens alone (prices of 2026-10-24). Estimate your own volume →

Detections and guides for Linux audit log (auditd)

Frequently Asked Questions

What does auid=4294967295 mean?
It is -1 written as an unsigned 32-bit number: the login user ID was never set. Processes started by the system rather than by a login, such as sshd before a user has logged in, carry it, as does ses=4294967295. Once a user logs in, auid becomes their user ID and stays the same through su and sudo.
Why are some values long strings of hex?
The field dictionary marks fields such as cmd, exe, acct and the EXECVE arguments as encoded: when a value contains spaces, quotes or other special characters, auditd writes it as hexadecimal instead of quoting it. 646E6620757064617465202D79 is dnf update -y. ausearch -i decodes them, or paste the record into a hex decoder.
How do I find failed SSH logins in audit.log?
Search for USER_LOGIN or USER_AUTH records with res=failed and exe=/usr/sbin/sshd, then count them per addr. With the audit tools: ausearch -m USER_LOGIN --success no -i lists them with names decoded, and aureport --login --failed summarises them. A burst from one address followed by a success is the brute force to escalate.
Can an attacker hide from auditd?
They can try to switch it off, and that leaves records of its own: auditctl -D (delete all rules) produces CONFIG_CHANGE records with op=remove_rule, and stopping the service produces SERVICE_STOP with unit=auditd. The malicious sample ends with both. Forward audit records off the host so the ones written before the stop survive.

Analyze a Linux audit log (auditd) file in your browser

The free analyzer detects this format, parses every field above and flags attack patterns — the file never leaves your machine. For threat-intel enrichment and an AI-written incident report, run it through LogTriage.

Investigating something right now? LogTriage checks every address in the file against threat intelligence and writes the incident report: 10 analyses a month free. The incident pack adds the in-depth AI analysis and files up to 100 MB: 25 analyses for $19, one payment, no subscription. Pricing

How this page was made. The official definitions, field names and examples on it are copied by script from the sources it links and re-checked against them on every build. The investigation advice was drafted with AI from those sources and passed a separate review before publishing. What is checked, and how · found a mistake? [email protected]