AUDIT(4)

✨ audit(4) β€” the Kernel Interfaces Manual glow-up ✨

okay bestie, welcome to audit, aka Security Event Audit β€” and yes it lives in section 4 of the manual, we're doing kernel interfaces today πŸ’…


πŸŽ€ NAME πŸŽ€

audit β€” Security Event Audit. that's it, that's the name, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

options AUDIT

πŸ’– DESCRIPTION πŸ’–

so like. Security Event Audit is a whole facility whose entire job is giving you fine-grained, configurable logging of security-relevant events. it's literally built to meet the requirements of the Common Criteria (CC) Common Access Protection Profile (CAPP) evaluation. the FreeBSD audit facility implements the de facto industry standard BSM API, file formats, and command line interface β€” which was first found in the Solaris operating system, iykyk. if you wanna know about the user space implementation, go read libbsm(3) 🫢

Audit support is enabled at boot, if it's present in the kernel, using an rc.conf(5) flag. the audit daemon, auditd(8), is the one responsible for configuring the kernel to perform audit β€” it pushes configuration data from the various audit configuration files into the kernel. main character energy fr fr πŸ‘‘

🌸 Audit Special Device 🌸

The kernel audit facility provides a special device, /dev/audit, which is used by auditd(8) to monitor for audit events, such as requests to cycle the log, low disk space conditions, and requests to terminate auditing. this device is not intended for use by applications, okay? like, not yours, not mine, hands off πŸ™ˆ

🧚 Audit Pipe Special Devices 🧚

Audit pipe special devices, discussed over in auditpipe(4), provide a configurable live tracking mechanism to allow applications to tee the audit trail, as well as to configure custom preselection parameters to track users and events in a fine-grained manner. it's giving surveillance but make it ✨artisanal✨

⭐ DTrace Audit Provider ⭐

The DTrace Audit Provider, dtaudit(4), allows D scripts to enable capture of in-kernel audit records for kernel audit event types, and then process their contents during audit commit or BSM generation. obsessed with her tbh πŸ¦‹


🌈 SEE ALSO 🌈

the whole group chat, no one left out πŸ’œ


πŸ“œ HISTORY πŸ“œ

The OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer Inc. in 2004. it was subsequently adopted by the TrustedBSD Project as the foundation for the OpenBSM distribution. lore unlocked πŸ”“

Support for kernel audit first appeared in FreeBSD 6.2. og era fr πŸ’€


πŸ‘‘ AUTHORS πŸ‘‘

This software was created by McAfee Research, the security research division of McAfee, Inc., under contract to Apple Computer Inc. Additional authors include Wayne Salamon, Robert Watson, and SPARTA Inc.

The Basic Security Module (BSM) interface to audit records and audit event stream format were defined by Sun Microsystems.

This manual page was written by Robert Watson <rwatson@FreeBSD.org>. thank you robert, we love you 🫢


πŸ’€ BUGS πŸ’€

okay so. the receipts, bestie β€” read them, they're important:

  • The FreeBSD kernel does not fully validate that audit records submitted by user applications are syntactically valid BSM; but since submission of records is limited to privileged processes, this is not a critical bug. (still a lil yikes tho πŸ™ˆ)
  • Instrumentation of auditable events in the kernel is not complete, as some system calls do not generate audit records, or generate audit records with incomplete argument information. like, she's trying her best 😭
  • Mandatory Access Control (MAC) labels, as provided by the mac(4) facility, are not audited as part of records involving MAC decisions.
  • Currently the audit syscalls are not supported for jailed processes. However, if a process has audit session state associated with it, audit records will still be produced and a zonename token containing the jail's ID or name will be present in the audit records. so like, half in half out, it's giving situationship πŸ¦‹
lowkey read the BUGS section twice. no cap. it's the difference between "I understand audit" and "I think I understand audit."

and that's the page, periodt πŸ’… this one's from Debian, dated April 28, 2019 β€” so shout out to that whole era of the manual, she ate and left no crumbs. now go enable your audit flag and stay iconic, bestie πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from