包含在尋找其他文件熱門支援資源 | 以 PDF 格式下載這本書 (548 KB)
Chapter 2 Auditing SetupThe focus of this chapter is on setting up auditing for a network of Trusted Solaris workstations. It also describes how to set up auditing for a non-networked Trusted Solaris workstation. Planning Auditing at Your SiteWhen the system administrator and security administrator configure the first workstation for Trusted Solaris, auditing is enabled and a limited number of audit records are collected to a default audit location, workstation_name:/var/audit. The security administrator needs to plan what to audit and whether to customize site-specific event-to-class mappings. The system administrator plans disk space (local and remote) for the audit files, an audit administration server, and the order of installation. Planning auditing for a non-networked workstation is a bit simpler. For a single workstation, customizing event-to-class mappings may not be worth the time. Your most important task is to ensure that auditing does not slow down your work. Planning the size and locations of auditing partitions can prevent work slowdown, and a regular maintenance schedule can automatically back up and free up the audit partition for more audit records. Planning What to AuditTrusted Solaris auditing collects user actions and non-attributable (in the class na, non-attribute) events into audit classes. It is these audit classes, each of which holds a number of events, that are audited for success, for failure, or for both. Before configuring auditing, understand the audit flags and the types of events they flag. Develop a philosophy of auditing for your organization that is based on the amount of security your site requires and the types of users you administer. Unless the process audit preselection mask is modified dynamically, the audit characteristics in place when a user logs in are inherited by all processes during the login session, and, unless the databases are modified, the process preselection mask applies in all subsequent login sessions. See "Audit Events Listed by Audit Class" for a list of provided audit classes. Each audit class is listed in its own table, where each audit event's corresponding system call or user command points to its audit record format. The security administrator plans what to audit based on the site security policy. You can configure a system-wide setup and user exceptions/additions.
Considerations When Planning What to AuditWhat is audited at your site is based on your site policy and the costs of auditing (time, efficiency, disk space). as discussed in "Controlling Audit Costs ". The following are factors to consider when using auditing as it is implemented in the Trusted Solaris environment.
Planning a Site-Specific Event-to-Class MappingOptional: Skip this section if you are using the default event-to-class mappings provided in the Trusted Solaris environment. Do not skip this section if you have decided to rearrange what events are assigned to what classes, or to create new classes or new events. Trusted Solaris software allows 32 audit classes, including the class all. Your site may add classes until the total number is 32. The security administrator plans site-specific mappings. To plan site-specific mappings:
Considerations When Changing Event-to-Class MappingsThe following are factors to consider when changing the contents of default audit classes and creating new ones in the Trusted Solaris environment.
Planning Space for Audit RecordsStoring audit records on a non-networked workstation involves setting up at least two local partitions dedicated to audit records, one primary and one backup, and planning a maintenance schedule. Storing audit records for a network of workstations involves setting up a local (backup) partition dedicated to audit records, plus a network of audit servers with partitions for remote (primary) audit storage, and plus an audit administration server from which the entire audit trail can be monitored. The audit trail is every audit file (audit files hold audit records generated on a workstation) created by every workstation on the network. Planning Space on a Non-Networked WorkstationOn a non-networked workstation, plan the size of a disk partition to hold audit records. For efficiency, it is best to place the audit records on a separate disk. For safety, you may want to create two audit partitions on that disk, one as the primary storage area and the other as a backup when the first partition gets full. Set filesystem security attributes to set on the audit directory to prevent snooping on the audit trail.
Planning Space on a Network of WorkstationsA networked system should include audit servers to store audit files for users' workstations, an audit administration server for central audit analysis and backup, and a local audit partition on every workstation. You may want to set filesystem security attributes on the directories and mount points to prevent snooping on the audit trail. Create a worksheet to record your auditing plan, or use another mechanism that helps you track the auditing network that you set up.
Planning the RolloutRolling out the auditing plan to the workstations is a job coordinated by the system administrator, who sets up the disks and the network of audit storage, and the security administrator, who decides what is to be audited and enters the information in the audit configuration files. Together, you want to set up an audited network of workstations where:
Rolling Out Auditing at Your SiteTo roll out auditing, the system administrator sets up the audit administration server, the audit file servers, the local audit partitions, and what usernames are warned of audit trouble. The security administrator edits the audit_control(4) file on the NIS+ root master, and edits other audit configuration files before copying them to a central directory for distribution by tape or floppy. The audit configuration files are copied from the tape to each workstation as it is configured by the install team. The security administrator edits the dir: lines in the audit_control file on each workstation before the system is rebooted. Note - Administrators should understand that the Trusted Solaris environment only records the security-relevant events that it is configured to record (that is, by preselection). Therefore any subsequent audit can only consider the events recorded. If auditing is not configured to record the security-relevant events for the particular system environment in which it operates, it will not be possible to audit. This may mean that attempts to breach the security of the system go undetected, or that the administrator is unable to detect the user responsible for an attempted breach of security. Administrators should regularly analyze audit trails to check for breaches of security. System Administrator's Audit Setup TasksTable 2-1 Basic Auditing Setup by the System Administrator
Security Administrator's Audit Setup Tasks - BasicTable 2-2 Basic Auditing Setup by the Security Administrator
Security Administrator's Audit Setup Tasks - AdvancedTable 2-3 Advanced Auditing Setup by the Security Administrator
Audit Shutdown and Startup ProceduresThe following procedures describe how to enable and disable auditing for one or more workstations. The commands should be run only on a diskfull workstation, and never on a diskless client. Auditing tasks require commands and actions that are limited to particular roles and particular labels. Read each task for the administrative role that can perform it, and the label required. See "To Execute Commands that Require Privilege" for how to assume a role and open a privileged shell. To Disable Auditing
To Enable AuditingBy default, auditing is enabled. If you have disabled auditing, enable it by reversing the above procedure.
Basic Audit Setup ProceduresThe following procedures describe how to set up auditing for one or more workstations. To Create Dedicated Audit PartitionsDuring installation, the install team creates dedicated audit partition(s) when formatting the disks. Use the naming convention /etc/security/audit/workstation_name(.n) A diskfull workstation should have at least one local audit directory, which it can use as a directory of last resort, if unable to communicate with the audit server. See "Audit Storage" for an explanation of the naming convention. On an audit file server, most partitions hold audit files, as is shown in the following example of the egret audit file server:
Note - Another disk holds egret's / (root) and /swap partitions. On a diskfull workstation, including the audit administration server, at least one partition should be dedicated to local audit files, as is shown in the following example of the workstation willet:
HintsA rule of thumb is to assign 200 MB of space for each workstation. However, the disk space requirements at your site will be based on how much auditing you perform and may be far greater than this figure. Fewer and large partitions are more efficient than more and smaller ones. Note - To add a disk to hold audit partitions after installing the workstation, see the Solaris 8 System Administration Guide, Volume II. To protect the disks with Trusted Solaris security attributes, see Trusted Solaris Administrator's Procedures. To Execute Commands that Require PrivilegeMost commands for setting up auditing require the use of a profile shell, where commands can run with privilege. Auditing also requires the use of actions in the System_Admin folder and the Solaris Management Console action in the Application Manager.
|
egret$ umount /etc/security/audit/egret egret$ umount /etc/security/audit/egret.1 egret$ umount /etc/security/audit/egret.2 egret$ umount /etc/security/audit/egret.3 |
Reduce reserved filesystem space on each partition to 0% with the command tunefs -m 0.
The security administrator sets the reserved filesystem space (called the minfree limit) in the audit_control(4) file.
For example, on the audit file server egret:
egret$ tunefs -m 0 /etc/security/audit/egret egret$ tunefs -m 0 /etc/security/audit/egret.1 egret$ tunefs -m 0 /etc/security/audit/egret.2 egret$ tunefs -m 0 /etc/security/audit/egret.3 |
Similarly, on the workstation willet:
willet$ umount /etc/security/audit/willet willet$ tunefs -m 0 /etc/security/audit/willet |
See the tunefs(1M) man page for more information on the advantages and disadvantages of tuning a file system.
As role secadmin, at label admin_low, set the appropriate file permissions on every audit file system while the file system is unmounted.
For example, on the audit file server egret:
egret$ chmod -R 750 /etc/security/audit/egret egret$ chmod -R 750 /etc/security/audit/egret.1 egret$ chmod -R 750 /etc/security/audit/egret.2 egret$ chmod -R 750 /etc/security/audit/egret.3 |
On the workstation willet:
willet$ chmod -R 750 /etc/security/audit/willet |
As role secadmin, at label admin_high, set any Trusted Solaris security attribute defaults required by your site security policy on every audit file system while the file system is unmounted.
To run the command at the label admin_high, you must create an admin_high workspace. Follow the procedure in "To Create an Admin_High Workspace".
For example, the following command on the audit file server egret should be repeated for all of its audit partitions:
egret$ setfsattr -s "[admin_high]" /etc/security/audit/egret |
On the workstation willet:
willet$ setfsattr -s "[admin_high]" /etc/security/audit/willet |
The -s option sets the partition's default sensitivity label for the audit files. See the setfsattr(1M) man page for more information.
The local audit file systems must already be in the host's /etc/vfstab file.
As admin, at label admin_high, remount the local audit file systems.
Follow the procedure in "To Create an Admin_High Workspace" to get an admin_high process.
For example, on the audit file server egret:
egret$ mount /etc/security/audit/egret egret$ mount /etc/security/audit/egret.1 egret$ mount /etc/security/audit/egret.2 egret$ mount /etc/security/audit/egret.3 |
Similarly, on the workstation willet:
willet$ mount /etc/security/audit/willet |
Create a directory named files at the top of each mounted audit partition.
For example, on the audit file server egret:
egret$ mkdir /etc/security/audit/egret/files egret$ mkdir /etc/security/audit/egret.1/files egret$ mkdir /etc/security/audit/egret.2/files egret$ mkdir /etc/security/audit/egret.3/files |
On the workstation willet:
willet$ mkdir /etc/security/audit/willet/files |
In the role admin at label admin_low, open the Trusted Solaris Management Console, Scope=files toolbox.
Navigate to the Storage node, then the Mounts and Shares tool, and double-click the Shares tool.
Enter every local audit file system in the local host's dfstab(4) file.
Follow the online help to share the /etc/security/audit/hostname directory.
For example, the audit file server egret has the following entries:
share -F nfs -o ro -d "local audit files" /etc/security/audit/egret share -F nfs -o rw=willet:audubon -d "audit willet" /etc/security/audit/egret.1 share -F nfs -o rw=grebe:audubon -d "audit grebe" /etc/security/audit/egret.2 share -F nfs -o rw=sora:audubon -d "audit sora" /etc/security/audit/egret.3
The workstation willet has the following entry:
share -F nfs -o ro -d "local audit files" /etc/security/audit/willet
As role admin at label admin_low, on audubon, the audit administration server, create a mount point for every audit directory in the Trusted Solaris network.
For example, on the audit administration server audubon:
audubon$ mkdir /etc/security/audit/willet audubon$ mkdir /etc/security/audit/egret audubon$ mkdir /etc/security/audit/egret.1 ... |
As role admin, at label admin_low, enter every audit partition on the network in the audit administration server's vfstab(4) file.
Mount audit directories with the read-write (rw) option. Mount remote partitions using the soft option.
Click the Application Manager, double-click the System_Admin folder, and double-click the Set Mount Points action.
Enter the mount points in the vfstab(4) file.
The following shows part of the vfstab file on audubon:
# egret is the main audit file serveregret:/etc/security/audit/egret - /etc/security/audit/egret nfs - yes bg,soft,nopriv egret:/etc/security/audit/egret.1 - /etc/security/audit/egret.1 nfs - yes bg,soft,nopriv egret:/etc/security/audit/egret.2 - /etc/security/audit/egret.2 nfs - yes bg,soft,nopriv egret:/etc/security/audit/egret.3 - /etc/security/audit/egret.3 nfs - yes bg,soft,nopriv willet:/etc/security/audit/willet - /etc/security/audit/willet nfs - yes bg,soft,nopriv ...
On each workstation, create the mount points for the remote audit file servers' partitions that are used by the workstation, and enter them in the vfstab(4)
file. Do this as role admin, at label admin_low.
For example, to create the mount points on the workstation willet:
willet$ mkdir /etc/security/audit/egret willet$ mkdir /etc/security/audit/audubon.2 |
Click the Application Manager, double-click the System_Admin folder, and double-click the Set Mount Points action.
Enter the mount points in the vfstab(4) file.
The following shows part of the vfstab file on willet:
# egret is the main audit file server egret:/etc/security/audit/egret - /etc/security/audit/egret nfs - yes bg,soft,nopriv # audubon is the audit administration server audubon:/etc/security/audit/audubon.2 - /etc/security/audit/audubon.2 nfs - yes nopriv
As role secadmin, at label admin_low, enter reserve free space in the audit_control(4) file.
Enter a value between 10 and 20 on the minfree: line.
dir:/var/audit flags: minfree:20 naflags:
Write the file and quit the editor.
As role secadmin, at label admin_low, enter audit storage locations in the audit_control file.
On the first workstation installed, enter its local audit file system as the value of the dir: line.
The following shows the audit_control file for grebe, the NIS+ root master.
dir:/etc/security/audit/grebe/files flags: minfree:20 naflags:
When the audit file servers have been installed and configured, add their (mounted) filesystem names plus their top-level directory, files to the dir: entry.
The mounted file systems are listed before the workstation's local file system, as in:
dir:/etc/security/audit/egret/files dir:/etc/security/audit/egret.1/files dir:/etc/security/audit/grebe/files flags: minfree:20 naflags:
Write the file and exit the editor.
As role secadmin in an admin_high profile shell, execute the audit -s command to have the audit daemon re-read the audit_control file and write audit records to the designated directory.:
$ audit -s |
By default, the audit records have been stored in /var/audit. The audit records will now be stored in the first directory in the audit_control file.
As role secadmin, at label admin_low, enter system-wide audit flags in the audit_control(4)
file.
Enter the na class in the naflags: line if your site is auditing non-attributable events.
dir:/etc/security/audit/egret/files dir:/etc/security/audit/egret.1/files dir:/etc/security/audit/grebe/files flags: minfree:20 naflags:na
Enter other classes in the flags: line if your workstation is auditing user-level events.
dir:/etc/security/audit/egret/files dir:/etc/security/audit/egret.1/files dir:/etc/security/audit/grebe/files flags:lo,ad,-all,^-fc minfree:20 naflags:na
See "Sample audit_control File" for an explanation of the syntax of the audit flags' fields.
Write the file and exit the editor.
On a distributed system, the audit flags in the audit_control file must be identical on every workstation on the network. See "To Distribute Audit Configuration Files" for a process to distribute master copies of files to all workstations on the network.
The security administrator at label admin_low, enters user exceptions to system-wide audit flags in the user's Audit tab.
In the the role secadmin, launch the Solaris Management Console from the Application Manager and choose the toolbox appropriate for your site.
Under the User Accounts node, select a user.
In the user's Audit tab, enter the user exceptions, write the file, and exit the editor.
Follow the online help for assistance. The following example shows the format of the audit_user file.
For example, the following audit_user entry audits the role root for logins and logouts, and never audits the fc class, even if it is being audited for the workstation. The jane entry audits her for all flags specified in the audit_control file except for successful file_read events. Null events, no, are never audited.
# User Level Audit User File # # File Format # # username:always:never # root:lo:no,fc jane:all,^+fr:no
As role admin, at label admin_low, create a mail alias to warn of audit trouble.
If you are running a name service, on the master server of the name service, launch the Solaris Management Console from the Application Manager.
Choose the toolbox that your site uses for administration, and select the Users node.
Double-click the Mailing Lists node.
From the Action menu, choose Add mailing list.
Create an alias called audit_warn for notifying its members of audit trouble.
For example, this audit_warn alias emails the security administrator and the system administrator when the auditing subsystem needs attention.
Mailing List Name: audit_warn Mailing List Recipients: secadmin@grebe,admin@grebe
As role secadmin, at label admin_low, enter permanent audit policy in the audit_startup(1M)
file.
Create a script that calls the auditconfig(1M) command with policy options.
The sample audit_startup(1M) script below adds ACLs to audit records, halts the workstation when its audit file systems are full, and at startup, prints the current audit policy to standard i/o.
#!/bin/sh auditconfig -setpolicy +slabel,+acl auditconfig -setpolicy +ahlt auditconfig -getpolicy
Write the file and exit the editor
To run auditing in an evaluated configuration, the cnt policy cannot be turned on; the ahlt policy (the default) cannot be turned off.
In the Trusted Solaris 8 release, the audit_user file can be a NIS map or a NIS+ table, and does not need to be copied to each workstation. Sites that do not use a name service will want the same audit_user file on every workstation. If the site modifies the file on any workstation, it should be copied to all workstations.
During installation, as root, at label admin_low, create a directory on the first installed workstation to hold copies of the audit configuration files customized for your site.
For example, on grebe, the first workstation in a network:
# mkdir /export/home/tmp |
Copy the modified files from the /etc/security directory to the /export/home/tmp directory.
# cp /etc/security/audit_control /export/home/tmp/audit_control # cp /etc/security/audit_warn /export/home/tmp/audit_warn # cp /etc/security/audit_startup /export/home/tmp/audit_startup # cp /etc/security/audit_event /export/home/tmp/audit_event |
The directory would include your customized versions of audit_control, audit_startup, and audit_warn. If you have modified event-to-class mappings, it would include audit_event; if you have created new audit classes, it would include audit_class. It would not include audit_data.
Allocate the tape or diskette device.
Follow the procedure in "To Allocate and Deallocate Devices".
Run the tar(1) command to copy the contents of the /export/home/tmp directory toa tape or to diskette.
To copy to tape:
# cd /export/home/tmp # tar cv audit_control audit_warn audit_startup audit_event |
To copy to diskette:
# cd /export/home/tmp # tar cvf /dev/diskette \ audit_control audit_warn audit_startup audit_event |
Deallocate the tape or diskette device and follow the instructions.
Follow the procedure in "To Deallocate a Device".
As root, at label admin_low, as each new workstation is configured, copy the files from the tape or diskette to the correct directory on the new workstation.
Prepare the directory for the new files.
# cd /etc/security # mv audit_control audit_control.orig # mv audit_startup audit_startup.orig # mv audit_warn audit_warn.orig # mv audit_event audit_event.orig |
Allocate the appropriate device at the label admin_low.
Follow the procedure in "To Allocate and Deallocate Devices".
To copy from tape:
# tar xv audit_control audit_warn audit_startup audit_event |
To copy from diskette:
# tar xvf /dev/diskette \ audit_control audit_warn audit_startup audit_event |
Deallocate the device.
Follow the procedure in "To Deallocate a Device".
As role admin, at label admin_low, modify the audit_control file on each new workstation with that workstation's remote and local audit file systems.
The Device Manager allocates and deallocates devices.
In an administrative role workspace at the label required, click the left mouse button on the triangle above the Style Manager icon on the Front Panel.
The Tools subpanel is displayed.
Click the Device Manager icon once.

