Trusted Solaris Audit Administration

Audit Token Structure

Logically, each token has a token type identifier followed by data specific to the token. Each token type has its own format and structure. The audit tokens are shown in the table below. Those marked TS in the TS8 column are in Trusted Solaris 2.5.1 and later versions only. Those not marked TS are modified versions of audit tokens from the Solaris Basic Security Module. The token scheme can be extended.

Table B–1 Trusted Solaris Audit Tokens

Token Name 

Description 

TS8 

acl Token

Access Control List 

TS 

arbitrary Token

Data with format and type 

 

arg Token

System call argument value 

 

attr Token

File attributes 

 

clearance Token

Clearance 

TS 

cmd Token

Command execution 

 

exec_args Token

Exec system call arguments 

 

exec_env Token

Exec system call environment variables 

 

exit Token

Program exit 

 

file Token

Audit file delimiter 

 

groups Token (Obsolete)

Process supplementary group (obsolete) 

 

header Token

Start of audit record 

 

host Token

Host where audit record was collected 

TS 

in_addr Token

Internet address 

 

ip Token

IP header information 

 

ipc Token

System V IPC information 

 

ipc_perm Token

System V IPC object tokens 

 

iport Token

Internet port address 

 

liaison Token

Liaison information for Trusted Networking 

TS 

newgroups Token

Process supplementary group information 

 

opaque Token

Unstructured data (unspecified format) 

 

path Token

Path (path) 

 

upriv Token

Use of privilege 

TS 

privilege Token

Privilege set 

TS 

process Token

Process information 

 

return Token

Status of system call 

 

return Token

Sequence number 

 

slabel Token

Sensitivity label 

TS 

socket Token

Socket type and addresses 

 

subject Token

Subject 

 

text Token

Character string 

 

trailer Token

End of audit record 

 

uauth Token

Use of authorization 

 

xatom Token

X window atom identification 

TS 

xclient Token

X client identification 

TS 

xcolormap Token

X window color information 

TS 

xcursor Token

X window cursor information 

TS 

xfont Token

X window font information 

TS 

xgc Token

X window graphical context information 

TS 

xpixmap Token

Xwindow pixel mapping information 

TS 

xproperty Token

X window property information 

TS 

xselect Token

X window data information 

TS 

xwindow Token

X window window information 

TS 

An audit record always contains a header token and may contain a trailer token. The header token indicates where the audit record begins in the audit trail. The optional trailer token allows backward seeks of the audit trail. Every audit record contains a subject token, except for audit records from some non-attributable events. In the case of attributable events, these two tokens refer to the values of the process that caused the event. In the case of asynchronous events, the process tokens refer to the system. For an example of how to read an audit record, go to Reading an Audit Record.

acl Token

The acl token records information about ACLs. It consists of four fixed fields: a token ID that identifies this token as an acl token, a field that specifies the ACL type, an ACL ID field, and a field that lists the permissions associated with this ACL. The acl token appears as follows:

The following figure shows the token format.

Figure B–2 acl Token Format

Graphic

A list of acl tokens is displayed by praudit(1M) as follows:

acl,user_obj,,rwx
acl,user,bin,---
acl,group_obj,,r-x
acl,class_obj,,r--
acl,other_obj,,r-x

arbitrary Token

The arbitrary token encapsulates data for the audit trail. It consists of four fixed fields and an array of data. The item array may have a number of items. The fields are:

The following figure shows the token format.

Figure B–3 arbitrary Token Format

Graphic

The print format field can take the values shown in Table B–2.

Table B–2 arbitrary Token Print Format Field Values

Value 

Action 

AUP_BINARY

Print date in binary 

AUP_OCTAL

Print date in octal 

AUP_DECIMAL

Print date in decimal 

AUP_HEX

Print date in hex 

AUP_STRING

Print date as a string 

The item size field can take the values shown in Table B–3.

Table B–3 arbitrary Token Item Size Field Values

Value 

Action 

AUR_BYTE

Data is in units of bytes (1 byte) 

AUR_SHORT

Data is in units of shorts (2 bytes) 

AUR_LONG

Data is in units of longs (4 bytes) 

AUR_LONGLONG

Data is in units of longlongs (8 bytes) 

An arbitrary token is displayed by praudit as follows:

arbitrary,decimal,int,1
42

arg Token

The arg token contains system call argument information. A 32-bit integer system call argument is allowed in an audit record. The fields are:

The following figure shows the token format.

Figure B–4 arg Token Format

Graphic

An arg token is displayed by praudit as follows:

argument,2,0x3,cmd

attr Token

The attribute token contains file attribute information from the kernel's internal representation of a file or folder. This token usually accompanies a path token and is produced during path searches. In the event of a path-search error, this token is not included as part of the audit record since the file attribute information is not available. The fields are:

