<?Pub UDT _bookmark _target?><?Pub EntList bull rArr sect?><?Pub CX solbook(?><chapter id="auditov-1"><?Pub Tag atict:info tracking="off" ref="0"?><?Pub Tag atict:user
user="sharonr" fullname="Sharon Veach"?><?Pub Tag atict:user user="kathys"
fullname="Kathy Slattery"?><title>Solaris Auditing (Overview)</title><highlights><para>Solaris auditing keeps a record of how the system is being used. The
auditing service includes tools to assist with the analysis of the auditing
data.</para><itemizedlist><para>This chapter introduces how auditing works in the Solaris Operating System. The following
is a list of the information in this chapter.</para><listitem><para><olink targetptr="auditov-2" remap="internal">What Is Auditing?</olink></para>
</listitem><listitem><para><olink targetptr="auditov-3" remap="internal">How Does Auditing Work?</olink></para>
</listitem><listitem><para><olink targetptr="auditov-9" remap="internal">How Is Auditing Related to Security?</olink></para>
</listitem><listitem><para><olink targetptr="auditov-6" remap="internal">Audit Terminology and Concepts</olink></para>
</listitem><listitem><para><olink targetptr="auditov-8" remap="internal">Auditing on a System With Zones</olink></para>
</listitem><listitem><para><olink targetptr="auditov-4" remap="internal">Solaris Auditing Enhancements
in the Solaris 10 Release</olink></para>
</listitem>
</itemizedlist><para>For planning suggestions, see <olink targetptr="auditplan-1" remap="internal">Chapter&nbsp;29,
Planning for Solaris Auditing</olink>. For procedures to configure auditing
at your site, see <olink targetptr="audittask-1" remap="internal">Chapter&nbsp;30, Managing
Solaris Auditing (Tasks)</olink>. For reference information, see <olink targetptr="auditref-1" remap="internal">Chapter&nbsp;31, Solaris Auditing (Reference)</olink>.</para>
</highlights><sect1 id="auditov-2"><title>What Is Auditing?</title><indexterm><primary>Basic Security Module (BSM)</primary><see>auditing</see>
</indexterm><indexterm><primary>Basic Security Module (BSM)</primary><see>device allocation</see>
</indexterm><indexterm><primary>audit tokens</primary><seealso>individual audit token names</seealso>
</indexterm><indexterm><primary>audit logs</primary><seealso>audit files</seealso>
</indexterm><indexterm><primary>classes</primary><see>audit classes</see>
</indexterm><indexterm><primary>audit ID</primary><secondary>overview</secondary>
</indexterm><indexterm><primary>IDs</primary><secondary>audit</secondary><tertiary>overview</tertiary>
</indexterm><indexterm><primary>user ID</primary><secondary>audit ID and</secondary>
</indexterm><para>Auditing is the collecting of data about the use of system resources.
The audit data provides a record of security-related system events. This data
can then be used to assign responsibility for actions that take place on a
host. Successful auditing starts with two security features: identification
and authentication. At each login, after a user supplies a user name and password,
a unique audit session ID is generated and associated with the user's process.
The audit session ID is inherited by every process that is started during
the login session. Even if a user changes identity within a single session,
all user actions are tracked with the same audit session ID. For more details
about changing identity, see the <olink targetdoc="group-refman" targetptr="su-1m" remap="external"><citerefentry><refentrytitle>su</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para><itemizedlist><para>The auditing service makes the following possible:</para><listitem><para>Monitoring security-relevant events that take place on the
host</para>
</listitem><listitem><para>Recording the events in a network-wide audit trail</para>
</listitem><listitem><para>Detecting misuse or unauthorized activity</para>
</listitem><listitem><para>Reviewing patterns of access and the access histories of individuals
and objects</para>
</listitem><listitem><para>Discovering attempts to bypass the protection mechanisms</para>
</listitem><listitem><para>Discovering extended use of privilege that occurs when a user
changes identity</para>
</listitem>
</itemizedlist><para>During system configuration, you preselect which classes of audit records
to monitor. You can also fine-tune the degree of auditing that is done for
individual users.</para><para><indexterm><primary>administering</primary><secondary>auditing</secondary><tertiary>description</tertiary></indexterm>After audit data is collected,
postselection tools enable you to reduce and examine interesting parts of
the audit trail. For example, you can choose to review audit records for individual
users or specific groups. You can examine all records for a certain type of
event on a specific day. Or, you can select records that were generated at
a certain time of day.</para><para>Systems that install non-global zones can audit all zones identically
from the global zone. These systems can also be configured to collect different
records in the non-global zones. For more information, see <olink targetptr="auditref-28" remap="internal">Auditing and Solaris Zones</olink>.</para>
</sect1><sect1 id="auditov-3"><title>How Does Auditing Work?</title><itemizedlist><para><indexterm><primary>audit records</primary><secondary>events that generate</secondary></indexterm>Auditing generates audit records when specified events occur.
Most commonly, events that generate audit records include the following:</para><listitem><para>System startup and system shutdown</para>
</listitem><listitem><para>Login and logout</para>
</listitem><listitem><para>Process creation or process destruction, or thread creation
or thread destruction</para>
</listitem><listitem><para>Opening, closing, creating, destroying, or renaming of objects</para>
</listitem><listitem><para>Use of privilege capabilities or role-based access control
(RBAC)</para>
</listitem><listitem><para>Identification actions and authentication actions</para>
</listitem><listitem><para>Permission changes by a process or user</para>
</listitem><listitem><para>Administrative actions, such as installing a package</para>
</listitem><listitem><para>Site-specific applications</para>
</listitem>
</itemizedlist><itemizedlist><para>Audit records are generated from three sources:</para><listitem><para>By an application</para>
</listitem><listitem><para>As a result of an asynchronous event</para>
</listitem><listitem><para>As a result of a process system call</para>
</listitem>
</itemizedlist><para>Once the relevant event information has been captured, the information
is formatted into an audit record. The record is then written to audit files.
Complete audit records are stored in binary format. With the Solaris 10 release,
audit records can also be logged by the <command>syslog</command> utility.</para><para><indexterm><primary><filename>audit_control</filename> file</primary><secondary>overview</secondary></indexterm><indexterm><primary>audit trail</primary><secondary>overview</secondary></indexterm>Audit files that are stored in
binary format can be stored in a local partition. The files can also be stored
on NFS-mounted file servers. The location can include multiple partitions
on the same system, partitions on different systems, or partitions on systems
on different but linked networks. The collection of audit files that are linked
together is considered an <firstterm>audit trail</firstterm>. Audit records
accumulate in audit files chronologically. Contained in each audit record
is information that identifies the event, what caused the event, the time
of the event, and other relevant information.</para><para><indexterm><primary><filename>syslog.conf</filename> file</primary><secondary>audit records</secondary></indexterm><indexterm><primary>audit records</primary><secondary><filename>syslog.conf</filename> file</secondary></indexterm>Audit records can also be monitored by using the <command>syslog</command> utility.
These audit logs can be stored locally. Or, the logs can be sent to a remote
system over the UDP protocol. For more information, see <olink targetptr="auditov-21" remap="internal">Audit Files</olink>.</para>
</sect1><sect1 id="auditov-9"><title>How Is Auditing Related to Security?</title><indexterm><primary>security</primary><secondary>auditing and</secondary>
</indexterm><para>Solaris auditing helps to detect potential security breaches by revealing
suspicious or abnormal patterns of system usage. Solaris auditing also provides
a means to trace suspect actions back to a particular user, thus serving as
a deterrent. Users who know that their activities are being audited are less
likely to attempt malicious activities.</para><para>To protect a computer system, especially a system on a network, requires
mechanisms that control activities before system processes or user processes
begin. Security requires tools that monitor activities as the activities occur.
Security also requires reports of activities after the activities have happened.
Initial configuration of Solaris auditing requires that parameters be set
before users log in or system processes begin. Most auditing activities involve
monitoring current events and reporting those events that meet the specified
parameters. How Solaris auditing monitors and reports these events is discussed
in detail in <olink targetptr="auditplan-1" remap="internal">Chapter&nbsp;29, Planning for
Solaris Auditing</olink> and <olink targetptr="audittask-1" remap="internal">Chapter&nbsp;30,
Managing Solaris Auditing (Tasks)</olink>.</para><itemizedlist><para>Auditing cannot prevent hackers from unauthorized entry. However, the
auditing service can report, for example, that a specific user performed specific
actions at a specific time and date. The audit report can identify the user
by entry path and user name. Such information can be reported immediately
to your terminal and to a file for later analysis. Thus, the auditing service
provides data that helps you determine the following:</para><listitem><para>How system security was compromised</para>
</listitem><listitem><para>What loopholes need to be closed to ensure the desired level
of security</para>
</listitem>
</itemizedlist>
</sect1><sect1 id="auditov-6"><title>Audit Terminology and Concepts</title><para>The following terms are used to describe the auditing service. Some
definitions include pointers to more complete descriptions.</para><table frame="topbot" id="auditov-tbl-2"><title>Solaris Auditing Terms</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="colspec0" colwidth="18.38*"/><colspec colname="colspec1" colwidth="81.62*"/><thead><row rowsep="1"><entry><para>Term</para>
</entry><entry><para>Definition</para>
</entry>
</row>
</thead><tbody><row><entry><para>Audit class</para>
</entry><entry><para><indexterm><primary>audit classes</primary><secondary>description</secondary></indexterm>A grouping of audit events. Audit classes provide a way to select
a group of events to be audited. For more information, see <olink targetptr="auditov-20" remap="internal">Audit Classes and Preselection</olink>.</para>
</entry>
</row><row><entry><para>Audit directory</para>
</entry><entry><para><indexterm><primary>audit directory</primary><secondary>description</secondary></indexterm>A repository of audit files in binary format. For a description
of the types of audit directories, see <olink targetptr="auditov-21" remap="internal">Audit
Files</olink>.</para>
</entry>
</row><row><entry><para>Audit event</para>
</entry><entry><para><indexterm><primary>audit events</primary><secondary>summary</secondary></indexterm>A security-related system action that is audited. For ease of
selection, events are grouped into audit classes. For a discussion of the
system actions that can be audited, see <olink targetptr="auditov-16" remap="internal">Audit
Events</olink>.</para>
</entry>
</row><row><entry><para>Audit policy</para>
</entry><entry><para><indexterm><primary>audit policy</primary><secondary>description</secondary></indexterm>A set of auditing options that you can enable or disable at your
site. These options include whether to record certain kinds of audit data.
The options also include whether to suspend auditable actions when the audit
trail is full. For more information, see <olink targetptr="auditplan-5" remap="internal">Determining
Audit Policy</olink>.</para>
</entry>
</row><row><entry><para>Audit record</para>
</entry><entry><para><indexterm><primary>audit records</primary><secondary>description</secondary></indexterm>Audit data that is stored in audit files. An audit record describes
a single audit event. Each audit record is composed of audit tokens. For more
information about audit records, see <olink targetptr="auditov-27" remap="internal">Audit Records
and Audit Tokens</olink>.</para>
</entry>
</row><row><entry><para>Audit token</para>
</entry><entry><para><indexterm><primary>audit tokens</primary><secondary>description</secondary></indexterm>A field of an audit record or event. Each audit token describes
an attribute of an audit event, such as a user, a program, or other object.
For descriptions of all the audit tokens, see <olink targetptr="aparecord-11" remap="internal">Audit
Token Formats</olink>.</para>
</entry>
</row><row><entry><para>Audit trail</para>
</entry><entry><para><indexterm><primary>audit trail</primary><secondary>description</secondary></indexterm>A collection of one or more audit files that store the audit data
from all systems that run the auditing service. For more information, see <olink targetptr="auditref-75" remap="internal">Audit Trail</olink>.</para>
</entry>
</row><row><entry><para>Preselection</para>
</entry><entry><para><indexterm><primary>preselection in auditing</primary></indexterm><indexterm><primary>auditing</primary><secondary>preselection definition</secondary></indexterm><indexterm><primary>audit classes</primary><secondary>preselection</secondary></indexterm>Preselection is the choice of which audit classes to monitor before
you enable the auditing service. The audit events of preselected audit classes
appear in the audit trail. Audit classes that are not preselected are not
audited, so  their events do not appear in the audit trail. A postselection
tool, the <command>auditreduce</command> command, selects records from the
audit trail. For more information, see <olink targetptr="auditov-20" remap="internal">Audit
Classes and Preselection</olink>.</para>
</entry>
</row><row><entry><para>Public objects</para>
</entry><entry><para><indexterm><primary>public directories</primary><secondary>auditing</secondary></indexterm><indexterm><primary>public objects</primary><secondary>auditing</secondary></indexterm><indexterm><primary>files</primary><secondary>public objects</secondary></indexterm> <indexterm><primary>audit trail</primary><secondary>no public objects</secondary></indexterm><indexterm><primary>audit class preselection</primary><secondary>effect on public objects</secondary></indexterm>A public object
is a file that is owned by the <literal>root</literal> user and readable by
the world. For example, files in the <filename class="directory">/etc</filename> directory
and the <filename class="directory">/usr/bin</filename> directory are public
objects. Public objects are not audited for read-only events. For example,
even if the <literal>file_read</literal> (<literal>fr</literal>) audit class
is preselected, the reading of public objects is not audited. You can override
the default by changing the <literal>public</literal> audit policy option.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><sect2 id="auditov-16"><title>Audit Events</title><para><indexterm><primary>administering</primary><secondary>auditing</secondary><tertiary>audit events</tertiary></indexterm><indexterm><primary>audit classes</primary><secondary>description</secondary></indexterm><indexterm><primary>audit events</primary><secondary><filename>audit_event</filename> file</secondary></indexterm><indexterm><primary>audit events</primary><secondary>description</secondary></indexterm><indexterm><primary><filename>audit_event</filename> file</primary><secondary>description</secondary></indexterm><indexterm><primary><filename>/etc/security/audit_event</filename> file</primary><secondary>audit events and</secondary></indexterm><indexterm><primary>event</primary><secondary>description</secondary></indexterm>Security-relevant
system actions can be audited. These auditable actions are defined as <emphasis>audit
events</emphasis>. Audit events are listed in the <filename>/etc/security/audit_event</filename> file. Each audit event is defined in the file by an event number,
a symbolic name, a short description, and the set of audit classes to which
the event belongs.  For more information on the <filename>audit_event</filename> file,
see the <olink targetdoc="group-refman" targetptr="audit-event-4" remap="external"><citerefentry><refentrytitle>audit_event</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page.</para><para>For example, the following entry defines the audit event for the <function>exec</function> system call:</para><screen>7:AUE_EXEC:exec(2):ps,ex</screen><para>When you preselect for auditing either the audit class <literal>ps</literal> or
the audit class <literal>ex</literal>, then <function>exec</function> system
calls are recorded in the audit trail.</para><para>Solaris auditing handles <emphasis>attributable</emphasis> and <emphasis>nonattributable</emphasis> events. The <function>exec</function> system call can be attributed
to a user, so the call is considered an attributable event. Events are nonattributable
if the events occur at the kernel-interrupt level. Events that occur before
a user is authenticated are also nonattributable. The <literal>na</literal> audit
class handles audit events that are nonattributable. For example, booting
the system is a nonattributable event.</para><screen>113:AUE_SYSTEMBOOT:system booted:na</screen><para>When the class to which an audit event belongs is preselected for auditing,
the event is recorded in the audit trail. For example, when you preselect
the <literal>ps</literal> and <literal>na</literal> audit classes for auditing,
the <function>exec</function> system calls and system boot actions, among
other events, are recorded in the audit trail.</para><para>In addition to the audit events that are defined by the Solaris auditing
service, third-party applications can generate audit events. Audit event numbers
from 32768 to 65535 are available for third-party applications.</para>
</sect2><sect2 id="auditov-20"><title>Audit Classes and Preselection</title><indexterm><primary>administering</primary><secondary>auditing</secondary><tertiary>audit classes</tertiary>
</indexterm><indexterm><primary>audit classes</primary><secondary>overview</secondary>
</indexterm><para>Each audit event belongs to an <emphasis>audit class</emphasis> or classes.
Audit classes are convenient containers for large numbers of audit events.
When you <emphasis>preselect</emphasis> a class to be audited, you specify
that all the events in that class should be recorded in the audit trail. You
can preselect for events on a system and for events initiated by a particular
user. After the auditing service is running, you can dynamically add or remove
audit classes from the preselected classes.</para><itemizedlist><listitem><para><emphasis role="strong">System-wide preselection &ndash;</emphasis> Specify
system-wide defaults for auditing in the <literal>flags</literal>, <literal>naflags</literal>, and <literal>plugin</literal> lines in the <filename>audit_control</filename> file.
The <filename>audit_control</filename> file is described in <olink targetptr="auditref-12" remap="internal">audit_control File</olink>. See also the <olink targetdoc="group-refman" targetptr="audit-control-4" remap="external"><citerefentry><refentrytitle>audit_control</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page.</para>
</listitem><listitem><para><indexterm><primary><filename>audit_user</filename> database</primary><secondary>exception to system-wide audit classes</secondary></indexterm><indexterm><primary>audit classes</primary><secondary>exceptions to system-wide settings</secondary></indexterm><emphasis role="strong">User-specific preselection &ndash;</emphasis> Specify
additions to the system-wide auditing defaults for individual users in the <filename>audit_user</filename> database.</para><para>The audit preselection mask determines
which classes of events are audited for a user. The user's audit preselection
mask is a combination of the system-wide defaults and the audit classes that
are specified for the user. For a more detailed discussion, see <olink targetptr="auditref-55" remap="internal">Process Audit Characteristics</olink>.</para><para>The <filename>audit_user</filename> database can be administered locally
or by a name service. The Solaris Management Console provides the graphical
user interface (GUI) to administer the database. For details, see the <olink targetdoc="group-refman" targetptr="audit-user-4" remap="external"><citerefentry><refentrytitle>audit_user</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page.</para>
</listitem><listitem><para><indexterm><primary><command>auditconfig</command> command</primary><secondary>audit classes as arguments</secondary></indexterm><emphasis role="strong">Dynamic preselection &ndash;</emphasis> Specify audit classes
as arguments to the <command>auditconfig</command> command to add or remove
those audit classes from a process or session. For more information, see the <olink targetdoc="group-refman" targetptr="auditconfig-1m" remap="external"><citerefentry><refentrytitle>auditconfig</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para>
</listitem>
</itemizedlist><para>A postselection command, <command>auditreduce</command>, enables you
to select records from the preselected audit records. For more information,
see <olink targetptr="auditov-23" remap="internal">Examining the Audit Trail</olink> and the <olink targetdoc="group-refman" targetptr="auditreduce-1m" remap="external"><citerefentry><refentrytitle>auditreduce</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><para>Audit classes are defined in the <filename>/etc/security/audit_class</filename> file.
Each entry contains the audit mask for the class, the name for the class,
and a descriptive name for the class. For example, the <literal>ps</literal> and <literal>na</literal> class definitions appear in the <filename>audit_class</filename> file
as follows:</para><screen>0x00100000:ps:process start/stop
0x00000400:na:non-attribute</screen><para><indexterm><primary>audit trail</primary><secondary>events included</secondary></indexterm>There are 32 possible audit classes. The classes include the two
global classes: <literal>all</literal> and <literal>no</literal>. The audit
classes are described in the <olink targetdoc="group-refman" targetptr="audit-class-4" remap="external"><citerefentry><refentrytitle>audit_class</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page. </para><para><indexterm><primary>audit classes</primary><secondary>mapping events</secondary></indexterm><indexterm><primary>audit events</primary><secondary>mapping to classes</secondary></indexterm><indexterm><primary>mappings</primary><secondary>events to classes (auditing)</secondary></indexterm>The mapping of audit events to
classes is configurable. You can remove events from a class, add events to
a class, and create a new class to contain selected events. For the procedure,
see <olink targetptr="audittask-59" remap="internal">How to Change an Audit Event's Class Membership</olink>.</para>
</sect2><sect2 id="auditov-27"><title>Audit Records and Audit Tokens</title><para><indexterm><primary>administering</primary><secondary>auditing</secondary><tertiary>audit records</tertiary></indexterm><indexterm><primary>audit records</primary><secondary>overview</secondary></indexterm>Each <emphasis>audit record</emphasis> records
the occurrence of a single audited event. The record includes information
such as who did the action, which files were affected, what action was attempted,
and where and when the action occurred. The following example shows a <literal>login</literal> audit record:</para><screen>header,81,2,login - local,,2003-10-13 11:23:31.050 -07:00
subject,root,root,other,root,other,378,378,0 0 example_system
text,successful login
return,success,0</screen><para>The type of information that is saved for each audit event is defined
by a set of <emphasis>audit tokens</emphasis>. Each time an audit record is
created for an event, the record contains some or all of the tokens that are
defined for the event. The nature of the event determines which tokens are
recorded. In the preceding example, each line begins with the name of the
audit token. The content of the audit token follows the name. Together, the
four audit tokens comprise the <literal>login</literal> audit record.</para><para><indexterm><primary>audit tokens</primary><secondary>description</secondary></indexterm>For a detailed description of the structure of each audit token
with an example of <command>praudit</command> output, see <olink targetptr="aparecord-11" remap="internal">Audit Token Formats</olink>. For a description of
the binary stream of audit tokens, see the <olink targetdoc="group-refman" targetptr="audit.log-4" remap="external"><citerefentry><refentrytitle>audit.log</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page.</para>
</sect2><sect2 id="auditov-21"><title>Audit Files</title><para>Audit records are collected in audit logs. Solaris auditing provides
two output modes for audit logs. Logs that are called <emphasis>audit files</emphasis> store
audit records in binary format. The set of audit files from a system or site
provide a complete audit record. The complete audit record is called the <emphasis>audit trail</emphasis>.</para><para>The <command>syslog</command> utility collects and stores text version
summaries of the audit record. A <command>syslog</command> record is not complete.
The following example shows a <filename>syslog</filename> entry for a <literal>login</literal> audit record:</para><screen>Oct 13  11:24:11 example_system auditd: [ID 6472 audit.notice] \
        login - login ok session 378 by root as root:other</screen><para><indexterm><primary>audit logs</primary><secondary>modes</secondary></indexterm><indexterm><primary>audit logs</primary><secondary>comparing binary and textual</secondary></indexterm><indexterm><primary>log files</primary><secondary>audit records</secondary></indexterm><indexterm><primary>UDP</primary><secondary>using for remote audit logs</secondary></indexterm>A site can store
audit records in both formats. You can configure the systems at your site
to use binary mode, or to use both modes. The following table compares binary
audit records with <literal>syslog</literal> audit records.</para><table frame="topbot" id="auditov-tbl-3"><title>Comparison of Binary Audit
Records With <filename>syslog</filename> Audit Records</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="colspec1" colwidth="29.09*"/><colspec colname="colspec2" colwidth="60.30*"/><colspec colname="colspec3" colwidth="60.62*"/><thead><row rowsep="1"><?PubTbl row rht="0.73in"?><entry><para>Feature</para>
</entry><entry><para>Binary Records</para>
</entry><entry><para><filename>syslog</filename> Records</para>
</entry>
</row>
</thead><tbody><row><entry><para>Protocol</para>
</entry><entry><para>Writes to the file system</para>
</entry><entry><para>Uses UDP for remote logging</para>
</entry>
</row><row><entry><para>Data type</para>
</entry><entry><para>Binary</para>
</entry><entry><para>Text</para>
</entry>
</row><row><entry><para>Record length</para>
</entry><entry><para>No limit</para>
</entry><entry><para>Up to 1024 characters per audit record</para>
</entry>
</row><row><entry><para>Location</para>
</entry><entry><para>Stored on local disk, and in directories that are mounted by using NFS</para>
</entry><entry><para>Stored in a location that is specified in the <filename>syslog.conf</filename> file</para>
</entry>
</row><row><entry><para>How to configure</para>
</entry><entry><para>Edit <filename>audit_control</filename> file, and protect and NFS-mount
audit directories</para>
</entry><entry><para>Edit <filename>audit_control</filename> file, and edit <filename>syslog.conf</filename> file</para>
</entry>
</row><row><entry><para>How to read</para>
</entry><entry><para>Typically, in batch mode</para><para>Browser output in XML</para>
</entry><entry><para>In real time, or searched by scripts that you have created for <literal>syslog</literal></para><para>Plain text output</para>
</entry>
</row><row><entry><para>Completeness</para>
</entry><entry><para>Guaranteed to be complete, and to appear in the correct order</para>
</entry><entry><para>Are not guaranteed to be complete</para>
</entry>
</row><row><entry><para>Timestamp</para>
</entry><entry><para>Greenwich Mean Time (GMT)</para>
</entry><entry><para>Time on the system that is being audited</para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>Binary records provide the greatest security and coverage. Binary output
meets the requirements of security certifications, such as the Common Criteria
Controlled Access Protection Profile (CAPP). The records are written to a
file system that is protected from snooping. On a single system, all binary
records are collected and are displayed in order. The GMT timestamp on binary
logs enables accurate comparison when systems on one audit trail are distributed
across time zones. The <command>praudit -x</command> command enables you to
view the records in a browser in XML. You can also use scripts to parse the
XML output.</para><para>In contrast, the <filename>syslog</filename> records provide greater
convenience and flexibility. For example, you can collect the <filename>syslog</filename> data
from a variety of sources. Also, when you monitor <literal>audit.notice</literal> events
in the <filename>syslog.conf</filename> file, the <command>syslog</command> utility
logs an audit record summary with the current timestamp. You can use the same
management and analysis tools that you have developed for <filename>syslog</filename> messages
from a variety of sources, including workstations, servers, firewalls, and
routers. The records can be viewed in real time, and can be stored on a remote
system.</para><para>By using <filename>syslog.conf</filename> to store audit records remotely,
you protect log data from alteration or deletion by an attacker. On the other
hand, when audit records are stored remotely, the records are susceptible
to network attacks such as denial of service and spoofed source addresses.
Also, UDP can drop packets or can deliver packets out of order. The limit
on <command>syslog</command> entries is 1024 characters, so some audit records
could be truncated in the log. On a single system, not all audit records are
collected. The records might not display in order. Because each audit record
is stamped with the local system's date and time, you can not rely on the
timestamp to construct an audit trail for several systems.</para><itemizedlist><para>For more information on audit logs, refer to the following:</para><listitem><para><olink targetdoc="group-refman" targetptr="audit-syslog-5" remap="external"><citerefentry><refentrytitle>audit_syslog</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink> man page</para>
</listitem><listitem><para><olink targetdoc="group-refman" targetptr="audit.log-4" remap="external"><citerefentry><refentrytitle>audit.log</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man
page</para>
</listitem><listitem><para><olink targetptr="audittask-11" remap="internal">How to Configure syslog Audit
Logs</olink></para>
</listitem>
</itemizedlist>
</sect2><sect2 id="auditov-22"><title>Audit Storage</title><itemizedlist><para>An <emphasis>audit directory</emphasis> holds audit files in binary
format. A typical installation uses many audit directories. The contents of
all audit directories comprise the <emphasis>audit trail</emphasis>. Audit
records are stored in audit directories in the following order:</para><listitem><para><emphasis role="strong">Primary audit directory &ndash;</emphasis> A
directory where the audit files for a system are placed under normal conditions</para>
</listitem><listitem><para><emphasis role="strong">Secondary audit directory &ndash;</emphasis> A
directory where the audit files for a system are placed if the primary audit
directory is full or not available</para>
</listitem><listitem><para><emphasis role="strong">Directory of last resort &ndash;</emphasis> A
local audit directory that is used if the primary audit directory and all
secondary audit directories are not available</para>
</listitem>
</itemizedlist><para>The directories are specified in the <filename>audit_control</filename> file.
A directory is not used until a directory that is earlier in the list is full.
For an annotated <filename>audit_control</filename> file with a list of directory
entries, see <olink targetptr="audittask-50" remap="internal">Example&nbsp;30&ndash;3</olink>.</para>
</sect2><sect2 id="auditov-23"><title>Examining the Audit Trail</title><para>The auditing service provides commands to combine and reduce files from
the audit trail. The <command>auditreduce</command> command can merge audit
files from the audit trail. The command can also filter files to locate particular
events. The <command>praudit</command> command reads the binary files. Options
to the <command>praudit</command> command provide output that is suitable
for scripting and for browser display.</para>
</sect2>
</sect1><sect1 id="auditov-8"><title>Auditing on a System With Zones</title><indexterm><primary>administering</primary><secondary>auditing</secondary><tertiary sortas="zones">in zones</tertiary>
</indexterm><indexterm><primary>managing</primary><secondary>auditing in zones</secondary>
</indexterm><indexterm><primary>auditing</primary><secondary>zones and</secondary>
</indexterm><indexterm><primary>configuring</primary><secondary>auditing in zones</secondary>
</indexterm><indexterm><primary>audit policy</primary><secondary>setting in global zone</secondary>
</indexterm><indexterm><primary>zones</primary><secondary>auditing and</secondary>
</indexterm><indexterm><primary>zones</primary><secondary><literal>perzone</literal> audit policy</secondary>
</indexterm><indexterm><primary><literal>perzone</literal> audit policy</primary><secondary>when to use</secondary>
</indexterm><para>A zone is a virtualized operating system environment that is created
within a single instance of the Solaris OS. The auditing service audits the entire
system, including activities in zones. A system that has installed non-global
zones can run a single audit service to audit all zones identically. Or, it
can configure one audit service per zone, including the global zone.</para><itemizedlist><para>Sites that satisfy the following conditions can run a single audit service:</para><listitem><para>The site requires a single-image audit trail.</para>
</listitem><listitem><para>The non-global zones are used as application containers. The
zones are part of one administrative domain. That is, no non-global zone has
customized name service files.</para><para>If all the zones on a system are
within one administrative domain, the <literal>zonename</literal> audit policy
can be used to distinguish audit events that execute in different zones.</para>
</listitem><listitem><para>Administrators want low audit overhead. The global zone administrator
audits all zones identically. Also, the global zone's audit daemon serves
all zones on the system.</para>
</listitem>
</itemizedlist><itemizedlist><para>Sites that satisfy the following conditions can run one audit service
per zone:</para><listitem><para>The site does not require a single-image audit trail.</para>
</listitem><listitem><para>The non-global zones have customized name service files. These
separate administrative domains typically function as servers.</para>
</listitem><listitem><para>Individual zone administrators want to control auditing in
the zones that they administer. In per-zone auditing, zone administrators
can decide to enable or to disable auditing for the zone that they administer.</para>
</listitem>
</itemizedlist><para>The advantages of per-zone auditing are a customized audit trail for
each zone, and the ability to disable auditing on a zone by zone basis. These
advantages can be offset by the administrative overhead. The zone administrator
customizes every audit configuration file. Each zone runs its own audit daemon,
and has its own audit queue and audit logs. The zone's audit log files must
be managed.</para>
</sect1><sect1 id="auditov-4"><title>Solaris Auditing Enhancements in the Solaris 10 Release</title><indexterm><primary>auditing</primary><secondary>changes in current release</secondary>
</indexterm><indexterm><primary>new features</primary><secondary>auditing enhancements</secondary>
</indexterm><itemizedlist><para>Since the Solaris 9 release, the following features have been introduced
to Solaris auditing:</para><listitem><para>Solaris auditing can use the <literal>syslog</literal> utility
to store audit records in text format. For discussion, see <olink targetptr="auditov-21" remap="internal">Audit Files</olink>. To set up the <filename>audit_control</filename> file to use the <literal>syslog</literal> utility, see <olink targetptr="audittask-11" remap="internal">How to Configure syslog Audit Logs</olink>.</para>
</listitem><listitem><para>The <command>praudit</command> command has an additional output
format, XML. XML is a standard, portable, processable format. The XML format
enables the output to be read in a browser, and provides source for XML scripting
for reports. The <option>x</option> option to the <command>praudit</command> command
is described in <olink targetptr="auditref-76" remap="internal">praudit Command</olink>.</para>
</listitem><listitem><para>The default set of audit classes has been restructured. Audit
metaclasses provide an umbrella for finer-grained audit classes. For a list
of the default set of classes, see <olink targetptr="auditref-49" remap="internal">Definitions
of Audit Classes</olink>.</para>
</listitem><listitem><para>The <command>bsmconv</command> command no longer disables
the use of the <keysym>Stop</keysym>-A key. The <keysym>Stop</keysym>-A event
can be audited.</para>
</listitem><listitem><para>The timestamp in audit records is reported in ISO 8601 format.
For information about the standard, see <ulink url="http://www.iso.org" type="url">http://www.iso.org</ulink>.</para>
</listitem><listitem><itemizedlist><para>Three audit policy options have been added:</para><listitem><para><emphasis role="strong">public &ndash;</emphasis> Public objects
are no longer audited for read-only events. By not auditing public files,
the audit log size is greatly reduced. Attempts to read sensitive files are
therefore easier to monitor. For more on public objects, see <olink targetptr="auditov-6" remap="internal">Audit Terminology and Concepts</olink>.</para>
</listitem><listitem><para><emphasis role="strong">perzone &ndash;</emphasis> The <literal>perzone</literal> policy has broad effects. A separate audit daemon runs in each
zone. The daemon uses audit configuration files that are specific to the zone.
Also, the audit queue is specific to the zone. For details, see the <olink targetdoc="group-refman" targetptr="auditd-1m" remap="external"><citerefentry><refentrytitle>auditd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> and <olink targetdoc="group-refman" targetptr="auditconfig-1m" remap="external"><citerefentry><refentrytitle>auditconfig</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man pages. For more on zones,
see <olink targetptr="auditref-28" remap="internal">Auditing and Solaris Zones</olink>. For
more on policy, see <olink targetptr="auditplan-10" remap="internal">How to Plan Auditing in
Zones</olink>.</para>
</listitem><listitem><para><emphasis role="strong">zonename &ndash;</emphasis> The name
of the Solaris zone in which an audit event occurred can be included in audit
records. For more on zones, see <olink targetptr="auditref-28" remap="internal">Auditing and
Solaris Zones</olink>. For a discussion of when to use the option, see <olink targetptr="auditplan-5" remap="internal">Determining Audit Policy</olink>.</para>
</listitem>
</itemizedlist>
</listitem><listitem><itemizedlist><para><indexterm><primary>audit tokens</primary><secondary>new in current release</secondary></indexterm>Five audit tokens have been added:</para><listitem><para><indexterm><primary><literal>cmd</literal> audit token</primary></indexterm>The <literal>cmd</literal> token records the list of arguments
and the list of environment variables that are associated with a command.
For more information, see <olink targetptr="auditref-26" remap="internal">cmd Token</olink>.</para>
</listitem><listitem><para><indexterm><primary><literal>path_attr</literal> audit token</primary></indexterm>The <literal>path_attr</literal> token records the sequence of
attribute file objects that are below the <literal>path</literal> token object.
For more information, see <olink targetptr="auditref-21" remap="internal">path_attr Token</olink>.</para>
</listitem><listitem><para><indexterm><primary><literal>privilege</literal> audit token</primary></indexterm>The <literal>privilege</literal> token records the use of privilege
on a process. For more information, see <olink targetptr="auditref-23" remap="internal">privilege
Token</olink>.</para>
</listitem><listitem><para><indexterm><primary><literal>uauth</literal> audit token</primary></indexterm>The <literal>uauth</literal> token records the use of authorization
with a command or action. For more information, see <olink targetptr="auditref-27" remap="internal">uauth Token</olink>.</para>
</listitem><listitem><para><indexterm><primary><literal>zonename</literal> audit token</primary></indexterm>The <literal>zonename</literal> token records the name of the
non-global zone in which an audit event occurred. The <literal>zonename</literal> audit
policy option determines whether the <literal>zonename</literal> token is
included in the audit record. For more information, see <olink targetptr="auditref-15" remap="internal">zonename Token</olink>.</para><para>For overview information,
see <olink targetptr="auditref-28" remap="internal">Auditing and Solaris Zones</olink>. To
learn about zones, see <olink targetdoc="group-sa" targetptr="zone" remap="external">Part&nbsp;II, <citetitle remap="chapter">Zones,</citetitle> in <citetitle remap="book">System Administration Guide:  Virtualization Using the Solaris Operating System</citetitle></olink>.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</sect1>
</chapter>