<?Pub UDT _bookmark _target?><?Pub CX solbook(?><chapter id="auditplan-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>Planning for Solaris Auditing</title><highlights><itemizedlist><para>This chapter describes how to set up the auditing service for your Solaris
installation. In particular, the chapter covers issues that you need to consider
before you enable the auditing service. The following is a list of the planning
information in this chapter:</para><listitem><para><olink targetptr="auditplan-11" remap="internal">Planning Solaris Auditing
(Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="auditplan-5" remap="internal">Determining Audit Policy</olink></para>
</listitem><listitem><para><olink targetptr="auditplan-3" remap="internal">Controlling Auditing Costs</olink></para>
</listitem><listitem><para><olink targetptr="auditplan-9" remap="internal">Auditing Efficiently</olink></para>
</listitem>
</itemizedlist><para>For an overview of auditing, see <olink targetptr="auditov-1" remap="internal">Chapter&nbsp;28, Solaris Auditing (Overview)</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="auditplan-11"><title>Planning Solaris Auditing (Task Map)</title><indexterm><primary>task maps</primary><secondary>planning auditing</secondary>
</indexterm><indexterm><primary>planning</primary><secondary>auditing task map</secondary>
</indexterm><para>The following task map points to the major tasks that are required for
planning disk space and what events to record.</para><informaltable frame="all" pgwide="1"><tgroup cols="2" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="103.02*"/><colspec colname="colspec1" colwidth="125.98*"/><thead><row><entry><para>Task</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Determine auditing strategy for non-global zones</para>
</entry><entry><para><olink targetptr="auditplan-10" remap="internal">How to Plan Auditing in Zones</olink></para>
</entry>
</row><row><entry><para>Plan storage space for the audit trail</para>
</entry><entry><para><olink targetptr="auditplan-2" remap="internal">How to Plan Storage for Audit Records</olink></para>
</entry>
</row><row><entry><para>Determine who and what to audit</para>
</entry><entry><para><olink targetptr="auditplan-6" remap="internal">How to Plan Who and What to Audit</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="auditplan-12"><title>Planning Solaris Auditing (Tasks)</title><indexterm><primary>planning</primary><secondary>auditing</secondary>
</indexterm><indexterm><primary>auditing</primary><secondary>planning</secondary>
</indexterm><indexterm><primary>adding</primary><secondary>auditing of zones</secondary>
</indexterm><para>You want to be selective about what kinds of activities are audited.
At the same time, you want to collect useful audit information. Audit files
can quickly grow to fill the available space, so you should allocate enough
disk space. You also need to carefully plan who to audit and what to audit.</para><task id="auditplan-10"><title>How to Plan Auditing in Zones</title><indexterm><primary>planning</primary><secondary>auditing in zones</secondary>
</indexterm><indexterm><primary>auditing</primary><secondary>planning in zones</secondary>
</indexterm><indexterm><primary>auditing</primary><secondary>planning in zones</secondary>
</indexterm><indexterm><primary>zones</primary><secondary>planning auditing in</secondary>
</indexterm><indexterm><primary>administering</primary><secondary>auditing in zones</secondary>
</indexterm><indexterm><primary>configuration decisions</primary><secondary>auditing</secondary><tertiary>zones</tertiary>
</indexterm><tasksummary><itemizedlist><para>If your system has implemented zones, you have two audit configuration
possibilities:</para><listitem><para>You can configure a single audit service in the global zone
for all zones.</para>
</listitem><listitem><para>You can configure one audit service per zone.</para>
</listitem>
</itemizedlist><para>For a discussion of the trade-offs, see <olink targetptr="auditov-8" remap="internal">Auditing
on a System With Zones</olink>.</para>
</tasksummary><procedure remap="single-step"><step><para>Choose one of the following methods.</para><stepalternatives><step id="auditplan-zone-1"><para>OPTION 1 - Configure a single audit service
for all zones.</para><para><indexterm><primary>auditing</primary><secondary>configuring in global zone</secondary></indexterm>Auditing all zones identically can create
a single-image audit trail. A single-image audit trail occurs when all zones
on a system are part of one administrative domain. The audit records can then
be easily compared, because the records in every zone are preselected with
identical settings.</para><para>This configuration treats all zones as part
of one system. The global zone runs the only audit daemon on a system, and
collects audit logs for every zone. You customize audit configuration files
only in the global zone, then copy the audit configuration files to every
non-global zone.</para><substeps><step><para>Copy the <filename>audit_control</filename> file from the global
zone to every non-global zone.</para>
</step><step><para>Use the same <filename>audit_user</filename> database for every
zone.</para><para>The <filename>audit_user</filename> database might be a
local file, or you might get it from a shared naming service.</para>
</step><step><para>Enable the audit records to be selected by zone.</para><para>To
put the zone name as part of the audit record, set the <literal>zonename</literal> policy
in the global zone. The <command>auditreduce</command> command can then select
audit events by zone. For an example, see the <olink targetdoc="group-refman" targetptr="auditreduce-1m" remap="external"><citerefentry><refentrytitle>auditreduce</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para>
</step>
</substeps><para>To plan a single-image audit trail, use <olink targetptr="auditplan-6" remap="internal">How
to Plan Who and What to Audit</olink> to plan. Start with the first step.
The global zone administrator must also set aside storage, as described in <olink targetptr="auditplan-2" remap="internal">How to Plan Storage for Audit Records</olink>.</para>
</step><step><para>OPTION 2 - Configure one audit service per zone.</para><para>Choose
to configure per-zone auditing if different zones have different name service
files, or if zone administrators want to control auditing in their zones.</para><itemizedlist><listitem><para><indexterm><primary>zones</primary><secondary><literal>perzone</literal> audit policy</secondary></indexterm><indexterm><primary><literal>perzone</literal> audit policy</primary><secondary>using</secondary></indexterm>When you configure
per-zone auditing, you must configure the global zone for auditing. You set
the <literal>perzone</literal> audit policy in the global zone.</para><note><para>If name service files are customized in non-global zones, and <literal>perzone</literal> policy is not set, then careful use of the audit tools is
required to select usable records. A user ID in one zone can refer to a different
user from the same ID in a different zone.</para>
</note>
</listitem><listitem><para><indexterm><primary>zones</primary><secondary><literal>zonename</literal> audit policy</secondary></indexterm><indexterm><primary><literal>zonename</literal> audit policy</primary><secondary>using</secondary></indexterm>To generate records
that can be traced to their originating zone, set the <literal>zonename</literal> audit
policy in the global zone. In the global zone, run the <command>auditreduce</command> command
with the <literal>zonename</literal> option. Then, in the <literal>zonename</literal> zone,
run the <command>praudit</command> command on the <command>auditreduce</command> output.</para>
</listitem><listitem><para>Each zone administrator configures the audit files for the
zone.</para><para>A non-global zone administrator can set all policy options
except <literal>perzone</literal> and <literal>ahlt</literal>.</para>
</listitem><listitem><para>Each zone administrator can enable or disable auditing in
the zone.</para>
</listitem>
</itemizedlist><para>If you customize audit configuration files in every zone, use <olink targetptr="auditplan-6" remap="internal">How to Plan Who and What to Audit</olink> to plan
for every zone. You can skip the first step. Each zone administrator must
also set aside storage for every zone, as described in <olink targetptr="auditplan-2" remap="internal">How to Plan Storage for Audit Records</olink>.</para>
</step>
</stepalternatives>
</step>
</procedure>
</task><task id="auditplan-2"><title>How to Plan Storage for Audit Records</title><indexterm><primary>configuration decisions</primary><secondary>auditing</secondary><tertiary>file storage</tertiary>
</indexterm><indexterm><primary>storing</primary><secondary>audit files</secondary>
</indexterm><tasksummary><para>The audit trail requires dedicated file space. The dedicated file space
for audit files must be available and secure. Each system should have several
audit directories that are configured for audit files. You should decide how
to configure the audit directories as one of the first tasks before you enable
auditing on any systems. The following procedure covers the issues to be resolved
when you plan for audit trail storage.</para>
</tasksummary><taskprerequisites><para>If you are implementing non-global zones, complete <olink targetptr="auditplan-10" remap="internal">How to Plan Auditing in Zones</olink> before using
this procedure.</para>
</taskprerequisites><procedure><step><para>Determine how much auditing your site needs.</para><para>Balance
your site's security needs against the availability of disk space for the
audit trail.</para><para>For guidance on how to reduce space requirements
while still maintaining site security, as well as how to design audit storage,
see <olink targetptr="auditplan-3" remap="internal">Controlling Auditing Costs</olink> and <olink targetptr="auditplan-9" remap="internal">Auditing Efficiently</olink>.</para>
</step><step><para>Determine which systems are to be audited.</para><para>On those
systems,  allocate space for at least one local audit directory. To specify
the audit directories, see <olink targetptr="audittask-50" remap="internal">Example&nbsp;30&ndash;3</olink>.</para>
</step><step><para>Determine which systems are to store audit files.</para><para>Decide
which servers are to hold the primary and secondary audit directories. For
examples of configuring disks for audit directories, see <olink targetptr="audittask-8" remap="internal">How to Create Partitions for Audit Files</olink>.</para>
</step><step><para>Name the audit directories.</para><para>Create a list of all the
audit directories that you plan to use. For the naming conventions, see <olink targetptr="auditref-77" remap="internal">Conventions for Binary Audit File Names</olink></para>
</step><step><para>Determine which systems are to use which audit directories.</para><para>Create a map that shows which system should use which audit directory.
The map helps you to balance the auditing activity. For an illustration, see <olink targetptr="auditref-fig-2" remap="internal">Figure&nbsp;31&ndash;1</olink> and <olink targetptr="auditref-fig-3" remap="internal">Figure&nbsp;31&ndash;2</olink>.</para>
</step>
</procedure>
</task><task id="auditplan-6"><title>How to Plan Who and What to Audit</title><indexterm><primary>configuration decisions</primary><secondary>auditing</secondary><tertiary>who and what to audit</tertiary>
</indexterm><taskprerequisites><para>If you are implementing non-global zones, complete <olink targetptr="auditplan-10" remap="internal">How to Plan Auditing in Zones</olink> before using
this procedure.</para>
</taskprerequisites><procedure><step id="auditplan-single-1"><para>Determine if you want a single-system
image audit trail.</para><para>Systems within a single administrative domain
can create a single-system image audit trail. If your systems use different
naming services, start with the next step. You should complete the rest of
the planning steps for every system.</para><itemizedlist><para>A single-system image audit trail treats the systems that are being
audited as one machine. To create a single-system image audit trail for a
site, every system in the installation should be configured as follows:</para><listitem><para>Use the same naming service.</para><para>To interpret the
audit records, two commands are used, <command>auditreduce</command> and <command>praudit</command>. For correct interpretation of the audit records, the <filename>passwd</filename>, <filename>hosts</filename>, and <filename>audit_user</filename> files
must be consistent.</para>
</listitem><listitem><para>Use the same <filename>audit_warn</filename>, <filename>audit_event</filename>, <filename>audit_class</filename>, and <filename>audit_startup</filename> files
as every other system.</para>
</listitem><listitem><para>Use the same <filename>audit_user</filename> database. The
database can be in a naming service such as NIS or LDAP.</para>
</listitem><listitem><para>Have identical <literal>flags</literal>, <literal>naflags</literal>,
and <literal>plugin</literal> entries in the <filename>audit_control</filename> file.</para>
</listitem>
</itemizedlist>
</step><step id="auditplan-policy-1"><para>Determine the audit policy.</para><para>Use
the <command>auditconfig -lspolicy</command> command to see a short description
of available policy options. By default, only the <literal>cnt</literal> policy
is turned on. For a fuller discussion, see <olink targetptr="auditplan-overflow-1" remap="internal">Step&nbsp;8</olink>.</para><para>For the
effects of the policy options, see <olink targetptr="auditplan-5" remap="internal">Determining
Audit Policy</olink>. To set audit policy, see <olink targetptr="audittask-18" remap="internal">How
to Configure Audit Policy</olink>.</para>
</step><step><para>Determine if you want to modify event-to-class mappings.</para><para>In many situations, the default mapping is sufficient. However, if you
add new classes, change class definitions, or determine that a record of a
specific system call is not useful, you might also need to move an event to
a different class.</para><para>For an example, see <olink targetptr="audittask-59" remap="internal">How to Change an Audit Event's Class Membership</olink>.</para>
</step><step id="auditplan-preselect-1"><para>Determine which audit classes to preselect.</para><para>The best time to add audit classes or to change the default classes
is before you start the auditing service.</para><para>The audit class values
of the <literal>flags</literal>, <literal>naflags</literal>, and <literal>plugin</literal> entries
in the <filename>audit_control</filename> file apply to all users and processes.
The preselected classes determine whether an audit class is audited for success,
for failure, or for both.</para><para>To preselect audit classes, see <olink targetptr="audittask-45" remap="internal">How to Modify the audit_control File</olink>.</para>
</step><step><para>Determine user exceptions to the system-wide preselected audit
classes.</para><para>If you decide that some users should be audited differently
from the system-wide preselected audit classes, modify the individual users'
entries in the <filename>audit_user</filename> database.</para><para>For an
example, see <olink targetptr="audittask-53" remap="internal">How to Change a User's Audit
Characteristics</olink>.</para>
</step><step><para>Determine the minimum free disk space.</para><para>When disk space
on an audit file system drops below the <option role="nodash">minfree</option> percentage,
the <command>auditd</command> daemon switches to the next available audit
directory. The daemon then sends a warning that the soft limit has been exceeded.</para><para>To set the minimum free disk space, see <olink targetptr="audittask-49" remap="internal">Example&nbsp;30&ndash;4</olink>.</para>
</step><step><para>Decide how to manage the <literal>audit_warn</literal> email alias.</para><para>The <filename>audit_warn</filename> script is run whenever the audit
system needs to notify you of a situation that requires administrative attention.
By default, the <filename>audit_warn</filename> script sends email to an <filename>audit_warn</filename> alias and sends a message to the console.</para><para>To
set up the alias, see <olink targetptr="audittask-16" remap="internal">How to Configure the
audit_warn Email Alias</olink>.</para>
</step><step id="auditplan-overflow-1"><para>Decide what action to take when all
the audit directories are full.</para><para>By default, when the audit trail
overflows, the system continues to work. The system counts the audit records
that are dropped, but does not record the events. For greater security, you
can disable the <option role="nodash">cnt</option> policy, and enable the <option role="nodash">ahlt</option> policy. The <option role="nodash">ahlt</option> policy
stops the system when the audit audit trail overflows.</para><para>To configure
these policy options, see <olink targetptr="audittask-90" remap="internal">Example&nbsp;30&ndash;14</olink>.</para>
</step><step><para>Decide whether to collect audit records in <command>syslog</command> format
as well as in binary logs.</para><para>For overview information, see <olink targetptr="auditov-21" remap="internal">Audit Files</olink>.</para><para>For an example, see <olink targetptr="audittask-11" remap="internal">How to Configure syslog Audit Logs</olink>.</para>
</step>
</procedure>
</task>
</sect1><sect1 id="auditplan-5"><title>Determining Audit Policy</title><indexterm><primary>audit policy</primary><secondary>defaults</secondary>
</indexterm><indexterm><primary>audit policy</primary><secondary>effects of</secondary>
</indexterm><indexterm><primary>configuration decisions</primary><secondary>auditing</secondary><tertiary>policy</tertiary>
</indexterm><indexterm><primary>policies</primary><secondary>for auditing</secondary>
</indexterm><para>Audit policy determines the characteristics of the audit records for
the local system. The policy options are set by a startup script. The <command>bsmconv</command> script, which enables the auditing service, creates the <filename>/etc/security/audit_startup</filename> script. The <filename>audit_startup</filename> script executes
the <command>auditconfig</command> command to establish audit policy. For
details about the script, see the <olink targetdoc="group-refman" targetptr="audit-startup-1m" remap="external"><citerefentry><refentrytitle>audit_startup</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><para><indexterm><primary>audit trail</primary><secondary>effect of audit policy on</secondary></indexterm>Most audit policy options are disabled by
default to minimize storage requirements and system processing demands. You
can dynamically enable and disable audit policy options with the <command>auditconfig</command> command. You can permanently enable and disable the policy options
with the <filename>audit_startup</filename> script.</para><para>Use the following table to determine if the needs of your site justify
the additional overhead that results from enabling one or more audit policy
options.</para><table frame="topbot" pgwide="1" id="auditplan-tbl-3"><title>Effects of Audit
Policy Options</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="colspec0" colwidth="11.00*"/><colspec colname="colspec1" colwidth="45.20*"/><colspec colname="colspec2" colwidth="42.80*"/><thead><row rowsep="1"><entry><para>Policy Name</para>
</entry><entry><para>Description</para>
</entry><entry><para>Why Change the Policy Option?</para>
</entry>
</row>
</thead><tbody><row><entry rowsep="1"><para><indexterm><primary><literal>ahlt</literal> audit policy</primary><secondary>description</secondary></indexterm><literal>ahlt</literal></para>
</entry><entry rowsep="1"><para>This policy applies to asynchronous events only. When disabled, this
policy allows the event to complete without an audit record being generated.</para><para>When enabled, this policy stops the system when the audit file systems
are full. Administrative intervention is required to clean up the audit queue,
make space available for audit records, and reboot. This policy can only be
enabled in the global zone. The policy affects all zones.</para>
</entry><entry rowsep="1"><para>The disabled option makes sense when system availability is more important
than security.</para><para>The enabled option makes sense in an environment where security is paramount.</para>
</entry>
</row><row><entry rowsep="1"><para><indexterm><primary><literal>arge</literal> audit policy</primary><secondary>description</secondary></indexterm><indexterm><primary>environment variables</primary><secondary>presence in audit records</secondary></indexterm><literal>arge</literal></para>
</entry><entry rowsep="1"><para>When disabled, this policy omits environment variables of an executed
program from the <literal>exec</literal> audit record.</para><para><indexterm><primary>variables</primary><secondary>adding to audit record</secondary></indexterm>When enabled, this policy adds the environment variables of an
executed program to the <literal>exec</literal> audit record. The resulting
audit records contain much more detail than when this policy is disabled.</para>
</entry><entry rowsep="1"><para>The disabled option collects much less information than the enabled
option.</para><para>The enabled option makes sense when you are auditing a few users. The
option is also useful when you have suspicions about the environment variables
that are being used in <command>exec</command> programs.</para>
</entry>
</row><row><entry rowsep="1"><para><indexterm><primary><literal>argv</literal> audit policy</primary><secondary>description</secondary></indexterm><literal>argv</literal></para>
</entry><entry rowsep="1"><para>When disabled, this policy omits the arguments of an executed program
from the <literal>exec</literal> audit record.</para><para>When enabled, this policy adds the arguments of an executed program
to the <literal>exec</literal> audit record. The resulting audit records contain
much more detail than when this policy is disabled.</para>
</entry><entry rowsep="1"><para>The disabled option collects much less information than the enabled
option.</para><para>The enabled option makes sense when you are auditing a few users. The
option is also useful when you have reason to believe that unusual <command>exec</command> programs
are being run.</para>
</entry>
</row><row><entry rowsep="1"><para><indexterm><primary><literal>cnt</literal> audit policy</primary><secondary>description</secondary></indexterm><literal>cnt</literal></para>
</entry><entry rowsep="1"><para>When disabled, this policy blocks a user or application from running.
The blocking happens when audit records cannot be added to the audit trail
because no disk space is available.</para><para>When enabled, this policy allows the event to complete without an audit
record being generated. The policy maintains a count of audit records that
are dropped.</para>
</entry><entry rowsep="1"><para>The disabled option makes sense in an environment where security is
paramount.</para><para>The enabled option makes sense when system availability is more important
than security.</para>
</entry>
</row><row><entry rowsep="1"><para><indexterm><primary><literal>group</literal> audit policy</primary><secondary>description</secondary></indexterm><literal>group</literal></para>
</entry><entry rowsep="1"><para>When disabled, this policy does not add a groups list to audit records.</para><para><indexterm><primary><literal>group</literal> audit policy</primary><secondary>and <literal>groups</literal> token</secondary></indexterm>When
enabled, this policy adds a groups list to every audit record as a special
token.</para>
</entry><entry rowsep="1"><para>The disabled option usually satisfies requirements for site security.</para><para>The enabled option makes sense when you need to audit which groups are
generating audit events.</para>
</entry>
</row><row><entry rowsep="1"><para><indexterm><primary><literal>path</literal> audit policy</primary><secondary>description</secondary></indexterm><literal>path</literal></para>
</entry><entry rowsep="1"><para>When disabled, this policy records in an audit record at most one path
that is used during a system call.</para><para>When enabled, this policy records every path that is used in conjunction
with an audit event to every audit record.</para>
</entry><entry rowsep="1"><para>The disabled option places at most one path in an audit record.</para><para>The enabled option enters each file name or path that is used during
a system call in the audit record as a <literal>path</literal> token.</para>
</entry>
</row><row><entry rowsep="1"><para><indexterm><primary><literal>perzone</literal> audit policy</primary><secondary>description</secondary></indexterm><literal>perzone</literal></para>
</entry><entry rowsep="1"><para>When disabled, this policy maintains a single audit configuration for
a system. One audit daemon runs in the global zone. Audit events in non-global
zones can be located in the audit record by preselecting the <literal>zonename</literal> audit
token.</para><para>When enabled, this policy maintains separate audit configuration, audit
queue, and audit logs for each zone. A separate version of the audit daemon
runs in each zone. This policy can be enabled in the global zone only.</para>
</entry><entry rowsep="1"><para>The disabled option is useful when you have no special reason to maintain
a separate audit log, queue, and daemon for each zone.</para><para>The enabled option is useful when you cannot monitor your system effectively
by simply preselecting the <literal>zonename</literal> audit token.</para>
</entry>
</row><row><entry rowsep="1"><para><indexterm><primary><literal>public</literal> audit policy</primary><secondary>description</secondary></indexterm><literal>public</literal></para>
</entry><entry rowsep="1"><para>When disabled, this policy does not add read-only events of public objects
to the audit trail when the reading of files is preselected. Audit classes
that contain read-only events include <literal>fr</literal>, <literal>fa</literal>,
and <literal>cl</literal>.</para><para><indexterm><primary><literal>public</literal> audit policy</primary><secondary>read-only events</secondary></indexterm><indexterm><primary>audit policy</primary><secondary><literal>public</literal></secondary></indexterm>When
enabled, this policy records every read-only audit event of public objects
if an appropriate audit class is preselected.</para>
</entry><entry rowsep="1"><para>The disabled option usually satisfies requirements for site security.</para><para>The enabled option is rarely useful.</para>
</entry>
</row><row><entry rowsep="1"><para><indexterm><primary><literal>seq</literal> audit policy</primary><secondary>description</secondary></indexterm><literal>seq</literal></para>
</entry><entry rowsep="1"><para>When disabled, this policy does not add a sequence number to every audit
record.</para><para><indexterm><primary><literal>seq</literal> audit policy</primary><secondary>and <literal>sequence</literal> token</secondary></indexterm>When
enabled, this policy adds a sequence number to every audit record. The <literal>sequence</literal> token holds the sequence number.</para>
</entry><entry rowsep="1"><para>The disabled option is sufficient when auditing is running smoothly.</para><para>The enabled option makes sense when the <literal>cnt</literal> policy
is enabled. The <literal>seq</literal> policy enables you to to determine
when data was discarded.</para>
</entry>
</row><row><entry rowsep="1"><para><indexterm><primary><literal>trail</literal> audit policy</primary><secondary>description</secondary></indexterm><literal>trail</literal></para>
</entry><entry rowsep="1"><para>When disabled, this policy does not add a <literal>trailer</literal> token
to audit records.</para><para><indexterm><primary><literal>trail</literal> audit policy</primary><secondary>and <literal>trailer</literal> token</secondary></indexterm>When
enabled, this policy adds a <literal>trailer</literal> token to every audit
record.</para>
</entry><entry rowsep="1"><para>The disabled option creates a smaller audit record.</para><para>The enabled option clearly marks the end of each audit record with a <literal>trailer</literal> token. The <literal>trailer</literal> token is often used
in conjunction with the <literal>sequence</literal> token. The <literal>trailer</literal> token
provides easier and more accurate resynchronization of audit records.</para>
</entry>
</row><row><entry rowsep="1"><para><indexterm><primary><literal>zonename</literal> audit policy</primary><secondary>description</secondary></indexterm><literal>zonename</literal></para>
</entry><entry rowsep="1"><para>When disabled, this policy does not include a <literal>zonename</literal> token
in audit records.</para><para>When enabled, this policy includes a <literal>zonename</literal> token
in every audit record from a non-global zone.</para>
</entry><entry rowsep="1"><para>The disabled option is useful when you do not need to compare audit
behavior across zones.</para><para>The enabled option is useful when you want to isolate and compare audit
behavior across zones.</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect1><sect1 id="auditplan-3"><title>Controlling Auditing Costs</title><itemizedlist><para><indexterm><primary>administering</primary><secondary>auditing</secondary><tertiary>cost control</tertiary></indexterm><indexterm><primary>cost control</primary><secondary>and  auditing</secondary></indexterm>Because auditing consumes
system resources, you must control the degree of detail that is recorded.
When you decide what to audit, consider the following costs of auditing:</para><listitem><para>Cost of increased processing time</para>
</listitem><listitem><para>Cost of analysis of audit data</para>
</listitem><listitem><para>Cost of storage of audit data</para>
</listitem>
</itemizedlist><sect2 id="auditplan-4"><title>Cost of Increased Processing Time of Audit
Data</title><para><indexterm><primary>processing time costs</primary><secondary>of auditing service</secondary></indexterm>The cost of increased processing time is the
least significant of the costs of auditing. The first reason is that auditing
generally does not occur during computation-intensive tasks, such as image
processing, complex calculations, and so forth. The other reason  is that
the cost for single-user systems is usually small enough to ignore.</para>
</sect2><sect2 id="auditplan-7"><title>Cost of Analysis of Audit Data</title><para><indexterm><primary>audit trail</primary><secondary>analysis costs</secondary></indexterm>The cost of analysis is roughly proportional to the amount of
audit data that is collected. The cost of analysis includes the time that
is required to merge and review audit records. Cost also includes the time
that is required to archive the records and keep the records in a safe place.</para><para>The fewer records that you generate, the less time that is required
to analyze the audit trail. Upcoming sections, <olink targetptr="auditplan-8" remap="internal">Cost
of Storage of Audit Data</olink> and <olink targetptr="auditplan-9" remap="internal">Auditing
Efficiently</olink>, describe ways to audit efficiently. Efficient auditing
reduces the amount of audit data, while still providing enough coverage to
achieve your site's security goals. </para>
</sect2><sect2 id="auditplan-8"><title>Cost of Storage of Audit Data</title><indexterm><primary>administering</primary><secondary>auditing</secondary><tertiary>reducing storage-space requirements</tertiary>
</indexterm><indexterm><primary>audit files</primary><secondary>reducing storage-space requirements</secondary>
</indexterm><indexterm><primary>disk-space requirements</primary>
</indexterm><indexterm><primary>hard disk</primary><secondary>space requirements for auditing</secondary>
</indexterm><indexterm><primary>storage costs</primary><secondary>and auditing</secondary>
</indexterm><itemizedlist><para>Storage cost is the most significant cost of auditing. The amount of
audit data depends on the following:</para><listitem><para>Number of users</para>
</listitem><listitem><para>Number of systems</para>
</listitem><listitem><para>Amount of use</para>
</listitem><listitem><para>Degree of traceability and accountability that is required</para>
</listitem>
</itemizedlist><itemizedlist><para>Because these factors vary from site to site, no formula can predetermine
the amount of disk space to set aside for audit data storage. Use the following
information as a guide:</para><listitem><para>Preselect audit classes judiciously to reduce the volume of
records that are generated.</para><para>Full auditing, that is, with the <option role="nodash">all</option> class, fills disks quickly. Even a simple task
such as compiling a program could generate a large audit file. A program of
modest size could generate thousands of audit records in less than a minute.</para><para>For example, by omitting the <option role="nodash">file_read</option> audit
class, <literal>fr</literal>, you can significantly reduce audit volume. By
choosing to audit for failed operations only, you can at times reduce audit
volume. For example, by auditing for failed <literal>file_read</literal> operations, <literal>-fr</literal>, you can generate far fewer records than by auditing for all <literal>file_read</literal> events.</para>
</listitem><listitem><para>Efficient audit file management is also important. After the
audit records are created, file management reduces the amount of storage that
is required.</para>
</listitem><listitem><para>Understand the audit classes</para><para>Before you configure
auditing, you should understand the types of events that the classes contain.
You can change the audit event-class mappings to optimize audit record collection.</para>
</listitem><listitem><para>Develop a philosophy of auditing for your site.</para><para>Base
your philosophy on sensible measures. Such measures include the amount of
traceability that your site requires, and the types of users that you administer.</para>
</listitem>
</itemizedlist>
</sect2>
</sect1><sect1 id="auditplan-9"><title>Auditing Efficiently</title><para><indexterm><primary>administering</primary><secondary>auditing</secondary><tertiary>efficiency</tertiary></indexterm><indexterm><primary>efficiency</primary><secondary>auditing and</secondary></indexterm>The following techniques can
help you achieve your organization's security goals while auditing more efficiently.</para><itemizedlist><listitem><para>Randomly audit only a certain percentage of users at any one
time.</para>
</listitem><listitem><para><indexterm><primary>audit files</primary><secondary>reducing storage-space requirements</secondary></indexterm><indexterm><primary>reducing</primary><secondary>storage-space requirements for audit files</secondary></indexterm><indexterm><primary>size of audit files</primary><secondary>reducing storage-space requirements</secondary></indexterm>Reduce the disk-storage requirements for audit files
by combining, reducing, and compressing the files. Develop procedures for
archiving the files, for transferring the files to removable media, and for
storing the files offline.</para>
</listitem><listitem><para><indexterm><primary>audit trail</primary><secondary>monitoring in real time</secondary></indexterm><indexterm><primary>monitoring</primary><secondary>audit trail in real time</secondary></indexterm>Monitor the audit
data in real time for unusual behaviors. You can extend management and analysis
tools that you have already developed to handle audit records in <filename>syslog</filename> files.</para><para><indexterm><primary>scripts</primary><secondary>monitoring audit files example</secondary></indexterm>You can also set up procedures
to monitor the audit trail for certain activities. You can write a script
to trigger an automatic increase in the auditing of certain users or certain
systems in response to detection of unusual events.</para><orderedlist><para>For example, you could write a script that does the following:<indexterm><primary><command>tail</command> command</primary><secondary>example of use</secondary></indexterm></para><listitem><para>Monitors the creation of audit files on all the audit file
servers.</para>
</listitem><listitem><para>Processes the audit files with the <command>tail</command> command.</para><para>The piping of the output from the <command>tail -0f</command> command
through the <command>praudit</command> command can yield a stream of audit
records as the records are generated. For more information, see the <olink targetdoc="group-refman" targetptr="tail-1" remap="external"><citerefentry><refentrytitle>tail</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man page.</para>
</listitem><listitem><para>Analyzes this stream for unusual message types or other indicators,
and delivers the analysis to the auditor.</para><para>Or, the script can be
used to trigger automatic responses.</para>
</listitem><listitem><para>Constantly monitors the audit directories for the appearance
of new <literal>not_terminated</literal> audit files.</para>
</listitem><listitem><para>Terminates outstanding <command>tail</command> processes when
their files are no longer being written to.</para>
</listitem>
</orderedlist>
</listitem>
</itemizedlist>
</sect1>
</chapter><?Pub *0000038179 0?>