See the statvfs(2) man page for further information about the file system ID and the device ID. The following figure shows the token format.

Figure B–5 attr Token Format

Graphic

An attr token is displayed by praudit as follows:

attribute,100555,root,root,1805,13871,-4288

clearance Token

The clearance token contains Trusted Solaris clearance information. The fields are:

The following figure shows the token format.

Figure B–6 clearance Token Format

Graphic

A clearance token is displayed by praudit as follows:

clearance,TOP SECRET

cmd Token

The cmd token records the arguments and environment in which a command executes. The fields are:

A cmd token is displayed by praudit as follows:

cmd,2,/export/share/tsol8,label_encodings

exec_args Token

The exec_args token records the arguments to an exec() system call. The fields are:

The following figure shows an exec_args token.

Figure B–7 exec_args Token Format

Graphic


Note –

The exec_args token is output only when the audit policy argv is active. See Dynamic Auditing (Tasks) for more information.


An exec_args token is displayed by praudit as follows:

exec_args,

exec_env Token

The exec_env token records the current environment variables to an exec() system call. The fields are:

The following figure shows an exec_env token.

Figure B–8 exec_env Token Format

Graphic


Note –

The exec_env token is output only when the audit policy arge is active. See Dynamic Auditing (Tasks) for more information.


An exec_env token is displayed by praudit as follows:

exec_env,

exit Token

The exit token records the exit status of a program and a return value. The fields are:

The following figure shows an exit token.

Figure B–9 exit Token Format

Graphic

An exit token is displayed by praudit as follows:

exit,Error 0,0

file Token

The file token is a special token generated by the audit daemon to mark the beginning of a new audit trail file and the end of an old file as it is deactivated. The audit daemon builds a special audit record containing this token to link together successive audit files into one audit trail. The fields are:

The following figure shows the token format.

Figure B–10 file Token Format

Graphic

A file token is displayed by praudit as follows:

file,Fri Jan 23 13:32:42 1997, + 792 msec,
/etc/security/audit/patchwork/files/19920901202558.19920901203241.patchwork

groups Token (Obsolete)

This token has been replaced by the newgroups token, which provides the same type of information but requires less space. A description of the groups token is provided here for completeness, but the application designer should use the newgroups token. Note that praudit does not distinguish between the two tokens as both token IDs are labelled groups when character output is displayed.

The groups token records the groups entries from the process's credential. The fields are:

The following figure shows a groups token.

Figure B–11 groups Token Format

Graphic

A groups token is displayed by praudit as follows:

group,staff,wheel,daemon,kmem,bin,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1

Note –

The groups token is output only when the audit policy group is active.


header Token

The header token is special in that it marks the beginning of an audit record and combines with the trailer token to bracket all the other tokens in the record. The fields are:

The following figure shows a header token.

Figure B–12 header Token Format

Graphic

The event modifier field has the following flags defined:

Value 

Constant Name 

Description 

0x0001 

PAD_READ 

Data read from object 

0x0002 

PAD_WRITE 

Data written to object 

0x0080 

PAD_SPRIVUSE 

Successfully used privilege 

0x0100 

PAD_FPRIVUSE 

Failed use of privilege 

0x4000 

PAD_NONATTR 

Nonattributable event 

0x8000 

PAD_FAILURE 

Failed audit event 

For the Trusted Solaris 7 and Trusted Solaris 8 4/01 releases, the header token can be displayed with a 64-bit time stamp, in place of the 32-bit time stamp.

For the Trusted Solaris 8 4/01 release, the Internet Address can be displayed as a IPv4 address using 4 bytes, or as an IPv6 address using 16 bytes to describe the type, and 16 bytes to describe the address.

A header token is displayed by praudit as follows:

header,240,1,ioctl(2),,Tue Sept  7 16:11:44 2000, + 270 msec

host Token

The host token contains the machine ID for the system which generated this audit record. The fields are:

The following figure shows the token format.

Figure B–13 host Token Format

Graphic

A host token is displayed by praudit as follows:

host,patchwork

in_addr Token

The in_addr token contains an Internet address. This 4-byte value is an Internet Protocol address. The fields are:

For the Trusted Solaris 8 4/01 release, the Internet Address can be displayed as a IPv4 address using 4 bytes, or as an IPv6 address using 16 bytes to describe the type, and 16 bytes to describe the address.

The following figure shows the token format.

Figure B–14 in_addr Token Format

Graphic

An in_addr token is displayed by praudit as follows:

ip address,192.168.110.3

ip Token

The ip token contains a copy of an Internet Protocol header but does not include any IP options. The IP options may be added by including more of the IP header in the token. The IP header structure is defined in /usr/include/netinet/ip.h. The fields are:

The following figure shows the token format.

Figure B–15 ip Token Format

Graphic

An ip token is displayed by praudit as follows:

ip,0.0.0.0