Double-click the device to be allocated.
mag_tape_0 allocates a tape device. floppy_0 allocates a diskette.
Click OK in the label builder that appears.
The file you load will be labeled admin_low.
Go to the workspace where the Device Manager was allocated.
Double-click the device to deallocate it.
A window appears listing devices being deallocated.
When prompted, remove the tape or diskette from the drive and label it appropriately.
Click the top left button and select Close to close the Device Allocation Manager window.
The following procedures describe how to modify the default audit classes and audit events, and to set a public object bit on files and folders to reduce unnecessary auditing.
As role secadmin, at label admin_low, add audit classes in the audit_classes file.
Add the classes you planned in "Planning a Site-Specific Event-to-Class Mapping", write the file, and exit the editor.
Do not reassign the hexadecimal numbers already in use.
As role secadmin, at label admin_low, open the Audit Events action to add the new class to each event in the new class.
For events in more than one class, use a comma (no space) to delimit the classes.
Write the file and exit the editor.
Make any changes to audit_control(4) and audit_user(4) to audit the events in the new classes.
See "To Set Audit Flags" and "To Set User Exceptions to the Audit Flags" for details of the procedures.
On a distributed system, the audit_class, audit_event, audit_startup, and audit_user files must be identical on every workstation on the network. See "To Distribute Audit Configuration Files" for a process to distribute master copies of files to all workstations on the network.
Reboot, or as secadmin in an admin_low profile shell, run the auditconfig(1M) command with
appropriate options.
In the following example, the audit session ID is 159, and the new classes are gr (for graphic applications) and db (for databases applications).
$ auditconfig -setsmask 159 gr,db |
As role secadmin, at label admin_low, add audit events in the audit_event(4) file.
Add the events you planned in "Planning a Site-Specific Event-to-Class Mapping", write the file, and exit the editor.
For events in more than one class, use a comma (no space) to delimit the classes.
Third-party applications can use the event numbers 32768 through 65536 only. See for more information about event number assignment.
Make any changes to audit_control(4) and audit_user(4) to audit the events in the new classes.
See "To Set Audit Flags" and "To Set User Exceptions to the Audit Flags" for details of the procedures.
On a distributed system, the audit_class, audit_event, audit_startup, and audit_user files must be identical on every workstation on the network. See "To Distribute Audit Configuration Files" for a process to distribute master copies of files to all workstations on the network.
Reboot, or as secadmin in an admin_low profile shell, run the auditconfig(1M) command with
appropriate options.
In the following example, the audit session ID is 159, and the new events are in the classes gr (for graphic applications) and db (for databases applications).
$ auditconfig -setsmask 159 gr,db |
Change event-class mappings in the audit_control(4) file.
Edit the file to change the class mapping for each event to be changed, write the file, and exit the editor.
If you are changing events above number 2048, this is all you need to do.
On a distributed system, the audit_class, audit_event, audit_startup, and audit_user files must be identical on every workstation on the network. See "To Distribute Audit Configuration Files" for a process to distribute master copies of files to all workstations on the network.
If you modify a kernel event mapping (numbers 1 to 2047), restart auditing by doing one of the following:
Reboot the system, or
As role secadmin, at label admin_low, change the runtime event-to-class mappings:
$ auditconfig -conf |
Setting the public object bit can reduce the size of the audit trail when the audit record includes successful accesses of files or directories. Successful viewing, listing, or listing of a file or directory's attributes will not be written to the audit record when the file's public object bit is set.
As role secadmin, at label admin_low, set the public object bit on a local directory of publicly accessible files using the setfattrflag(1) command with the -p 1 option.
The following command sets the public object bit on the /etc directory. A search of the /etc directory, or a read of files in the /etc directory will not result in an audit record.
$ setfattrflag -p 1 /etc
$ getfattrflag /etc
Multilevel directory: no
Single level directory: no
Public object: yes
|
Dynamic controls apply to one workstation at a time, since the audit command only applies to the current workstation where you are logged in. Use dynamic controls to test auditing on a workstation (estimate volume of records, for example), or to add an auditing flag without having to reboot the workstation. However, if you make dynamic changes on one workstation for other than testing purposes, you should make the changes on all workstations.
The following procedures work only when auditing is enabled.
The auditconfig(1M) command enables an appropriately configured role to determine audit policy and to see what policies can be set.
If your role is not configured to determine the policy, or if auditing is turned off, the command auditconfig -getpolicy returns an error. The following example was run by the role secadmin, at label admin_low:
$ auditconfig -getpolicy audit policies = none $ auditconfig -lspolicy policy string description: arge include exec environment args in audit recs argv include exec args in audit recs cnt when no more space, drop recs and keep a count group include supplementary groups in audit recs seq include a sequence number in audit recs trail include trailer tokens in audit recs path allow multiple paths per event acl include ACL information in audit recs ahlt halt machine if we can't record an async event slabel include sensitivity labels in audit recs passwd include cleartext passwords in audit recs windata_down include downgraded information in audit recs windata_up include upgraded information in audit recs all all policies none no policies |
To label files admin_high, to move files to an admin_high directory, to reset the audit daemon, and to make other changes in auditing requires an admin_high process. An admin_high process starts from an admin_high workspace.
Click the right button on the Front Panel and choose Assume secadmin Role from the menu.
A secadmin role workspace becomes the current workspace.
In the current workspace, click the right button on the workspace name (secadmin) button and choose Change Workspace SL from the menu.
In the label builder, click the ADMIN_HIGH button, then click OK.
The color of the workspace button turns to black, indicating an admin_high workspace. An admin_high workspace is available only to an administrative role.
The auditconfig command enables you to change audit policy, such as whether to include acl information in the audit record. Since the audit policy variable is a dynamic kernel variable, the policy that you set is in effect until the workstation next boots. See the auditconfig(1M) man page for a list of audit policy parameters.
The security administrator sets or changes audit policy. Policy changes are set at the label admin_low.
To set policies in one invocation of the command, or to override all current policies, separate the policies with commas (no spaces):
$ auditconfig -setpolicy trail,seq $ auditconfig -getpolicy audit policies = trail,seq $ auditconfig -setpolicy argv,acl $ auditconfig -getpolicy audit policies = argv,acl |
To add policies to the current policies, preface each added policy with a plus (+):
$ auditconfig -setpolicy trail,seq $ auditconfig -getpolicy audit policies = trail,seq $ auditconfig -setpolicy +argv $ auditconfig -setpolicy +acl $ auditconfig --getpolicy audit policies = seq,trail,argv,acl |
To remove policies from the current policies, preface each policy to be removed with a minus (-):
$ auditconfig -setpolicy trail,seq $ auditconfig -getpolicy audit policies = trail,seq $ auditconfig -setpolicy -seq $ auditconfig -getpolicy audit policies = trail |
In the examples above, the trail and seq tokens are added to debug audit trail discrepancies. To set policies permanently, enter the auditconfig command in the audit_startup(1M) script. See "To Set Audit Policy Permanently" for how to edit the script.
To run auditing in an evaluated configuration, the cnt policy cannot be turned on; the ahlt policy (the default) cannot be turned off.
The auditconfig(1M) command enables you to change audit flags dynamically, such as adding extra flags to a user, a session, or a process while the user, session, or process is active. Since the flags are added dynamically, they are in effect until the user logs out, the session ends, or the process ends.
The security administrator sets or changes audit policy. Policy changes are set at the label admin_low.
To set a particular user to be additionally audited for successful file reads:
$ auditconfig -setumask audit_user_id +fr |
To set a particular session to be additionally audited for failed file attribute access:
$ auditconfig -setsmask audit_session_id -fa |
To set a particular process to be additionally audited for successful and unsuccessful file attribute modifications:
$ ps -ef | grep application-to-be-monitored $ auditconfig -setpmask process_id fm |
Only one audit daemon may run at a time. An attempt to start a second one will result in an error message, and the new one will exit. If there is a problem with the audit daemon, terminate the audit daemon gracefully, then restart it manually.
To stop the audit daemon in event of trouble, as role secadmin, at label admin_high:
$ audit -t |
This is not recommended. Audit records may be lost.
The audit daemon starts when the workstation is brought up to multiuser mode, and restarts when the audit daemon is instructed by the audit -s command to reread an audit configuration file.
To restart the audit daemon in event of trouble or a change to an audit configuration file, as role secadmin, at label admin_high:
$ audit -s |
The pointer may be reset to the beginning of the list of audit directories when the administrator enters the audit -s command.