1*b6357224SRobert Watson.\" Copyright (c) 2006, 2019 Robert N. M. Watson 20739bd60SRobert Watson.\" All rights reserved. 30739bd60SRobert Watson.\" 4*b6357224SRobert Watson.\" This software was developed in part by BAE Systems, the University of 5*b6357224SRobert Watson.\" Cambridge Computer Laboratory, and Memorial University under DARPA/AFRL 6*b6357224SRobert Watson.\" contract FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent 7*b6357224SRobert Watson.\" Computing (TC) research program. 8*b6357224SRobert Watson.\" 90739bd60SRobert Watson.\" Redistribution and use in source and binary forms, with or without 100739bd60SRobert Watson.\" modification, are permitted provided that the following conditions 110739bd60SRobert Watson.\" are met: 120739bd60SRobert Watson.\" 1. Redistributions of source code must retain the above copyright 130739bd60SRobert Watson.\" notice, this list of conditions and the following disclaimer. 140739bd60SRobert Watson.\" 2. Redistributions in binary form must reproduce the above copyright 150739bd60SRobert Watson.\" notice, this list of conditions and the following disclaimer in the 160739bd60SRobert Watson.\" documentation and/or other materials provided with the distribution. 170739bd60SRobert Watson.\" 180739bd60SRobert Watson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 190739bd60SRobert Watson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 200739bd60SRobert Watson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 210739bd60SRobert Watson.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 220739bd60SRobert Watson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 230739bd60SRobert Watson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 240739bd60SRobert Watson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 250739bd60SRobert Watson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 260739bd60SRobert Watson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 270739bd60SRobert Watson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 280739bd60SRobert Watson.\" SUCH DAMAGE. 290739bd60SRobert Watson.\" 30*b6357224SRobert Watson.Dd April 28, 2019 310739bd60SRobert Watson.Dt AUDIT 4 32aa12cea2SUlrich Spörlein.Os 330739bd60SRobert Watson.Sh NAME 340739bd60SRobert Watson.Nm audit 350739bd60SRobert Watson.Nd Security Event Audit 360739bd60SRobert Watson.Sh SYNOPSIS 370739bd60SRobert Watson.Cd "options AUDIT" 380739bd60SRobert Watson.Sh DESCRIPTION 390739bd60SRobert WatsonSecurity Event Audit is a facility to provide fine-grained, configurable 400739bd60SRobert Watsonlogging of security-relevant events, and is intended to meet the requirements 410739bd60SRobert Watsonof the Common Criteria (CC) Common Access Protection Profile (CAPP) 420739bd60SRobert Watsonevaluation. 430739bd60SRobert WatsonThe 440739bd60SRobert Watson.Fx 45ae91966bSRuslan Ermilov.Nm 46ae91966bSRuslan Ermilovfacility implements the de facto industry standard BSM API, file 470739bd60SRobert Watsonformats, and command line interface, first found in the Solaris operating 480739bd60SRobert Watsonsystem. 490739bd60SRobert WatsonInformation on the user space implementation can be found in 509ca971bcSChristian Brueffer.Xr libbsm 3 . 510739bd60SRobert Watson.Pp 520739bd60SRobert WatsonAudit support is enabled at boot, if present in the kernel, using an 530739bd60SRobert Watson.Xr rc.conf 5 540739bd60SRobert Watsonflag. 550739bd60SRobert WatsonThe audit daemon, 560739bd60SRobert Watson.Xr auditd 8 , 57ae91966bSRuslan Ermilovis responsible for configuring the kernel to perform 58ae91966bSRuslan Ermilov.Nm , 59ae91966bSRuslan Ermilovpushing 600739bd60SRobert Watsonconfiguration data from the various audit configuration files into the 610739bd60SRobert Watsonkernel. 62f10a5f6cSRobert Watson.Ss Audit Special Device 63ae91966bSRuslan ErmilovThe kernel 64ae91966bSRuslan Ermilov.Nm 65ae91966bSRuslan Ermilovfacility provides a special device, 66f10a5f6cSRobert Watson.Pa /dev/audit , 67f10a5f6cSRobert Watsonwhich is used by 68f10a5f6cSRobert Watson.Xr auditd 8 69ae91966bSRuslan Ermilovto monitor for 70ae91966bSRuslan Ermilov.Nm 71ae91966bSRuslan Ermilovevents, such as requests to cycle the log, low disk 72f10a5f6cSRobert Watsonspace conditions, and requests to terminate auditing. 73f10a5f6cSRobert WatsonThis device is not intended for use by applications. 74f10a5f6cSRobert Watson.Ss Audit Pipe Special Devices 75673937acSRobert WatsonAudit pipe special devices, discussed in 76673937acSRobert Watson.Xr auditpipe 4 , 77673937acSRobert Watsonprovide a configurable live tracking mechanism to allow applications to 780af22117SMike Pritchardtee the audit trail, as well as to configure custom preselection parameters 79673937acSRobert Watsonto track users and events in a fine-grained manner. 80*b6357224SRobert Watson.Ss DTrace Audit Provider 81*b6357224SRobert WatsonThe DTrace Audit Provider, 82*b6357224SRobert Watson.Xr dtaudit 4 , 83*b6357224SRobert Watsonallows D scripts to enable capture of in-kernel audit records for kernel audit 84*b6357224SRobert Watsonevent types, and then process their contents during audit commit or BSM 85*b6357224SRobert Watsongeneration. 860739bd60SRobert Watson.Sh SEE ALSO 870739bd60SRobert Watson.Xr auditreduce 1 , 880739bd60SRobert Watson.Xr praudit 1 , 890739bd60SRobert Watson.Xr audit 2 , 900739bd60SRobert Watson.Xr auditctl 2 , 910739bd60SRobert Watson.Xr auditon 2 , 920739bd60SRobert Watson.Xr getaudit 2 , 930739bd60SRobert Watson.Xr getauid 2 , 94f10a5f6cSRobert Watson.Xr poll 2 , 95f10a5f6cSRobert Watson.Xr select 2 , 960739bd60SRobert Watson.Xr setaudit 2 , 970739bd60SRobert Watson.Xr setauid 2 , 980739bd60SRobert Watson.Xr libbsm 3 , 99673937acSRobert Watson.Xr auditpipe 4 , 100*b6357224SRobert Watson.Xr dtaudit 4 , 101923544aaSBaptiste Daroussin.Xr audit.log 5 , 1020739bd60SRobert Watson.Xr audit_class 5 , 1030739bd60SRobert Watson.Xr audit_control 5 , 1040739bd60SRobert Watson.Xr audit_event 5 , 1050739bd60SRobert Watson.Xr audit_user 5 , 1060739bd60SRobert Watson.Xr audit_warn 5 , 1070739bd60SRobert Watson.Xr rc.conf 5 , 1080739bd60SRobert Watson.Xr audit 8 , 10916648b4fSRobert Watson.Xr auditd 8 , 11016648b4fSRobert Watson.Xr auditdistd 8 111ae91966bSRuslan Ermilov.Sh HISTORY 112ae91966bSRuslan ErmilovThe 113ae91966bSRuslan Ermilov.Tn OpenBSM 114ae91966bSRuslan Ermilovimplementation was created by McAfee Research, the security 115ae91966bSRuslan Ermilovdivision of McAfee Inc., under contract to Apple Computer Inc.\& in 2004. 116ae91966bSRuslan ErmilovIt was subsequently adopted by the TrustedBSD Project as the foundation for 117ae91966bSRuslan Ermilovthe OpenBSM distribution. 118ae91966bSRuslan Ermilov.Pp 119ae91966bSRuslan ErmilovSupport for kernel 120ae91966bSRuslan Ermilov.Nm 121ae91966bSRuslan Ermilovfirst appeared in 122ae91966bSRuslan Ermilov.Fx 6.2 . 1230739bd60SRobert Watson.Sh AUTHORS 124ae91966bSRuslan Ermilov.An -nosplit 1250739bd60SRobert WatsonThis software was created by McAfee Research, the security research division 1260739bd60SRobert Watsonof McAfee, Inc., under contract to Apple Computer Inc. 127ae91966bSRuslan ErmilovAdditional authors include 128ae91966bSRuslan Ermilov.An Wayne Salamon , 129ae91966bSRuslan Ermilov.An Robert Watson , 130ae91966bSRuslan Ermilovand SPARTA Inc. 1310739bd60SRobert Watson.Pp 1320739bd60SRobert WatsonThe Basic Security Module (BSM) interface to audit records and audit event 1330739bd60SRobert Watsonstream format were defined by Sun Microsystems. 1340739bd60SRobert Watson.Pp 1350739bd60SRobert WatsonThis manual page was written by 1366c899950SBaptiste Daroussin.An Robert Watson Aq Mt rwatson@FreeBSD.org . 1370739bd60SRobert Watson.Sh BUGS 138ae91966bSRuslan ErmilovThe 1390739bd60SRobert Watson.Fx 1400739bd60SRobert Watsonkernel does not fully validate that audit records submitted by user 1410739bd60SRobert Watsonapplications are syntactically valid BSM; as submission of records is limited 1420739bd60SRobert Watsonto privileged processes, this is not a critical bug. 1430739bd60SRobert Watson.Pp 1440739bd60SRobert WatsonInstrumentation of auditable events in the kernel is not complete, as some 1450739bd60SRobert Watsonsystem calls do not generate audit records, or generate audit records with 1460739bd60SRobert Watsonincomplete argument information. 1470739bd60SRobert Watson.Pp 1480739bd60SRobert WatsonMandatory Access Control (MAC) labels, as provided by the 1490739bd60SRobert Watson.Xr mac 4 1500739bd60SRobert Watsonfacility, are not audited as part of records involving MAC decisions. 15149f12e36SChristian S.J. Peron.Pp 15249f12e36SChristian S.J. PeronCurrently the 15349f12e36SChristian S.J. Peron.Nm 15449f12e36SChristian S.J. Peronsyscalls are not supported for jailed processes. 15549f12e36SChristian S.J. PeronHowever, if a process has 15649f12e36SChristian S.J. Peron.Nm 15749f12e36SChristian S.J. Peronsession state associated with it, audit records will still be produced and a zonename token 15849f12e36SChristian S.J. Peroncontaining the jail's ID or name will be present in the audit records. 159