ipc Token

The ipc token contains the System V IPC message/semaphore/shared-memory handle used by the caller to identify a particular IPC object. The fields are:

The following figure shows the token format.

Figure B–16 ipc Token Format

Graphic

An ipc token is displayed by praudit as follows:

IPC,msg,3

Note –

The IPC object identifiers violate the context-free nature of the Solaris CMW audit tokens. No global “name” uniquely identifies IPC objects; instead, they are identified by their handles, which are valid only during the time the IPC objects are active. The identification should not be a problem since the System V IPC mechanisms are seldom used and they all share the same audit class.


The IPC object type field may have the values shown in Table B–4. The values are defined in </usr/include/bsm/audit.h>.

Table B–4 IPC Object Type Field

Name 

Value 

Description 

AU_IPC_MSG

IPC message object 

AU_IPC_SEM

IPC semaphore object 

AU_IPC_SHM

IPC shared memory object 

ipc_perm Token

The ipc_perm token contains a copy of the System V IPC access information. Audit records for shared memory, semaphore, and message IPCs have this token added. The fields are:

The values are taken from the ipc_perm structure associated with the IPC object. The following figure shows the token format.

Figure B–17 ipc_perm Token Format

Graphic

An ipc_perm token is displayed by praudit as follows:

IPC_perm,root,wheel,root,wheel,0,0,0x00000000

iport Token

The iport token contains the TCP (or UDP) port address. The fields are:

The following figure shows the token format.

Figure B–18 iport Token Format

Graphic

An iport token is displayed by praudit as follows:

iport,0xf6d6

liaison Token

The liaison token contains a liaison ID used by the Trusted Networking software. The fields are:

The following figure shows the token format.

Figure B–19 liaison Token Format

Graphic

A liaison token is displayed by praudit as follows:

liaison,17

newgroups Token

This token is the replacement for the groups token. Note that praudit does not distinguish between the two tokens as both token IDs are labelled groups when character output is displayed.

The newgroups token records the groups entries from the process's credential. The fields are:

The following figure shows the token format.

Figure B–20 newgroups Token Format

Graphic


Note –

The newgroups token is output only when the audit policy group is active.


A newgroups token is displayed by praudit as follows:

newgroups,1,analysts

opaque Token

The opaque token contains unformatted data as a sequence of bytes. The fields are:

The following figure shows the token format.

Figure B–21 opaque Token Format

Graphic

An opaque token is displayed by praudit as follows:

opaque,12,0x4f5041515545204441544100

path Token

The path token contains access path information for an object. The fields are:

The following figure shows the token format.

Figure B–22 path Token Format

Graphic

A path token is displayed by praudit as follows:

path,/etc/security/audit/patchwork

privilege Token

The privilege token contains privilege information for an object or a subject. The fields are:

where type is one of the following:

Value 

Type 

Unknown or Undefined 

Forced 

Allowed 

Effective 

Inheritable 

Permitted 

Saved 

The following figure shows the token format.

Figure B–23 privilege Token Format

Graphic

A privilege token is displayed by praudit as follows:

privilege,Forced,proc_tcb_audit

process Token

The process token contains information describing a process as an object such as the recipient of a signal. The fields are:

The audit ID, user ID, group ID, process ID, and session ID are long instead of short.


Note –

The process token fields for the session ID, the real user ID, or the real group ID might be unavailable. The entry is then set to -1.


For the Trusted Solaris 7 release, the process token can be displayed using a 64-bit device ID, in place of the 32-bit value.

For the Trusted Solaris 8 4/01 release, the terminal ID can report an IPv6 address by changing the format to use either 4 or 8 bytes to describe the device, 16 bytes to describe the type, and 16 bytes to describe the address.

The following figure shows the token format.

Figure B–24 Format for process and subject Tokens

Graphic

subject

A process token is displayed by praudit as follows:

process,root,root,wheel,root,wheel,0,0,0,0.0.0.0

return Token

The return token contains the return status of the system call (u_error) and the process return value (u_rval1). The token indicates exit status and other return values in application auditing. This token is always returned as part of kernel-generated audit records for system calls. The fields are:

The following figure shows the token format.

Figure B–25 return Token Format

Graphic

A return token is displayed by praudit as follows:

return,failure: No such file or directory,-1

seq Token

The seq token (sequence token) is an optional token that contains an increasing sequence number. This token is for debugging. The token is added to each audit record when the AUDIT_SEQ policy is active. The fields are:

The sequence number is incremented every time an audit record is generated and put onto the audit trail. The following figure shows the token format.

Figure B–26 seq Token Format

Graphic

A seq token is displayed by praudit as follows:

sequence,1292

slabel Token

The slabel token contains a sensitivity label. The fields are:

The following figure shows the token format.

Figure B–27 slabel Token Format

Graphic

An slabel token is displayed by praudit as follows:

slabel,ADMIN_LOW

socket Token

The socket token contains information describing an Internet socket. The fields are:

For the Trusted Solaris 8 4/01 release, the Internet Address can be displayed as a IPv4 address using 4 bytes, or as an IPv6 address using 16 bytes to describe the type, and 16 bytes to descibe the addresses.

The socket type is taken from the designated socket and the port and Internet addresses are taken from the socket's inpcb control structure. The following figure shows the token format.

Figure B–28 socket Token Format

Graphic

A socket token is displayed by praudit as follows:

socket,0x0000,0x0000,0.0.0.0,0x0000,0.0.0.0

socket,0x0002,0x8008,patchwork

subject Token

The subject token describes a subject (process). The structure is the same as the process token:

This token is always returned as part of kernel-generated audit records for system calls. The audit ID, user ID, group ID, process ID, and session ID are long instead of short. Figure B–24 shows the token format.


Note –

The subject token fields for the session ID, the real user ID, or the real group ID may be unavailable. The entry is then set to -1.


For the Trusted Solaris 7 release, the process token can be displayed using a 64-bit device ID, in place of the 32-bit value.

For the Trusted Solaris 8 4/01 release, the terminal ID can report an IPv6 address by changing the format to use either 4 or 8 bytes to describe the device, 16 bytes to describe the type, and 16 bytes to describe the address.

A subject token is displayed by praudit as follows:

subject,root,root,staff,root,staff,552,552,24 3 patchwork

text Token

The text token contains a text string. The fields are:

The following figure shows the token format.

Figure B–29 text Token Format

Graphic

A text token is displayed by praudit in 7–bit ASCII with control characters in the form ^L, as follows:

text,Enter your name on the next line^JName:

trailer Token

A trailer token it marks the end of an audit record to support backward seeks of the audit trail. It is an optional token that is added as the last token of each record only when the AUDIT_TRAIL audit policy has been set. The fields are:

The following figure shows the token format.

Figure B–30 trailer Token Format

Graphic

A trailer token is displayed by praudit as follows:

trailer,136

uauth Token

The uauth token contains a text string. The fields are:

The following figure shows the token format.

Figure B–31 uauth Token Format

Graphic

A uauth token is displayed by praudit as follows:

uauth,solaris.device.allocate

upriv Token

The upriv token contains use of privilege information. The fields are:

The following figure shows a priv token.

Figure B–32 upriv Token Format

Graphic

A upriv token is displayed by praudit as follows:

use of privilege,failed use of priv,win_mac_write

xatom Token

The xatom token contains information concerning an X atom. The fields are:

The following figure shows the token format.

Figure B–33 xatom Token Format

Graphic

An xatom token is displayed by praudit as follows:

X atom,_DT_SAVE_MODE

xclient Token

The xclient token contains information concerning the X client. The fields are:

The following figure shows the token format.

Figure B–34 xclient Token Format

Graphic

An xclient token is displayed by praudit as follows:

X client,15

xcolormap Token

The xcolormap token contains information about the colormaps. The fields are:

The following figure shows the token format.

Figure B–35 Format for xcolormap, xcursor, xfont, xgc, xpixmap, and xwindow Tokens

Graphic

An xcolormap token is displayed by praudit as follows:

X color map,0x08c00005,srv

xcursor Token

The xcursor token contains information about the cursors. The fields are:

Figure B–35 shows the token format.

An xcursor token is displayed by praudit as follows:

X cursor,0x0f400006,srv

xfont Token

The xfont token contains information about the fonts. The fields are:

Figure B–35 shows the token format.

An xfont token is displayed by praudit as follows:

X font,0x08c00001,srv

xgc Token

The xgc token contains information about the xgc. The fields are:

Figure B–35 shows the token format.

An xgc token is displayed by praudit as follows:

Xgraphic context,0x002f2ca0,srv

xpixmap Token

The xpixmap token contains information about the pixel mappings. The fields are:

Figure B–35 shows the token format.

An xpixmap token is displayed by praudit as follows:

X pixmap,0x08c00005,srv

xproperty Token

The xproperty token contains information about various properties of a window. The fields are:

The following figure shows an xproperty token format.

Figure B–36 xproperty Token Format

Graphic

An xproperty token is displayed by praudit as follows:

X property,0x000075d5,root,_MOTIF_DEFAULT_BINDINGS

xselect Token

The xselect token contains the data moved between windows. This data is a byte stream with no assumed internal structure, and a property string. The fields are:

The following figure shows the token format.

Figure B–37 xselect Token Format

Graphic

An xselect token is displayed by praudit as follows:

X selection,

xwindow Token

The xwindow token contains information about a window. The fields are:

Figure B–35 shows the token format.

An xwindow token is displayed by praudit as follows:

X window,0x07400001,gww